OpenFolia

Builds a condition holds for

GET
/variants/matches

Every variant combination a manual the reader may see lists (variants: in its manifest) that the condition holds for, in the order GET /manuals lists the manuals, then in the manifest’s order: meta.page.total is the number of builds it appears in. Evaluated as a manual is resolved: versions compare numerically (2.10 > 2.9, 2.3 = 2.3.0), and a test on an attribute a combination does not set does not hold, not even negated. Manuals outside the reader’s scope are never named nor counted; one whose manifest cannot be read lists none.

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

when*string

A condition, as a variant block's when="…" writes it in AsciiDoc: model in (large, small), software >= 2.3 (<, <=, >, >= on version attributes), !(…), && (binds tighter) and ||, parentheses; a value that is not letters, digits, ., _ and - in single quotes. At most 1000 characters.

Lengthlength <= 1000
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.

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/variants/matches?when=model+in+%28large%29+%26%26+software+%3E%3D+2.3'
Example Response
{  "data": [    {      "type": "VariantBuild",      "id": "string",      "attributes": {        "values": {          "property1": "string",          "property2": "string"        }      },      "relationships": {        "manual": {          "data": {            "type": "Manual",            "id": "string"          }        }      },      "meta": {        "slug": "string",        "label": "string",        "manualTitle": "string"      }    }  ],  "meta": {    "page": {      "currentPage": -9007199254740991,      "lastPage": -9007199254740991,      "perPage": -9007199254740991,      "total": -9007199254740991    }  },  "links": {    "self": "string",    "first": "string",    "last": "string",    "prev": "string",    "next": "string"  }}