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:

NameTypeRequiredDescription
ATTRIBUTEobjectnoA comparison object specifying an attribute value condition to be met for assets to match.

Examples are marked below.
$andarraynoArray of comparison objects combined using logical AND
$orarraynoArray 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:

NameTypeRequiredDescription
FIELD_KEYstringyesTo filter on a custom asset field, you must prepend custom_object_fields. on the field key. For example: custom_object_fields.ip_address

The following standard asset fields can be used without needing to prepend a namespace: asset_type, user, organization, location, model, purchase_date, status
OPERATORstringyesA comparison operator, such as $eq
VALUEstring, arrayyesThe value you're filtering for

Pagination

Allowed For

Servers

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 meta.after_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request

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 meta.before_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request

sort String No

Orders the returned records by: name, created_at, or updated_at. Defaults to sorting by relevance. Prepending - (-name, -created_at, or -updated_at) sorts the results in descending order by that value.

page[size] Integer No

Specifies how many assets should be returned in the response, up to 100 assets per page.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.