-
Notifications
You must be signed in to change notification settings - Fork 6
ReplyCollaboration
Allows a collaborator to accept or reject a Collaboration invitation. This operation is only allowed when the requestor is the collaborator and the status is Waiting.
URL: /v1/collaborations/{collaborationId}/reply
Method: PUT
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
| collaborationId | string | UUID of the Collaboration to reply. |
Query Parameters: None
Headers:
Authorization: Bearer {accessToken}
Content-Type: application/json
Content:
| Field | Type | Description | Requirement Type |
|---|---|---|---|
| accepted | boolean | Indicates if the collaboration is accepted or rejected. If true, the Collaboration status is set to Accepted. Otherwise, is set to Rejected. |
Required |
Content example:
{
"accepted": true
}Code: 204 NO CONTENT
Headers: None
Code: 401 UNAUTHORIZED
Condition: If {accessToken} is invalid or expired.
Code: 403 FORBIDDEN
Condition: If the requestor is not the collaborator.
Headers:
Content-Type: application/json
Content example:
{
"code": 403,
"description": "Forbidden",
"cause": "operation allowed only by collaborator"
}Code: 404 NOT FOUND
Condition: If the specified Collaboration is not found.
Headers:
Content-Type: application/json
Content example:
{
"code": 404,
"description": "Not Found",
"cause": "Entity CollaborationEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}Code: 422 UNPROCESSABLE ENTITY
Condition: If operation attempted when status is other thanWaiting .
Headers:
Content-Type: application/json
Content example:
{
"code": 422,
"description": "Unprocessable Entity",
"cause": "Operation only allowed when status = Waiting"
}Post Collaboration (Add New Collaboration)