Query assets
| /dam/assets/query Gets list of asset tids by allowed criteria |
Allows to get assets tids by:
-
By modification date (from/until)
-
By file type
-
By directory
Tip: Criteria combined with AND operator.
Resource path |
/api/core/v1/dam/assets/query |
HTTP method |
POST |
Request content type |
application/json; |
Response content type |
application/json; |
Body parameters
Accepts AssetQuery
Return Type
Filled with asset tids AssetRequest
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Found assets ids |
|
400 |
Invalid input error ResponseType |
|
500 |
Error in ResponseType |
Samples
Query asset by modified dates, asset discriminator, parent directory
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/dam/assets/query' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"modifiedFrom": "2022-12-09T08:33:09.734Z",
"modifiedUntil": "2022-12-12T08:33:09.734Z",
"fileTypes": [
"IMG"
],
"directory": {
"path": "/MAM/dir1/dir2/dir3"
}
}
'
Request body examples:
Request assets with type IMG, in specified directory limited by modification dates range
{
"modifiedFrom": "2022-12-09T08:33:09.734Z",
"modifiedUntil": "2022-12-12T08:33:09.734Z",
"fileTypes": [
"IMG"
],
"directory": {
"path": "/MAM/dir1/dir2/dir3"
}
}
Request asset in directory by tid
{
"directory": {
"tid": "DBF6D18D-6CB4-4765-8966-10000DD22A6E"
}
}
Request asset in directory by id
{
"directory": {
"id": 74628354
}
}
Request asset in directory by path
{
"directory": {
"path": "/MAM/rootDirectory/childDirectory"
}
}
Response body
{
"tids": [
"8E93BA7A-0521-4FB2-A7B7-40941C7A5AFA",
"218BCAED-A63B-4CE4-B23F-42B479E4E9FB",
"C3617CA4-0869-4A60-9CDC-32DCA0322F63",
"2BA8E460-964E-4197-9292-1E4365B29386",
"5BD22A27-7C2E-49B9-B90F-00F209900480",
"A168315F-24BF-4EF3-8BF9-619C71502D42",
"C9229729-D0D6-4CDA-92C8-3B916D1B4F85",
"2ABE86E5-6261-4BBF-A30B-235964B6EDBD",
"365F8ED1-1B75-4218-824A-E0B394D1DFEE",
"2312639C-F5D7-4F82-BEEF-4DD5E9668425",
"8195578A-AB9D-4BFD-9B86-2519E0A74E85",
"FC2E1C48-5904-4754-9E4E-8032ABE6949C",
"599641D5-7637-46DB-97BC-635F915C188A",
"D1019EE5-F1E0-49FA-8C2B-AD7FE3F8402C",
"6BD4B93B-2F35-4B9F-909E-974443B7C96B",
"DA32F94E-98B8-4F62-B588-EE804D97717B",
"08E3AF9C-1D28-4962-9C82-4E54633A9A4B",
"F008FE89-7372-4C17-83AB-670A664B57D9",
"95E7D312-1C4B-43BF-93C9-2219248ABF33",
"A905D075-8312-49EA-AB09-65D6FDBEE573",
"19F2C143-68D0-410C-BC24-53B33B70D270"
],
"retrieveHistory": false,
"retrievePreviews": false
}