Up - API Reference - Home
Requires JWT.
Get schema items in bulk using the selection
parameter.
Results are paginated using a cursor.
Learn more about the selection
parameter and responses to bulk requests.
POST /api/p/<project gid>/schema/bulk/get
Authorization: Bearer <JWT>
{
"selection": [
"<gid-1>",
"<gid-2>",
"<gid-3>",
{
"search": {
"language": "nl",
"q": "+cms 225",
"filter": ["is_committed", "is_false", null],
},
"exclude": ["<gid-a>", "<gid-b>", "<gid-c>"]
},
],
"page.cursor": <cursor-returned-from-previous-request>,
"page.size": 100,
}
selection
is the selection of schema items to get.
page.cursor
must not be present for the first request, and must contain the returned value of the previous request for pagination.
page.size
(default 100) only return this many schema items.
You'll get a list of schema items and a cursor to fetch the next page.
Authorization: <JWT>
{
"success": true,
"result": {
"schema_items": [
{"type": "definition", "item":"96ec02b2-fb8d-4fb4-b952-fad0c4b88a74"},
{"type": "definition", "item":"33ef3a7d-66c5-4b2f-b5c1-1913a0497040"},
{"type": "class", "item":"05ab1fdf-35f7-4fbe-b75f-7d7e9c0dcdad"},
{"type": "field", "item":"4c7c3261-bba4-489b-b3b6-e80278324743"},
…
],
"schema_items.size": 17,
"page.cursor": <a-cursor-value>,
},
"data": {
"definitions": {
"96ec02b2-fb8d-4fb4-b952-fad0c4b88a74": {
…
},
…
},
"classes": { … },
"fields": { … },
}
}
schema_items
paginated results for the bulk fetch
schema_items.size
the size of the non-paginated results for the bulk fetch
page.cursor
a cursor value to be used in the next requests - if it is null
, there are no more results available.
schema_items
is a list where each item has a type
and an item
key. The type is one of definition
, class
, or field
. The item holds a gid that can be used together with the type to find the item in the data.
Note: if the
selection
parameter contains invalid schema gids, the number of returned schema items may not match the requested page size. The total size initially includes the invalid gids, but when they are in the current page, the total size is amended -- this means theschema_items.size
is not necessarily constant during pagination.
definitions
Definition info with name, classes, fields. Unordered.
classes
Class info with name, fields. Unordered.
fields
Field info with name, type, options. Unordered.
400
Bad request - missing parameters or wrong type or value
401
Unauthorized - missing or expired JWT
403
Forbidden - not a member of this project
1006
Selection error - selection or cursor parameter is invalid