Count
Count works or individual objects using ContexQL query.
info
Available in Contextal Platform 1.0 and later.
Request
- Path:
/api/v1/count
- Verb:
GET
- URL parameters:
q
: the ContexQL query stringgetobjects
: requests the query to return count of objects rather than works (optional, default false)
- URL parameters:
- Verb:
POST
orPUT
- Content-Type:
application/json
- Body: JSON object with the same content as the URL parameters above
- Content-Type:
Reply
On success:
- Status:
200 - Ok
- Content-Type:
application/json
- Body: A JSON object containing the matching items count
On failure:
- Status: 400
- Content-type: text/plain
note
This indicates an error in the HTTP request e.g. wrong content-type, broken json, etc.
- Content-type: application/json
note
This indicates either a compile time or runtime error; the kind key of the object in the body will clarify what the problem was.
-
Status: 5xx
Platform is in trouble, try again later.