The following macros are not currently supported in the header:
- style
List Assets
Under Construction
The assets endpoints and documentation is still under construction.
The following endpoint can be used to retrieve an array of assets.
GET /assets
Parameters
Table of allowed parameters.
_fields | partial string | Allows you to specify optional fields and linked objects to include in the response. Please see get asset for information on what default and optional fields are available. |
---|---|---|
_filters | partial string | Allows you to filter what assets you want to return. See "Filters" below for a list of available filters. |
Handling the response
Please see Get Asset on how to handle the response.
Filters
Type | Fields | Example | Description |
---|---|---|---|
IN | id, standing, type_id, affiliation_id, manager_id and address_id | "id(12,10),standing_not(inactive)" to get assets 12 and 10 if not inactive. | The IN filter can be used to match items that match or do not match one of the given values. |
AGAINST | - | "against(company(1,23),issue(10))" to get assets against company 1 or 23 and issue 10. | The against filter can be used to get assets against the given objects. |
SEARCH | - | "_search=Search this" to search assets with title matching the query. | Search assets with a given string query. |
RANGE | id, type_id, affiliation_id, manager_id, address_id | "id_greater_than(10),id_less_than_or_equal(100) " to get assets from 11 to 100 inclusively. | Filter assets by numerical ranges. |
DATE | date_created | "date_created_before(<unix timestamp>),date_created_after(<unix timestamp>)" for assets created before or after a given date. You can also check if an asset occurred on a specific day with "date_created(<unix timestamp>)" | Filter assets by the date they were created |
ORDER | id, date_created and standing | "order_by_asc(id)" to order by asset ID ascending or "order_by_desc(standing) " to order by standing descending order. | Order the assets returned by a given value and direction |