POST /api/v2/it_asset_management/assets/search
Returns an array of assets that meet the complex search and filter criteria. For simple searches limited to text fields, use the Search Assets API endpoint instead.
Filters can contain either an individual comparison object or an array of comparison objects within logical namespaces.
A filter is a JSON object that has the following properties:
| Name | Type | Required | Description |
|---|---|---|---|
| ATTRIBUTE | object | no | A comparison object specifying an attribute value condition to be met for assets to match. Examples are marked below. |
| $and | array | no | Array of comparison objects combined using logical AND |
| $or | array | no | Array of comparison objects combined using logical OR |
Examples
{
"filter": {
"model": { "$eq": "MacBook Pro" } // ATTRIBUTE (standard field)
}
}
{
"filter": {
"custom_object_fields.ip_address": { "$eq": "192.168.1.1" } // ATTRIBUTE (custom field)
}
}
// $or
{
"filter": {
"$or": [
{ "model": { "$eq": "MacBook Pro" } }, // ATTRIBUTE
{ "model": { "$eq": "ThinkPad X1" } } // ATTRIBUTE
]
}
}
Comparison Object
A comparison object is essentially an 'if' statement that returns all asset records that meet the specified condition. Conditions are based on attribute values.
A comparison object is a JSON object that has the following properties:
| Name | Type | Required | Description |
|---|---|---|---|
| FIELD_KEY | string | yes | To filter on a custom asset field, you must prepend custom_object_fields. on the field key. For example: custom_object_fields.ip_addressThe following standard asset fields can be used without needing to prepend a namespace: asset_type, user, organization, location, model, purchase_date, status |
| OPERATOR | string | yes | A comparison operator, such as $eq |
| VALUE | string, array | yes | The value you're filtering for |
- Date values should be in ISO 8601 format.
Pagination
- Cursor pagination only.
- Returns the assets sorted by relevancy with page limits. Requests with a
sortparameter return all assets; requests without asortparameter return the first 10,000 assets only.
Allowed For
- Agents
Servers
- https://{subdomain}.{domain}.com
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
page[after] |
String | No |
A pagination cursor that tells the endpoint which page to start on. It should be a |
query |
String | No |
Lists the search terms, separated by a space, used to identify the asset records. |
page[before] |
String | No |
A pagination cursor that tells the endpoint which page to start on. It should be a |
sort |
String | No |
Orders the returned records by: |
page[size] |
Integer | No |
Specifies how many assets should be returned in the response, up to 100 assets per page. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.