Up - API Reference - Home
Requires JWT.
Get assets 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>/assets/bulk/get
Authorization: Bearer <JWT>
{
"selection": [
"<gid-1>",
"<gid-2>",
"<gid-3>",
{
"children": "<gid-9>",
"exclude": ["<gid-x>", "<gid-y>", "<gid-z>"],
},
{
"search": {
"language": "nl",
"q": "+cms 225",
"filter": ["type", "is", "image"],
},
"exclude": ["<gid-a>", "<gid-b>", "<gid-c>"]
},
],
"page.cursor": <cursor-returned-from-previous-request>,
"page.size": 100,
}
selection
is the selection of assets 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 assets.
You'll get a list of assets and a cursor to fetch the next page.
Authorization: <JWT>
{
"success": true,
"result": {
"assets": [
"96ec02b2-fb8d-4fb4-b952-fad0c4b88a74",
"7c136ddb-4dfa-4ec1-bad4-15067cbf80d9",
"726427c2-8c72-4d2e-a09b-937a6f16d3c0"
],
"assets.size": 17,
"page.cursor": <a-cursor-value>,
},
"data": {
"assets": {
"96ec02b2-fb8d-4fb4-b952-fad0c4b88a74": {
…
},
…
}
}
}
assets
the requested assets.
assets.size
the total number of assets in the selection.
page.cursor
a cursor value to be used in the next requests - if it is null
, there are no more results available.
Note: if the
selection
parameter contains invalid asset gids, the number of returned assets 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 theassets.size
is not necessarily constant during pagination.
assets
Asset info with hierarchy, type, name.
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