Comment on a block, or reply to a thread
A new thread on a block of a module (attributes.subject and attributes.blockId: a block, list item or procedure step in the module at the change set’s head or at its base, as the reader sees it), or a reply to a thread (relationships.thread: its first comment), on the thread’s block. Only the change set’s author, or a reviewer holding content.review in a role that covers the module (403 otherwise, one answer whatever the reason), and only on an open change set (draft, in-review or approved). Recorded with a comment.create audit event (the change set, module, block and head; never the text). The anchor is the block’s ID: the comment stays on the block while it is edited or moved, and stays, meta.orphaned, once a save point removes it. Needs the content.read permission.
bearerAuthorizationBearer <JWT>A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.
changeSetId*stringThe change set’s ID (a UUID). One that names no change set, malformed or not, is 404.
uuidX-Ccms-User?stringDemo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).
application/vnd.api+json- body
data*application/vnd.api+json- response
data*curl -X POST 'http://localhost:3000/change-sets/497f6eca-6276-4993-bfeb-53cbbbba6f08/comments' \ -H 'Content-Type: application/vnd.api+json' \ -d '{ "data": { "type": "Comment", "attributes": { "body": "string" } }}'{ "data": { "type": "Comment", "id": "string", "attributes": { "subject": { "type": "module", "lang": "string", "moduleId": "string" }, "blockId": "string", "body": "string", "author": { "kind": "user", "id": "string" }, "commit": "string", "createdAt": "2019-08-24T14:15:22Z", "resolvedAt": "2019-08-24T14:15:22Z", "resolvedBy": { "kind": "user", "id": "string" } }, "relationships": { "changeSet": { "data": { "type": "ChangeSet", "id": "string" } }, "thread": { "data": { "type": "Comment", "id": "string" } } }, "meta": { "orphaned": true, "deleted": true, "editedAt": "2019-08-24T14:15:22Z" } }}