CMDBGroupAPI - Scoped
-
- UpdatedJan 30, 2025
- 7 minutes to read
- Yokohama
- API reference
The CMDBGroupAPI provides methods for performing actions on Configuration Management Database (CMDB) groups.
sn_cmdbgroup
namespace identifier before the CMDBGroupAPI object. For
example:To access this API you must have the itil or asset role.
CMDBGroupAPI - getAllCI(String groupId, Boolean requireCompleteSet, Boolean requireAllQueryNodesCis)
Returns all configuration items (CIs) for the specified group. The results include all manual CIs and the list of CIs from the query builder's saved query.
Name | Type | Description |
---|---|---|
groupId | String | Sys_id of the Configuration Management Database (CMDB) group. |
requireCompleteSet | Boolean | Optional, but must be passed if
requireAllQueryNodesCis is passed. Flag that indicates whether an empty string is returned if any CIs are filtered out by access control list (ACL) restrictions. Valid values:
Default: false |
requireAllQueryNodesCis | Boolean | Optional. Flag that indicates whether to
return CIs from all CMDB classes of the query. Valid values:
Default: false |
Example
Output:
CMDBGroupAPI - getAllCIFromQueryBuilder(String groupId, Boolean requireCompleteSet, Boolean requireAllQueryNodesCis)
Returns all configuration items (CIs) returned from all saved query builders' query IDs for the specified group.
Name | Type | Description |
---|---|---|
groupId | String | Sys_id of the Configuration Management Database (CMDB) group. |
requireCompleteSet | Boolean | Optional, but must be passed if
requireAllQueryNodesCis is passed. Flag that indicates whether an empty string is returned if any CIs are filtered out by access control list (ACL) restrictions. Valid values:
Default: false |
requireAllQueryNodesCis | Boolean | Optional. Flag that indicates whether to
return CIs from all CMDB classes of the query. Valid values:
Default: false |
Example
Output:
CMDBGroupAPI - getManualCIList(String groupId, Boolean requireCompleteSet)
Returns the CMDB group's manual CI list.
Name | Type | Description |
---|---|---|
groupId | String | The sysId of the CMDB group. |
requireCompleteSet | Boolean | When true, returns an error string if any CIs are filtered out by ACL restrictions. |
Type | Description |
---|---|
String | A JSON formated string in the format
When not successful, returns one of the errors GROUP_SYS_ID_IS_NOT_FOUND, GROUP_SYS_ID_IS_EMPTY, FAIL_TO_INSERT_GROUP_CI_PAIR, FAIL_TO_INSERT_GROUP_QUERY_ID_PAIR, CI_CAN_NOT_FOUND, SAVED_QUERY_ID_NOT_FOUND, ERROR_DURING_QUERY_BUILDER_PROCESS_QUERY, TIMEOUT_DURING_QUERY_BUILDER_PROCESS_QUERY, NOT_COMPLETE_DURING_QUERY_BUILDER_PROCESS_QUERY, MAX_LIMIT_DURING_QUERY_BUILDER_PROCESS_QUERY, GROUP_API_TIMEOUT, EXCEPTION_FROM_EXECUTE_QUERY, SOME_CI_NOT_VISIBLE_DUE_TO_SECURITY_CONSTRAINT |
Where
Example
Output: (Line breaks added for formatting.)
Example
Output: (Line breaks added for formatting.)
CMDBGroupAPI - getSavedQueryIdList(String groupId, Boolean requireCompleteSet)
Returns the query builder's query IDs for the specified CMDB group.
Name | Type | Description |
---|---|---|
groupId | String | The sysId of the CMDB group. |
requireCompleteSet | Boolean | When true, returns an empty string if any CIs are filtered out by ACL restrictions. |
Type | Description |
---|---|
String | A JSON formated string in the format
When not successful, returns one of the errors GROUP_SYS_ID_IS_NOT_FOUND, GROUP_SYS_ID_IS_EMPTY, FAIL_TO_INSERT_GROUP_CI_PAIR, FAIL_TO_INSERT_GROUP_QUERY_ID_PAIR, CI_CAN_NOT_FOUND, SAVED_QUERY_ID_NOT_FOUND, ERROR_DURING_QUERY_BUILDER_PROCESS_QUERY, TIMEOUT_DURING_QUERY_BUILDER_PROCESS_QUERY, NOT_COMPLETE_DURING_QUERY_BUILDER_PROCESS_QUERY, MAX_LIMIT_DURING_QUERY_BUILDER_PROCESS_QUERY, GROUP_API_TIMEOUT, EXCEPTION_FROM_EXECUTE_QUERY, SOME_CI_NOT_VISIBLE_DUE_TO_SECURITY_CONSTRAINT |
Where
Example
Output: (Line breaks added for formatting.)
CMDBGroupAPI - setManualCIList(String groupId, String ciSysIds)
Sets the manual CI list for the specified group. The existing manual CI list is overwritten. CI sysIds not found in the cmdb_ci table are ignored.
Name | Type | Description |
---|---|---|
groupId | String | The sysId of the CMDB group. |
ciSysIds | String | Comma separated list of CI sysIds. |
Type | Description |
---|---|
String | A JSON formated string in the format
When not successful, returns one of the errors GROUP_SYS_ID_IS_NOT_FOUND, GROUP_SYS_ID_IS_EMPTY, FAIL_TO_INSERT_GROUP_CI_PAIR, FAIL_TO_INSERT_GROUP_QUERY_ID_PAIR, CI_CAN_NOT_FOUND, SAVED_QUERY_ID_NOT_FOUND, ERROR_DURING_QUERY_BUILDER_PROCESS_QUERY, TIMEOUT_DURING_QUERY_BUILDER_PROCESS_QUERY, NOT_COMPLETE_DURING_QUERY_BUILDER_PROCESS_QUERY, MAX_LIMIT_DURING_QUERY_BUILDER_PROCESS_QUERY, GROUP_API_TIMEOUT, EXCEPTION_FROM_EXECUTE_QUERY, SOME_CI_NOT_VISIBLE_DUE_TO_SECURITY_CONSTRAINT |
Where
Example
Output: (Line breaks added for formatting.)
CMDBGroupAPI - setSavedQueryIdList(String groupId, String queryIds)
Sets the saved query ID list for the specified group. The existing query ID list is overwritten. Query sysIds not found in the qb_saved_query table are ignored.
Name | Type | Description |
---|---|---|
groupId | String | The sysId of the CMDB group. |
queryIds | String | Comma separated list of saved query sysIds. |
Type | Description |
---|---|
String | A JSON formated string in the format
When not successful, returns one of the errors GROUP_SYS_ID_IS_NOT_FOUND, GROUP_SYS_ID_IS_EMPTY, FAIL_TO_INSERT_GROUP_CI_PAIR, FAIL_TO_INSERT_GROUP_QUERY_ID_PAIR, CI_CAN_NOT_FOUND, SAVED_QUERY_ID_NOT_FOUND, ERROR_DURING_QUERY_BUILDER_PROCESS_QUERY, TIMEOUT_DURING_QUERY_BUILDER_PROCESS_QUERY, NOT_COMPLETE_DURING_QUERY_BUILDER_PROCESS_QUERY, MAX_LIMIT_DURING_QUERY_BUILDER_PROCESS_QUERY, GROUP_API_TIMEOUT, EXCEPTION_FROM_EXECUTE_QUERY, SOME_CI_NOT_VISIBLE_DUE_TO_SECURITY_CONSTRAINT |
Where
Example
Output: (Line breaks added for formatting.)
On this page
- CMDBGroupAPI - getAllCI(String groupId, Boolean requireCompleteSet, Boolean
requireAllQueryNodesCis)
- CMDBGroupAPI - getAllCIFromQueryBuilder(String groupId, Boolean requireCompleteSet, Boolean
requireAllQueryNodesCis)
- CMDBGroupAPI - getManualCIList(String groupId, Boolean requireCompleteSet)
- CMDBGroupAPI - getSavedQueryIdList(String groupId, Boolean requireCompleteSet)
- CMDBGroupAPI - setManualCIList(String groupId, String ciSysIds)
- CMDBGroupAPI - setSavedQueryIdList(String groupId, String queryIds)