Get Configuration Item History

Perform a paginated retrieval of the audit trail for a specific configuration item. Returns a list of changes, including field-level modifications, timestamps, and user information.

Special Access Rules 

To query a configuration item history, 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 

This example shows a sample request to retrieve the history of a specific configuration item.

1query GetConfigurationItemHistory {
2   getConfigurationItemHistory(
3       input: {
4           id: "6780001"
5           filters: [{ filterKey: TIME, fromValue: "1768545221848", operator: LESS_THAN_OR_EQUAL },
6           { filterKey: OPERATION_TYPE, toValue: "EDIT", operator: CONTAINS }]
7           pageNumber: 0
8           pageSize: 10
9           sort: { sortKey: OPERATION_TYPE, sortOrder: DESC }
10       }
11   ) {
12       totalRecords
13       cnfgItemAuditRecords {
14           modifiedRecordId
15           modifiedByUserId
16           attributeChanges {
17               attributeName
18               originalValue
19               modifiedValue
20           }
21           modifiedAttributes
22           operationType
23           userName
24           valid
25           time
26           auditRecordId
27           module
28           parentConfigurationItemId
29       }
30   }
31}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
idIntegerThe unique identifier of the Configuration Item record whose history is to be retrieved.Required67.0
filtersFiltersList of filters.Optional67.0
sortSortSort criteria.Optional67.0
pageNumberIntegerThe count of pages to return for results pagination.Optional67.0
pageSizeIntegerThe maximum number of history records to return in each page.Optional67.0

Filters Properties 

Use Filters to filter audit results.

NameTypeDescriptionRequired or OptionalAvailable Version
filterKeyStringThe field to filter by. Valid values are:
  • TIME
  • OPERATION_TYPE
Required67.0
operatorStringThe comparison operator to use for filtering. Valid values are:
  • EQUALS—Matches a single exact value. Use with exactly one value in the values array.
  • NOT_EQUALS—Does not match a single exact value. Use with exactly one value in the values array.
  • CONTAINS—Matches if the field contains the specified value. Use with exactly one value in the values array.
  • NOT_CONTAINS—Matches if the field does not contain the specified value. Use with exactly one value in the values array.
  • GREATER_THAN—Matches if the field value is greater than the specified value. Use with exactly one value in the values array.
  • GREATER_THAN_OR_EQUAL—Matches if the field value is greater than or equal to the specified value. Use with exactly one value in the values array.
  • LESS_THAN—Matches if the field value is less than the specified value. Use with exactly one value in the values array.
  • LESS_THAN_OR_EQUAL—Matches if the field value is less than or equal to the specified value. Use with exactly one value in the values array.
  • IS_BETWEEN—Matches if the field value is between two specified values (inclusive). Use with exactly two values in the values array.
  • NOT_BETWEEN—Matches if the field value is not between two specified values (inclusive). Use with exactly two values in the values array.
Required67.0
fromValueStringFirst value of the filterKey.Required67.0
toValueStringSecond value of the filterKey. Required if the FilterOperator requires two values.Optional67.0
valueStringFilter value for single-value operators.Optional67.0

Sort Properties 

Use SortCriteria to specify how search results should be ordered.

NameTypeDescriptionRequired or OptionalAvailable Version
sortKeyStringThe field name to use for sorting the search results.
  • TIME
  • OPERATION_TYPE
Required67.0
sortOrderStringThe sort direction for the results. Valid values are:
  • ASC
  • DESC
Required67.0

Response 

JSON example 

This example is a sample response from the getConfigurationItemHistory query.

1{
2   "data": {
3       "getConfigurationItemHistory": {
4           "totalRecords": 7,
5           "cnfgItemAuditRecords": [
6               {
7                   "modifiedRecordId": "6780001",
8                   "modifiedByUserId": "470701",
9                   "attributeChanges": [
10                       {
11                           "attributeName": "Status",
12                           "modifiedValue": "In Build",
13                           "originalValue": ""
14                       },
15                       {
16                           "attributeName": "IP Address",
17                           "modifiedValue": "192.168.172.45",
18                           "originalValue": ""
19                       },
20                       {
21                           "attributeName": "Approval State",
22                           "modifiedValue": "Awaiting Approval",
23                           "originalValue": ""
24                       }
25                   ],
26                   "modifiedAttributes": [],
27                   "operationType": "EDIT_CMDBCI",
28                   "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi",
29                   "valid": true,
30                   "time": 1768305455444,
31                   "auditRecordId": "36051312",
32                   "module": "CMDBCI",
33                   "parentConfigurationItemId": "6780001"
34               },
35               {
36                   "modifiedRecordId": "6780001",
37                   "modifiedByUserId": "470701",
38                   "attributeChanges": [
39                       {
40                           "attributeName": "Status",
41                           "modifiedValue": "In Test",
42                           "originalValue": "In Build"
43                       }
44                   ],
45                   "modifiedAttributes": [],
46                   "operationType": "EDIT_CMDBCI",
47                   "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi",
48                   "valid": true,
49                   "time": 1768306294383,
50                   "id": "36056961",
51                   "module": "CMDBCI",
52                   "parentConfigurationItemId": "6780001"
53               }
54           ]
55       }
56   }
57}

CnfgItemAuditRecords 

FieldTypeDescriptionAvailable Version
auditRecordIdIDThe unique identifer of the audit record.67.0
modifiedRecordIdIDThe unique identifier of the object that was modified.67.0
parentConfigurationItemIdIDThe unique identifier of the parent object.67.0
operationTypeStringThe operation type.67.0
modifiedByUserIdStringThe unique identifier of the user who performed the update.67.0
modifiedOnBigIntergerThe date and time the object was last updated.67.0
attributeChangesListThe list of attributes updated.67.0
modifiedAttributesListThe list of updated attribute instances.67.0

AuditRecordDetails 

FieldTypeDescriptionAvailable Version
attributeNameBooleanThe name of the updated attribute.67.0
originalValueStringThe original value before an update was performed.67.0
modifiedValueStringThe value after an update was performed.67.0

Properties 

NameTypeDescriptionAvailable Version
cnfgItemAuditRecordsCnfgItemAuditRecordsList of changes to the Configuration Item record.67.0
totalRecordsIntegerThe total number of records that match the filter criteria across all pages, regardless of pagination.67.0