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 a configuration item, you must have the following user permissions:

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

See Also

Request 

JSON example 

1query SearchConfigurationItem {
2  searchConfigurationItem(
3    search: {
4      pageSize: 10
5      filters: [
6        {
7          field: CI_TAGS_KEY_VALUE_ID
8          operator: EQUALS
9          values: ["764952:859952"]
10        }
11      ]
12      sort: [
13        {
14          sortKey: SD_ApNa
15          sortOrder: ASC
16        }
17      ]
18      nextPageCursor: "W251bGwsIjE3NjE4MDQ1OTExMzYiLCIzMjc2ODAxIl0="
19    }
20  ) {
21    totalCount
22    pageSize
23    nextPageCursor
24    hasMoreRecords
25    cnfgItemDetails {
26      id
27      CustomAttributeField
28      SD_Co
29      SD_LoBaPo
30      SD_LoBaSt
31      SD_SeSt
32      SD_LaTeAr
33      SD_AuScGrN
34      SD_DeCa
35      cnfgItemTags {
36        totalTags
37        cnfgItemTags {
38          keyId
39          valueId
40        }
41      discoverySourceDetails {
42        firstDiscoverdBy
43        firstDiscoveredOn
44      }
45    }
46  }
47}

Properties 

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

Search Properties 

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
filtersFiltersAn array of filter criteria objects that define the conditions to apply when searching configuration items.Optional67.0
nextPageCursorStringA Base64-encoded cursor string used for pagination. Use the next_cursor value from the previous response to fetch the next page of results.Optional67.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.Optional67.0
sortSortAn array of sort criteria objects that specify how to order the search results.Optional67.0

Filters 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
fieldStringThe field name to use for filtering the search results. For valid values, see Valid field Values.Required67.0
operatorStringThe comparison operator to use for filtering. For valid values, see Valid operator Values.Required67.0
valuesStringAn array of values to match against the specified field. For EQUALS provide exactly one value. For IN provide one or more values.Optional67.0
fromValueStringThe first value for range operators.Optional67.0
toValueString[]The second value for range operators. For example, IS_BETWEEN and NOT_BETWEENOptional67.0

Valid field Values

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

Note

ValueLabel
idUnique ID
cnfgItemTagsTag key
cnfgItemkeyIdTag identiifier
cnfgItemTypeConfiguration Item Type
cnfgItemTypeDeveloperNameConfiguration Item Type Developer Name
createdOnCreated time
firstDiscoveredOnFirst discovery date
firstDiscoveredByFirst discoverer
lastDiscoveredByLast discoverer
lastDiscoveredOnLast discovered date
lastDiscoverySourceNameDiscovery source name
lastDiscoveryTimestampDiscovery source timestamp
lastModifiedOnLast 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 sort criteria to specify how search results should be ordered.

1{
2  "sortKey": "SD_ApNa",
3  "sortOrder": "ASC"
4}
NameTypeDescriptionRequired or OptionalAvailable Version
sortKeyStringThe field name to use for sorting the search results. For valid values, see Valid field Values.Required67.0
sortOrderStringThe sort direction for the results. Values are:
  • ASC
  • DESC
Required67.0

Response 

JSON example 

This example is a sample response from the searchConfigurationItems query.

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

CnfgItemDetails 

FieldTypeDescriptionAvailable Version
idIntegerThe total number of configuration item records that match the search criteria across all pages, regardless of pagination.67.0
nameStringIndicates 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.67.0
cnfgItemTypeDefCnfgItemTypeDef[]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.67.0
createdOnStringThe cursor to fetch the next page.67.0
cnfgItemTagsCnfgItemTagsThe number of records per page.67.0
discoverySourceDetailsDiscoverySourceDetailsThe number of records per page.67.0
lastModifiedOnStringThe date and time the record was last updated.68.0

CnfgItemTypeDef 

FieldTypeDescriptionAvailable Version
isComponentBooleanIndicates whether the configuration item type is a component type (true) or not (false).67.0
developerNameStringThe developer name of the configuration item type. To retrieve the list of available configuration otem type developer names, query the CnfgItemTypeDef object.67.0
nameStringThe display name of the configuration item type.67.0

CnfgItemTags 

FieldTypeDescriptionAvailable Version
cnfgItemTagscnfgItemTagSummaryThe list of configuration item tag summaries.67.0
totalTagsIntegerThe total number of tags.67.0

CnfgItemTagSummary 

FieldTypeDescriptionAvailable Version
KeyIdBigIntegerThe tag definition identifier.67.0
ValueIdBigIntegerThe tag value identifier.67.0

DiscoverySourceDetails 

FieldTypeDescriptionAvailable Version
createdBySourceStringThe source that created the configuration item.67.0
firstDiscoveredByStringThe source that first discovered the configuration item.67.0
firstDiscoveredOnIntegerThe date and time when the configuration item was first discovered (milliseconds since epoch).67.0
lastDiscoveredByStringThe source that last discovered the configuration item.67.0
lastDiscoveredOnIntegerThe date and time when the configuration item was last discovered (milliseconds since epoch).67.0
lastDiscoveredSourceDetailsLastDiscoveredSourceDetails[]List of discovery events with date and source.67.0

LastDiscoveredSourceDetails 

FieldTypeDescriptionAvailable Version
dateIntegerThe date and time when the configuration item was last discovered by this source (milliseconds since epoch).67.0
sourceStringThe source that performed the discovery.67.0

Properties 

NameTypeDescriptionAvailable Version
totalCountIntegerThe total number of configuration item records that match the search criteria across all pages, regardless of pagination.67.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.67.0
cnfgItemDetailsCnfgItemDetails[]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.67.0
nextPageCursorStringThe cursor to fetch the next page.67.0
pageSizeStringThe number of records per page.67.0

When using the searchConfigurationItems 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