Search Configuration Items

Perform a paginated search across configuration items with filtering and sorting options. Returns a list of configuration items that match the search criteria.

Special Access Rules 

To query configuration items, you must have the following user permissions:

  • IT Service Configuration Item Type Manager
  • IT Service Configuration Item Owner
  • IT Service Configuration Item Type Reader

Request 

JSON example 

1query SearchCI {
2  searchCI(
3    searchObject: {
4      pageSize: 10
5      filters: [
6        {
7          field: ci_tags_key_value_id
8          operator: EQUALS
9          values: ["764952:859952"]
10        },
11        {
12          field: first_discovered_on
13          operator: GREATER_THAN
14          values: ["1700000000000"]
15        }
16      ]
17      sort: [
18        {
19          sortKey: SD_ApNa
20          sortOrder: ASC
21        }
22      ]
23      cursor_position: "W251bGwsIjE3NjE4MDQ1OTExMzYiLCIzMjc2ODAxIl0="
24    }
25  ) {
26    totalCount
27    pageSize
28    next_cursor
29    hasMoreRecords
30    data {
31      id
32      CustomAttributeField
33      SD_Co
34      SD_LoBaPo
35      SD_LoBaSt
36      SD_SeSt
37      SD_LaTeAr
38      SD_AuScGrN
39      SD_DeCa
40      ciTags {
41        totalElements
42        ciTags {
43          tagId
44          tagValueId
45        }
46      discoveryInformation {
47        firstDiscoverdBy
48        firstDiscoveredOn
49      }
50    }
51  }
52}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
searchObjectSearchObjectAn object containing filter criteria, pagination parameters, and sort options for the search query.Required66.0

SearchObject Properties 

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
cursor_positionStringA Base64-encoded cursor string used for pagination. Use the next_cursor value from the previous response to fetch the next page of results.Optional66.0
filtersFilterCriteriaAn array of filter criteria objects that define the conditions to apply when searching configuration items.Optional66.0
pageSizeIntegerThe maximum number of configuration item records to return in each page of results. If not specified, the value defaults to 10 records per page. The maximum value is 20.Optional66.0
sortSortCriteriaAn array of sort criteria objects that specify how to order the search results.Optional66.0

FilterCriteria Properties 

Use FilterCriteria to filter search results based on field values.

1{
2  "field": "id",
3  "operator": "EQUALS",
4  "values": [
5    "101020"
6  ]
7}
NameTypeDescriptionRequired or OptionalAvailable Version
fieldSearchableField (enumeration of type string)The field name to use for filtering the search results. For valid values, see Valid field Values.Required66.0
operatorFilterOperator (enumeration of type string)The comparison operator to use for filtering. For valid values, see Valid operator Values.Required66.0
valuesArray of StringAn array of values to match against the specified field. For EQUALS provide exactly one value. For IN provide one or more values.Required66.0

Valid field Values

In addition to the fields listed in the table, you can search on any custom attribute marked as filterable in the UI.

Note

ValueLabel
idUnique ID
ci_tags_key_value_idTag Key+Value Pair, or Key-Only Tag. Valid operator values: EQUALS, NOT_EQUALS, IN, and NOT_IN.
ci_tags_key_idTag Key Only. Valid operator values: EQUALS and NOT_EQUALS.
ci_typeConfiguration item yype
ci_type_developer_nameConfiguration item type developer name
created_atCreated time
created_by_sourceSource that created the configuration item. Valid operator values: EQUALS, NOT_EQUALS, IN, and NOT_IN.
first_discovered_onFirst discovery date. Valid operator values: GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, IS_BETWEEN, and NOT_BETWEEN.
first_discovered_byFirst discoverer. Valid operator values: EQUALS, NOT_EQUALS, IN, and NOT_IN.
last_discovered_byLast discoverer. Valid operator values: EQUALS, NOT_EQUALS, IN, and NOT_IN.
last_discovered_onLast discovered date. Valid operator values: GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, IS_BETWEEN, and NOT_BETWEEN.
last_discovery_source_nameDiscovery source name. Valid operator values: EQUALS, NOT_EQUALS, IN, and NOT_IN.
last_discovery_source_timestampDiscovery source timestamp. Valid operator values: GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, IS_BETWEEN, and NOT_BETWEEN.
updated_atLast modified time
SD_ApNaApplication name
SD_AsIdAsset ID
SD_AsNaAsset name
SD_AwLoBaNAWS load balancer name
SD_CiLoConfiguration Item Location
SD_CiOwConfiguration Item Owner
SD_CiOwGrConfiguration Item Owner Group
SD_CoCompany
SD_DeIdDevice ID/Deployment ID
SD_DeLoDevice Location
SD_DeMaNaDevice Manufacturer Name
SD_DeMoNaDevice Model Name
SD_DeNaDevice Name
SD_DeSeNuDevice Serial Number
SD_DeDescription
SD_DnHoNaDNS Host Name
SD_EsNaESXi Name
SD_GrNaGroup Name
SD_HaVeHardware Vendor
SD_HoNaHost Name
SD_ImNuIMEI Number
SD_InNaInstance Name
SD_InOwInstance Owner
SD_IpAdIP Address
SD_LiPrNaLicense Product Name
SD_MaManufacturer
SD_MeMaMemory Manufacturer
SD_MoNuModel Number
SD_NeHoNetwork Host
SD_NeInNaNetwork Interface Name
SD_NoNaNode Name
SD_OpSyOperating System
SD_OsTyOS Type
SD_OsVeOS Vendor
SD_PrDnNaPrivate DNS Name
SD_PrIpAdPrivate IP Address
SD_PrNaProcess Name/Processor Name
SD_PuDnNaPublic DNS Name
SD_PuIpAdPublic IP Address
SD_ReRegion
SD_SeNuSerial Number
SD_SeIpAdServer IP Address
SD_SeNaServer Name
SD_SoNaSoftware Name
SD_WeNaWebsite Name
SD_WeTiWebsite Title
SD_StStatus
SD_OsClOS Class
SD_UsuUsedBy (User)
SD_UsuGrUsedBy (User Group)
SD_MaAdMAC Address

Valid operator Values

ValueDescription
CONTAINSMatches if the field contains the specified value. Use with exactly one value in the values array.
ENDS_WITHMatches if the field value ends with the specified value. Use with exactly one value in the values array.
EQUALSMatches a single exact value. Use with exactly one value in the values array.
GREATER_THANMatches if the field value is greater than the specified value. Use with exactly one value in the values array.
GREATER_THAN_OR_EQUALMatches if the field value is greater than or equal to the specified value. Use with exactly one value in the values array.
INMatches any value in a list. Use with multiple values in the values array.
IS_BETWEENMatches if the field value is between two specified values (inclusive). Use with exactly two values in the values array.
IS_EMPTYMatches if the field is empty or null. The values array should be empty or omitted.
LESS_THANMatches if the field value is less than the specified value. Use with exactly one value in the values array.
LESS_THAN_OR_EQUALMatches if the field value is less than or equal to the specified value. Use with exactly one value in the values array.
NOT_BETWEENMatches if the field value is not between two specified values (inclusive). Use with exactly two values in the values array.
NOT_CONTAINSMatches if the field does not contain the specified value. Use with exactly one value in the values array.
NOT_EMPTYMatches if the field is not empty or null. The values array should be empty or omitted.
NOT_EQUALSDoes not match a single exact value. Use with exactly one value in the values array.
NOT_INDoes not match any value in a list. Use with multiple values in the values array.
STARTS_WITHMatches if the field value starts with the specified value. Use with exactly one value in the values array.

SortCriteria 

Use SortCriteria to specify how search results should be ordered.

1{
2  "sortKey": "SD_ApNa",
3  "sortOrder": "ASC"
4}
NameTypeDescriptionRequired or OptionalAvailable Version
sortKeysortFields (enumeration of type string)The field name to use for sorting the search results. Valid values are the same as for the field parameter. See Valid field Values.Required66.0
sortOrderSortOrder (enumeration of type string)The sort direction for the results. Values are ASC (Ascending) or DESC (Descending).Required66.0

Response 

JSON example 

This example is a sample response from the searchCI query.

1{
2  "data": {
3    "searchCI": {
4      "totalCount": 50,
5      "hasMoreRecords": true,
6      "lastModifiedOn": "1764831587989",
7      "data": [
8        {
9          "id": 19026901,
10          "name": "Phoenix Server",
11          "discoveryInformation": {
12            "firstDiscoveredBy": "AWS",
13            "firstDiscoveredOn": 1710000000000
14          },
15          "ciTags": {
16            "totalCount": 2,
17            "ciTags": [
18              {
19                "keyId": 764952,
20                "valueId": 859952
21              },
22              {
23                "keyId": 764953,
24                "valueId": 859953
25              }
26            ]
27          }
28        },
29        {
30          "id": 19026902,
31          "name": "Atlas Server",
32          "ciTags": {
33            "totalCount": 1,
34            "ciTags": [
35              {
36                "keyId": 764952,
37                "valueId": 859952
38              }
39            ]
40          }
41        }
42      ]
43    }
44  }
45}

Properties 

NameTypeDescriptionAvailable Version
totalCountIntegerThe total number of configuration item records that match the search criteria across all pages, regardless of pagination.66.0
hasMoreRecordsBooleanIndicates whether additional pages of results are available. Returns true if there are more records beyond the current page, false if this is the last page.66.0
data[CI]An array of configuration item objects returned for the current page of results. Each object contains the fields requested in the query for matching configuration items.66.0
lastModifiedOnStringThe date and time the record was last updated.68.0

When using the searchCI operation, you can request any available attribute to be included in the response. The attributes you can include:

  • Standard Attributes: Many attributes are available out-of-the-box.
  • Custom Attributes: You can create and include custom attributes using the sObject API.

Add any attribute using its Developer Name (for example, SD_AsNa—Asset Name) to specify exactly which information you want to receive for your Configuration Items (CIs).

Note