Web Services¶
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 on GitHub.
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:
{ "ClassID": "22", "Name": "test name for new config item", "DeplStateID": "27", "InciStateID": "3", "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 updatedMethod: POST
Payload:
{ "ClassID": "22", "Name": "test name for new config item", "DeplStateID": "27", "InciStateID": "3", "CIXMLData": { "Seriennummer": "SNR2", "NIC": { "NIC": "test", "IPoverDHCP": "Yes" } } }
Get configuration item
- URL:
/api/agent/config-item/4
where4
is the ID of the configuration item to be fetched - Method: GET
- URL:
List configuration items
- URL:
/api/agent/config-item/list
- Method: POST
- URL: