OpenFolia

List terms

GET
/terms

The terms at ?ref=, by ID. The filters run before paging, and meta.page.total counts what they let through. Without a filter, a file in terms/ that is no term is listed too (UnreadableTermResource, with meta.error); a filter leaves such files out. Terms carry no audience: every reader of the ref reads them, in every language.

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

Only terms holding this language (a language tag); filter[q] then looks in it only.

Match^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$
filter[status]?string

Only terms of this status: proposed, approved, deprecated.

Value in"proposed""approved""deprecated"
filter[domain]?string

Only terms of this domain, case, diacritics and runs of white space aside.

Length1 <= length <= 100
filter[q]?string

1 to 200 characters after trimming: part of one of a term’s variants (preferred, allowed or forbidden) or of its definition, folded as GET /search folds (case, diacritics and runs of white space aside).

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
ref?string

Branch, tag or commit ID to read from. Default: the server's CCMS_DEFAULT_REF.

Response Body

application/vnd.api+json
  1. response
data*array<|>
meta*
links*
Example Request
curl -X GET 'http://localhost:3000/terms'
Example Response
{  "data": [    {      "type": "Term",      "id": "string",      "attributes": {        "schemaVersion": 1,        "status": "proposed",        "domain": "string",        "replacedBy": "string",        "languages": {          "property1": {            "preferred": "string",            "allowed": [],            "forbidden": [],            "definition": [              {                "type": "text",                "text": "string",                "marks": [                  {                    "type": "strong"                  }                ]              }            ],            "usage": "string"          },          "property2": {            "preferred": "string",            "allowed": [],            "forbidden": [],            "definition": [              {                "type": "text",                "text": "string",                "marks": [                  {                    "type": "strong"                  }                ]              }            ],            "usage": "string"          }        }      },      "meta": {        "issues": [          {            "severity": "error",            "code": "string",            "message": "string",            "at": "string"          }        ]      }    }  ],  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    }  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}