OpenFolia

Where a change set’s review stands

GET
/change-sets/{changeSetId}/review

Read only: every approval it needs (required: the review, and a sign-off for each restricted module type it changes), the approvals of its review head (of its branch’s head while a draft) and what is still pending, and the approvals that lapsed (their approver lost the role or scope), all as approve, sign-off and merge judge them; granted is always empty. The change set is found as GET /change-sets/{changeSetId} finds it. Needs content.read.draft, as reviewing does.

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

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*
meta*
Example Request
curl -X GET 'http://localhost:3000/change-sets/497f6eca-6276-4993-bfeb-53cbbbba6f08/review'
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": {    "review": {      "required": [        "string"      ],      "granted": [        "string"      ],      "pending": [        "string"      ],      "approvals": [        {          "requirement": "string",          "approver": {            "kind": "user",            "id": "string"          },          "head": "string",          "self": true,          "at": "2019-08-24T14:15:22Z"        }      ],      "lapsed": [        {          "requirement": "string",          "approver": {            "kind": "user",            "id": "string"          },          "head": "string",          "self": true,          "at": "2019-08-24T14:15:22Z"        }      ],      "selfApproved": true,      "selfApproval": "never",      "yours": true    }  }}