This package adds some new operations for creating, changing, retrieving, deleting and searching configuration items via generic interface. The following operations are available:
-
ConfigItemCreate()
-
ConfigItemDelete()
-
ConfigItemGet()
-
ConfigItemSearch()
-
ConfigItemUpdate()
See also
For more information please take a look at the WSDL file located in development/webservices/GenericConfigItemConnectorSOAP.wsdl
of your instance.
New Operations
These new operations are available in the Web Services module of the Processes & Automation group:
-
ConfigItem::ConfigItemCreate
-
ConfigItem::ConfigItemDelete
-
ConfigItem::ConfigItemGet
-
ConfigItem::ConfigItemSearch
-
ConfigItem::ConfigItemUpdate
To use these operations:
-
Add or edit a web service.
-
Select a Network transport in the OTRS as provider widget and save the web service.
-
The new operations are available in the Add Operation field of the OTRS as provider widget.
See also
Check the API references in Process Management chapter for more information.
Examples for Usage
The following examples give a quick look about how to use the API for basic actions.
-
Create configuration item
-
URL:
/api/agent/config-item/create
-
Method: POST
-
Payload:
{ "ConfigItem": { "Class": "Computer", "Name": "test name for new config item", "DeplState": "Production", "InciState": "Operational", "CIXMLData": { "Seriennummer": "SNR1" "NIC": { "NIC": "test", "IPoverDHCP": "Yes" } } } }
-
-
Update configuration item
-
URL:
/api/agent/config-item/4/update
where4
is the ID of the configuration item to be updated -
Method: POST
-
Payload:
{ "ConfigItemID": "4", "ConfigItem": { "Class": "Computer", "Name": "test name for new config item", "DeplState": "Production", "InciState": "Operational", "CIXMLData": { "Seriennummer": "SNR2" "NIC": { "NIC": "test", "IPoverDHCP": "Yes" } } } }
Note
The
Class
is required to be transmitted but will not affect the configuration item when updating. If you update a configuration item in the classLocation
and transmit the classComputer
the configuration item will stay in the classLocation
. -
-
Get configuration item
-
URL:
/api/agent/config-item/4
where4
is the ID of the configuration item to be fetched -
Method: GET
-
-
List configuration items
-
URL:
/api/agent/config-item/list
-
Method: POST
-