Retrieve all assets

GET {{baseUrl}}/:tenant/assets?pageNumber=1&pageSize=16&sort=name,metadata.createdAt:desc&q=name:{name}

Preview

Retrieves all assets assigned to the tenant. You can filter, sort and paginate the results with query parameters.


### Required scopes * media.asset_read

Request Params

KeyDatatypeRequiredDescription
pageNumbernumberThe page number to be retrieved where the size of the pages must be specified by the pageSize parameter.
The number of the first page is 1.
pageSizenumberThe number of documents being retrieved on the page.
sortstringFields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case.
qstringA standard query parameter is used to search for specific values.
  • Searching for items by string-based properties:
    • By field value: q=access:PUBLIC, where access is the field name and PUBLIC is its desired value.
  • Searching for items by number-based property:
    • With a specific value: q=details.bytes:200
    • With a value greater than: q=details.bytes:>200
    • With a value lower than: q=details.bytes:<200
    • With a value greater than or equal to: q=details.bytes:>=200
    • With a value lower than or equal to: q=details.bytes:<=200
    • With a value within a range of values: q=details.bytes:(>=100 AND <=200)
      where details.bytes is name of number-based field and 200 is it's querying value.
  • Searching for items by date-based property: All numer-based property queries are valid also for dates. In that case the date should be placed within double quotes: q=metadata.createdAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
  • Searching for items with a nonexistent or empty property: q=details.filename:null, where details.filename is the field that has its value set to null.
  • Searching for items with an existing property: q=details:exists, where details is the field that has a non-empty value.
  • Searching for items by multiple specific values: q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), where id is the field name, and strings within the bracket are the desired values.
  • Searching for items by multiple fields: q=id:5c3325baa9812100098ff48f access:PUBLIC where id and access are field names. All objects that contain the specified values are returned. Multiple fields (separated by space) can be specified. Multiple values for each field can also be specified in a format presented earlier.
  • Searching for items with string-based properties conforming to a regex: q=id:~ABCD12 or q=id:(~AB CD) - in case of searching for strings with space, where id is the name of field and ABCD12 or AB CD is its querying regex. |

HEADERS

KeyDatatypeRequiredDescription
X-Total-CountbooleanIn order to get information how many entities meet a filter requirements, X-Total-Count header has been introduced. The header is optional and its default value is false. It the header is provided and it is true then total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). In other words, the information about total count is returned on demand, depending of an existence of X-Total-Count header in a request. Therefore, the X-Total-Count header is not returned if an API consumer didn’t ask for it.
Acceptstring

RESPONSES

status: OK

[{"id":"123e06ecf0452c2d6c0b81390","type":"BLOB","access":"PUBLIC","url":"https://api.emporix/tenant/id/download","details":{"filename":"public.txt","mimeType":"text/plain"},"refIds":[{"id":"123e06ecf0452c2d6c0b81392","type":"CATEGORY"}],"metadata":{"createdAt":"2022-03-31T13:18:02.379Z","modifiedAt":"2022-03-31T13:18:02.379Z","version":1}},{"id":"123e06ecf0452c2d6c0b81390","type":"LINK","access":"PUBLIC","url":"https://emporix.io/docs/index.html","metadata":{"createdAt":"2022-03-31T13:18:02.379Z","modifiedAt":"2022-03-31T13:18:02.379Z","version":1},"refIds":[{"id":"123e06ecf0452c2d6c0b81392","type":"CATEGORY"}]}]