OpenFolia

List change sets

GET
/change-sets

Change sets, newest first: every one for a holder of the content.read.draft permission, only the caller's own for anyone else (authors always see their own work; another author's filter then lists nothing). Each says in meta.branchMissing whether its branch is gone from the content repository. meta.counts counts the change sets of each state the other filters leave, as the reader sees them, for a list's state filters.

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.

Query Parameters

filter[state]?string

Only change sets in this state: draft, in-review, approved, merged or abandoned.

Value in"draft""in-review""approved""merged""abandoned"
filter[author]?string

Only change sets started by this user (or service) ID.

Length1 <= length <= 200
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'
Example Response
{  "data": [    {      "type": "ChangeSet",      "id": "string",      "attributes": {        "title": "string",        "description": "string",        "state": "draft",        "author": {          "kind": "user",          "id": "string"        },        "baseRef": "string",        "baseCommit": "string",        "branch": "string",        "reviewHead": "string",        "mergeCommit": "string",        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z"      },      "meta": {        "branchMissing": true,        "behind": 0,        "base": {          "state": "current"        },        "supersededBy": "string",        "supersedes": "string"      }    }  ],  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    },    "counts": {      "draft": 0,      "in-review": 0,      "approved": 0,      "merged": 0,      "abandoned": 0    }  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}