OpenFolia

List locks

GET
/locks

Who holds which module or manual, for which change set; newest first. Only locks whose subject, as committed on its change set's branch, lies within the reader's content.read.draft scope are listed (and counted); a subject with nothing committed only for a reader of all of its language (a module) or manuals of every audience. Without content.read.draft, only the caller's own locks, within their content.read scope (authors always see their own work).

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[holder]?string

Only locks held by this user (or service) ID.

Length1 <= length <= 200
filter[changeSet]?string

Only locks of this change set (its ID).

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
filter[subject]?string

Only the lock on this subject: module/<lang>/<moduleId>, manual/<manualId>, config or term/<termId>, e.g. module/en/battery-charging.

Lengthlength <= 300
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/locks'
Example Response
{  "data": [    {      "type": "Lock",      "id": "string",      "attributes": {        "subject": {          "type": "module",          "lang": "string",          "moduleId": "string"        },        "holder": {          "kind": "user",          "id": "string"        },        "since": "2019-08-24T14:15:22Z"      },      "relationships": {        "changeSet": {          "data": {            "type": "ChangeSet",            "id": "string"          }        }      }    }  ],  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    }  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}