An assigned reviewer and any approver can comment on requests and/or revisions (see Comment on a revision) Updating will update the active request revision.
{info} Comments can only be send in the following states:
awaiting_reviewandawaiting_approval
| Method | Uri | Auth | Role |
|---|---|---|---|
POST |
/v1/requests/{UUID}/comment |
Bearer JWT-Token |
attached reviewer | approver |
The API requires a header Accept to be submitted with the request:
{
"Accept": "application/json",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..."
}
{
"body": "Hi there"
}
Condition : The current request state must be awaiting_review or awaiting_approval
Condition : The requesting user must be one of the corresponding request reviewers or an approver
Code : 200 Okay
Content example : Response will reflect back the created request. The request is
the active request which is the latest created revision of the request.
{
"id": "6309c712-16f0-496b-afc3-b9400bd4eed3",
"field": null,
"body": "Hi there",
"commenter": {
"id": "0c877865-6c51-4d93-af30-7eb720932e14",
"firstName": "Firstname",
"lastName": "Lastname"
},
"created_at": "2021-01-13T20:15:36.000000Z",
"updated_at": "2021-01-13T20:15:36.000000Z"
}
Condition : If the current request is not in the awaiting_review or awaiting_approval state
Condition : If the requesting user is not the corresponding request reviewer
Condition : If the requesting user is not an approver
Code : 403 Unauthorized
Content example :
{
"message": "You're not allowed to comment on this item"
}