removing guid from endpoints

This commit is contained in:
balzack 2022-01-03 15:13:16 -08:00
parent bb51b7dd17
commit 00c3ef8037

147
api.oa3
View File

@ -121,7 +121,7 @@ paths:
security: security:
- basicAuth: [] - basicAuth: []
parameters: parameters:
- name: guid - name: cardId
in: query in: query
description: id of profile to access description: id of profile to access
required: true required: true
@ -183,7 +183,7 @@ paths:
'500': '500':
description: internal server error description: internal server error
/admin/accounts/{guid}: /admin/accounts/{cardId}:
delete: delete:
tags: tags:
- admin - admin
@ -192,7 +192,7 @@ paths:
security: security:
- basicAuth: [] - basicAuth: []
parameters: parameters:
- name: guid - name: cardId
in: path in: path
description: id of account to delete description: id of account to delete
required: true required: true
@ -208,7 +208,7 @@ paths:
'500': '500':
description: internal server error description: internal server error
/admin/accounts/{guid}/image: /admin/accounts/{cardId}/image:
get: get:
tags: tags:
- admin - admin
@ -217,7 +217,7 @@ paths:
security: security:
- basicAuth: [] - basicAuth: []
parameters: parameters:
- name: guid - name: cardId
in: path in: path
description: id of specified account description: id of specified account
required: true required: true
@ -480,33 +480,33 @@ paths:
get: get:
tags: tags:
- profile - profile
description: Get profile view object description: Get profile of accunt. Access granted to app token of account holder.
operationId: get-profile operationId: get-profile
security: security:
- bearerAuth: [] - bearerAuth: []
responses: responses:
'200': '200':
description: successful operation description: success
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/Profile' $ref: '#/components/schemas/Profile'
'401': '401':
description: invalid token description: permission denied
'500': '500':
description: internal server error description: internal server error
put: put:
tags: tags:
- profile - profile
description: Set profile data description: Set profile data. Access granted to app tokens of account holder.
operationId: set-profile operationId: set-profile
security: security:
- bearerAuth: [] - bearerAuth: []
responses: responses:
'200': '200':
description: successful operation description: success
'401': '401':
description: invalid token description: permission denied
'500': '500':
description: internal server error description: internal server error
requestBody: requestBody:
@ -519,20 +519,20 @@ paths:
get: get:
tags: tags:
- profile - profile
description: Get profile image description: Download base64 decoded data of profile image. Access granted to app tokens of account holder.
operationId: get-profile-image operationId: get-profile-image
security: security:
- bearerAuth: [] - bearerAuth: []
responses: responses:
'200': '200':
description: successful operation description: success
content: content:
application/octet-stream: application/octet-stream: # content specific
schema: schema:
type: string type: string
format: binary format: binary
'401': '401':
description: invalid token description: permission denied
'405': '405':
description: invalid image description: invalid image
'500': '500':
@ -542,17 +542,19 @@ paths:
get: get:
tags: tags:
- profile - profile
description: Get profile message description: Get a profile data message. Access granted to app token of account holder or contact token of connected contact.
operationId: get-profile-message operationId: get-profile-message
security:
- bearerAuth: []
responses: responses:
'200': '200':
description: successful operation description: success
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/DataMessage' $ref: '#/components/schemas/DataMessage'
'401': '401':
description: invalid token description: permission denied
'500': '500':
description: internal server error description: internal server error
@ -831,18 +833,13 @@ paths:
description: card not found description: card not found
'500': '500':
description: internal server error description: internal server error
/contact/openMessage:
put: put:
tags: tags:
- contact - contact
description: Set message for connecting to a contact. If card has not already been added, the card will be created in the pending state. Access granted to public. description: Set message for connecting to a contact. If card has not already been added, the card will be created in the pending state. Access granted to public.
operationId: set-open-message operationId: set-open-message
parameters:
- name: cardId
in: path
description: specified card id
required: true
schema:
type: string
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -896,18 +893,13 @@ paths:
description: card not found description: card not found
'500': '500':
description: internal server error description: internal server error
/contact/closeMessage:
put: put:
tags: tags:
- contact - contact
description: Set message for closing card connection. Access granted to public. description: Set message for closing card connection. Access granted to public.
operationId: set-close-message operationId: set-close-message
parameters:
- name: cardId
in: path
description: specified card id
required: true
schema:
type: string
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -2356,8 +2348,8 @@ paths:
schema: schema:
type: boolean type: boolean
/conversation/dialogues/{dialogueId}/insight/{guid}: /conversation/dialogues/{dialogueId}/cards/{cardId}:
post: put:
tags: tags:
- conversation - conversation
description: Add insight to a dialogue. This endpoint will automatically invoke the add insight on the contact's node. Authorization is granted to the app token of the account holder. description: Add insight to a dialogue. This endpoint will automatically invoke the add insight on the contact's node. Authorization is granted to the app token of the account holder.
@ -2371,7 +2363,7 @@ paths:
required: true required: true
schema: schema:
type: string type: string
- name: guid - name: cardId
in: path in: path
description: specified card id description: specified card id
required: true required: true
@ -2383,7 +2375,7 @@ paths:
'401': '401':
description: permission denied description: permission denied
'404': '404':
description: guid or dialogue not found description: cardId or dialogue not found
'500': '500':
description: internal server error description: internal server error
delete: delete:
@ -2400,7 +2392,7 @@ paths:
required: true required: true
schema: schema:
type: string type: string
- name: guid - name: cardId
in: path in: path
description: specified contact id description: specified contact id
required: true required: true
@ -2412,15 +2404,15 @@ paths:
'401': '401':
description: permission denied description: permission denied
'404': '404':
description: guid or dialogue not found description: cardId or dialogue not found
'500': '500':
description: internal server error description: internal server error
/conversation/dialogues/{dialogueId}/insight/{guid}/status: /conversation/dialogues/{dialogueId}/status:
put: put:
tags: tags:
- conversation - conversation
description: Set active status for contact on the host node. Access is granted to a contact token for an accound with the specified guid description: Set active status for contact on the host node. Access is granted to a contact token for an account with the specified contact
operationId: set-dialogue-insight-status operationId: set-dialogue-insight-status
security: security:
- bearerAuth: [] - bearerAuth: []
@ -2431,19 +2423,13 @@ paths:
required: true required: true
schema: schema:
type: string type: string
- name: guid
in: path
description: specified contact id
required: true
schema:
type: string
responses: responses:
'200': '200':
description: success description: success
'401': '401':
description: permission denied description: permission denied
'404': '404':
description: guid or dialogue not found description: dialogue not found
'500': '500':
description: internal server error description: internal server error
requestBody: requestBody:
@ -2500,21 +2486,15 @@ paths:
'500': '500':
description: internal server error description: internal server error
/conversation/insights/{guid}/dialogues/{dialogueId}: /conversation/insights/{dialogueId}:
post: post:
tags: tags:
- conversation - conversation
description: Create or update an insight. Access granted to a contact token for a contact with the specified guid. This endpoint is invoked by the webhook from the contact node. description: Create or update an insight. Because the insightId is not know by the contact, it is determined from the token and the dialogueId. Access granted to a connected contact token.
operationId: add-insight-dialogue operationId: add-insight-dialogue
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
- name: guid
in: path
description: id of contact hosting the dialogue
required: true
schema:
type: string
- name: dialogueId - name: dialogueId
in: path in: path
description: dialogue with insight id to update description: dialogue with insight id to update
@ -2532,7 +2512,7 @@ paths:
'401': '401':
description: permission denied description: permission denied
'404': '404':
description: dialogue or guid not found description: dialogue not found
'500': '500':
description: internal server error description: internal server error
requestBody: requestBody:
@ -2544,17 +2524,11 @@ paths:
delete: delete:
tags: tags:
- conversation - conversation
description: Remove a specified insight. If the referenced dialogue is still active, the insight will get recreated with the next hook receiver update. Access granted to app token of account holder or contact token of dialogue host. description: Remove a specified insight. If the referenced dialogue is still active, the insight will get recreated with the next hook receiver update. Access granted to contact token of a connected card.
operationId: set-insight-dialogue operationId: set-insight-dialogue
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
- name: guid
in: path
description: id of contact hosting the dialogue
required: true
schema:
type: string
- name: dialogueId - name: dialogueId
in: path in: path
description: insight id to update description: insight id to update
@ -2567,26 +2541,20 @@ paths:
'401': '401':
description: permission denied description: permission denied
'404': '404':
description: dialogue or guid not found description: dialogue not found
'500': '500':
description: internal server error description: internal server error
/conversation/insights/{guid}/dialogues/{dialogueId}/status: /conversation/insights/{insightId}/status:
put: put:
tags: tags:
- conversation - conversation
description: Set the active status of an insight. This will cause the hook receiver to return an inactive status. Access granted to app token of account holder. description: Set the status of an insight. This will cause the hook receiver to return an inactive status. Access granted to app token of account holder.
operationId: set-insight-dialogue-active operationId: set-insight-status
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
- name: guid - name: insightId
in: path
description: id of contact hosting the dialogue
required: true
schema:
type: string
- name: dialogueId
in: path in: path
description: dialogue with insight id to update description: dialogue with insight id to update
required: true required: true
@ -2597,8 +2565,10 @@ paths:
description: success description: success
'401': '401':
description: permission denied description: permission denied
'403':
description: invalid state # once dismissed always dismissed
'404': '404':
description: dialogue or guid not found description: insight not found
'500': '500':
description: internal server error description: internal server error
requestBody: requestBody:
@ -3546,11 +3516,11 @@ components:
Profile: Profile:
type: object type: object
required: required:
- guid - did
- revision - revision
- node - node
properties: properties:
guid: did:
type: string type: string
handle: handle:
type: string type: string
@ -3614,12 +3584,12 @@ components:
CardView: CardView:
type: object type: object
required: required:
- guid - cardId
- profileRevision - profileRevision
- contentRevision - contentRevision
- cardRevision - cardRevision
properties: properties:
guid: cardId:
type: string type: string
cardRevision: cardRevision:
type: integer type: integer
@ -3678,11 +3648,14 @@ components:
Card: Card:
type: object type: object
required: required:
- cardId
- cardProfile - cardProfile
- cardData - cardData
- contentRevision - contentRevision
- conversationRevision - conversationRevision
properties: properties:
cardId:
type: string
cardProfile: cardProfile:
$ref: '#/components/schemas/CardProfile' $ref: '#/components/schemas/CardProfile'
cardData: cardData:
@ -3733,10 +3706,10 @@ components:
Tag: Tag:
type: object type: object
required: required:
- guid - cardId
- subject - subject
properties: properties:
guid: cardId:
type: string type: string
subject: subject:
$ref: '#/components/schemas/Subject' $ref: '#/components/schemas/Subject'
@ -3746,7 +3719,7 @@ components:
required: required:
- insightId - insightId
- revision - revision
- guid - cardId
- status - status
properties: properties:
insightId: insightId:
@ -3754,7 +3727,7 @@ components:
revision: revision:
type: integer type: integer
format: int64 format: int64
guid: cardId:
type: string type: string
status: status:
type: string type: string
@ -3783,7 +3756,7 @@ components:
items: items:
type: object type: object
properties: properties:
guid: cardId:
type: string type: string
status: status:
type: string type: string
@ -3883,7 +3856,7 @@ components:
Authenticate: Authenticate:
type: object type: object
required: required:
- guid - cardId
- token - token
- timestamp - timestamp
properties: properties:
@ -3903,9 +3876,9 @@ components:
- token - token
- contentRevision - contentRevision
properties: properties:
requestorGuid: requestorcardId:
type: string type: string
requestedGuid: requestedcardId:
type: string type: string
timestamp: timestamp:
type: integer type: integer