Get Configuration Item

Query a configuration item by its unique identifier. This operation returns detailed information for a single configuration item.

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 GetConfigurationItemById {
2  getConfigurationItemById(id: 345672) {
3    id
4    SD_AsNa
5    createdOn
6    cnfgItemTags {
7      type
8      key
9      keyId
10      value
11      valueId       
12    }
13    cnfgItemTypeDef {
14      isComponent
15      developerName
16      name
17    }
18    discoverySourceDetails {
19      createdBySource
20      firstDiscoveredBy
21      firstDiscoveredOn
22      lastDiscoveredBy
23      lastDiscoveredOn
24      lastDiscoveredSourceDetails {
25        date
26        source
27      }
28    }
29  }
30}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
idIntegerThe unique identifier of the configuration item to retrieve.Required67.0

Response 

JSON example 

1{
2  "data": {
3    "getConfigurationItemById": {
4      "id": 6460947,
5      "createdOn": "1775194238352",
6      "cnfgItemTags": {
7        "type": "KEY_VALUE",
8        "key": "searchtags",
9        "keyId": 764952,
10        "value": "s1",
11        "valueId": 859952
12      },
13      "cnfgItemTypeDef": {
14        "isComponent": false,
15        "developerName": "SD_AwEcIn",
16        "name": "AWS EC2 Instance"
17      },
18      "discoverySourceDetails": {
19        "createdBySource": "Aws",
20        "firstDiscoveredBy": "Aws",
21        "firstDiscoveredOn": 1765929600000,
22        "lastDiscoveredBy": "Aws",
23        "lastDiscoveredOn": 1765929600000,
24        "lastDiscoveredSourceDetails": [
25          {
26            "date": 1765929600000,
27            "source": "Aws"
28          }
29        ]
30      }
31    }
32  }
33}

Properties 

NameTypeDescriptionAvailable Version
createdOnStringThe date and time the record was created.67.0
cnfgItemTypeDefCnfgItemTypeDefThe configuration item type definition.67.0
discoverySourceDetailsDiscoverySourceDetailsInformation about sources that have discovered this configuration item and when.67.0
idIntegerThe unique integer identifier of the configuration item.67.0
lastModifiedOnStringThe date and time the record was last updated.67.0

CnfgItemTags 

Configuration item tags returned when requested in the query.

Properties 

NameTypeDescriptionAvailable Version
keyBigIntegerThe tag key name.67.0
keyIdBigIntegerThe unique identifier of the tag key.67.0
typeStringThe tag type: KEY_VALUE (key and value) or KEY_ONLY (key only).67.0
valueStringThe tag value. This field is null for KEY_ONLY tags.67.0
valueIdStringThe unique identifier of the tag value. This field is null for KEY_ONLY tags.67.0

CnfgItemTypeDef 

Configuration item type definition returned when requested in the query.

Properties 

NameTypeDescriptionAvailable 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 CI type developer names programmatically, query the CnfgItemTypeDef object.67.0
nameStringThe display name of the configuration item type.67.0

DiscoverySourceDetails 

Contains information about sources that have discovered this configuration item, along with the date and time of discovery.

Properties 

NameTypeDescriptionAvailable 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 

Each element in the lastDiscoveredBySource array contains the following fields.

Properties 

NameTypeDescriptionAvailable 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

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

  • Standard Attributes—Attributes are available out-of-the-box.
  • Custom Attributes—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).