Configuration Management Database GraphQL V1 API (POST)

Access and manage configuration items (CI) in the Agentforce IT Service Configuration Management Database (CMDB). Execute operations Create, Read, and Update on IT assets. Use this API to query, search, and manage Configuration Items (CIs).

  • Fetch only the specific fields you need (for example, just the Operating System of a server), reducing payload size and improving response latency.
  • Perform queries, searches, and mutations (updates) through a unified interface, eliminating the need to manage multiple endpoints.
  • Programmatically discover the types, fields, and operations available in your specific CMDB instance, enabling dynamic query construction and better tooling support.

Authorization 

Authenticate to the CMDB GraphQL API using one of the following methods:

  • Authorization: Integration User — Set up an Integration User and Connected App, then exchange your client credentials for a Bearer token.
  • Authorization: User Sign-In — Use the Authorization Code flow as a signed-in user to receive an authorization code, then exchange it for a Bearer token.

GraphQL CMDB Endpoint 

All requests to the Agentforce IT Service CMDB GraphQL API must be sent as POST requests to the following endpoint:

1https://api.salesforce.com/service/itsm/v1/cmdb/graphql

Example cURL request:

1curl --location 'https://api.salesforce.com/service/itsm/v1/cmdb/graphql' \
2  --header 'Content-Type: application/json' \
3  --header 'Authorization: Bearer <Bearer_Token>' \
4  --data '{
5    "query": "query CiById { ciById(id: \"100\") { SD_Ac SD_IpAd SD_OpSy SD_SeNu SD_St createdOn id lastModifiedOn } }"
6    }'

Available version: 66.0

GraphQL API V2 is available in API version 67.0 and later. V2 includes the latest enhancements. We recommend using V2 for new integrations and migrating existing integrations to take advantage of the latest capabilities. See Configuration Management Database GraphQL V1 API (POST).

Note

HTTP method: POST

CI Types and Attributes 

Learn more about the developer names of out-of-the-box (OOTB) Configuration Item (CI) types and attributes that are available in the Salesforce CMDB. To retrieve the developer names for both default and custom types and attributes programmatically, you can query the standard Salesforce objects:

  • Configuration Item Types: Query the CnfgItemTypeDef object to retrieve developer names for CI types.
  • Configuration Item Attributes: Query the CnfgItemAttrDef object to retrieve developer names for CI attributes.
  • Configuration Item Relationship Types: Query the CnfgMgmtRelationTypeDef object to retrieve developer names for CI relationship types.

Operation types 

Query, Mutation

Query: ciById

Fetches detailed information for a single configuration item using its unique identifier. See Query Configuration Item for request and response details.

Query: searchCI

Performs a paginated search across configuration items with filtering and sorting options. See Search Configuration Items for request and response details.

Mutation: upsertCI

Submits a bulk operation to create or update one or more configuration items as an asynchronous job. See Upsert Configuration Items for request and response details.

Mutation: updateCIById

Updates either partial or all attributes of an existing configuration item specified by its unique identifier. See Update Configuration Item for request and response details.

Mutation: deleteCI

Deletes a configuration item by its unique identifier. See Delete Configuration Item for request and response details.

Query: getCIRelationship

Retrieves detailed information about all configuration item (CI) relationships by using the unique identifier of a CI record. See Get Configuration Item Relationship for request and response details.

Mutation: upsertCIRelationship

Submits a bulk operation to create or update one or more relationships between configuration items as an asynchronous job. See Upsert Configuration Item Relationship for request and response details.

Mutation: deleteCIRelationship

Submit an operation to delete relationships between configuration items (CIs). This is a synchronous request. See Delete Configuration Item Relationship for request and response details.

Query: getComponentsByCiId

Retrieves a paginated list of child components of a specific type for a configuration item by its unique identifier. See Get Components for Configuration Item for request and response details.

Query: getCIHistory

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. See Get Configuration Item History for request and response details.

Query: getStatus

Retrieves the status of a previously submitted asynchronous job. See Get Status of Operation for request and response details.

Query: searchComponentCI

Performs a paginated search across components for configuration items with filtering and sorting options. See Search Components for Configuration Item for request and response details.

Query: getAllTags

Perform a paginated retrieval of configuration item (CI) tags. See Get Configuration Item Tags for request and response details.

  • Operation Types

    Learn more about the various Agentforce IT Service Configuration Management Database (CMDB) GraphQL API operations.

See Also