OpenFolia

List a change set’s comments

GET
/change-sets/{changeSetId}/comments

Comments on blocks of the change set’s modules, in thread order: threads by when they were started, each followed by its replies, oldest first. Resolved threads are hidden unless filter[resolved] asks for them. Each says in meta.orphaned whether its block is gone from the change set’s head (named in meta.head). The change set is found as GET /change-sets/{changeSetId} finds it (another author’s is 404, exactly like a missing one, for an actor without content.read.draft). A comment is there for a reader who sees its module: at the change set’s head where it is there, else at its base; a module on neither side any more only for a reader of all of its language. Any other is 404, exactly like a missing one. Comments the reader may not see are neither listed nor counted. Needs the content.read permission.

Authorization

bearer
headerAuthorizationBearer <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.

Path Parameters

changeSetId*string

The change set’s ID (a UUID). One that names no change set, malformed or not, is 404.

Formatuuid

Query Parameters

filter[module]?string

Only comments on this module: <lang>/<moduleId>, e.g. en/battery-charging.

Lengthlength <= 200
filter[block]?string

Only comments on this block ID.

Match^[a-z_][a-z0-9_-]*$
Lengthlength <= 64
filter[resolved]?string

false (the default): open threads only; true: resolved threads only; any: both. A reply goes with its thread.

Value in"true""false""any"
page[number]?integer

Page to return, from 1. Default: 1.

Range1 <= value
page[size]?integer

Resources per page. Default: 50, at most 200.

Range1 <= value <= 200

Header Parameters

X-Ccms-User?string

Demo 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).

Response Body

application/vnd.api+json
  1. response
data*array<>
meta*
links*
Example Request
curl -X GET 'http://localhost:3000/change-sets/497f6eca-6276-4993-bfeb-53cbbbba6f08/comments'
Example Response
{  "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"      }    }  ],  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    },    "head": "string"  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}