This article provides a sample code in JSON on how to create a Change Order in SDM via REST API
Release : 17.3.X
Component : SERVICE DESK MANAGER
The sample code is provided below:
POST /caisd-rest/chg HTTP/1.1
Host: SDMHostName:8050
X-AccessKey: 1115504361
Accept: application/json
X-Obj-Attrs: chg_ref_num
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 115220d5-aa39-954d-417a-7d7adc78db09
{
"chg": {
"requestor":{"@id":"U'BA17859C2BF8104CBCE325534FD24B6F'","@REL_ATTR":"U'BA17859C2BF8104CBCE325534FD24B6F'","@COMMON_NAME":"ServiceDesk"},
"affected_contact":{"@id":"U'BA17859C2BF8104CBCE325534FD24B6F'","@REL_ATTR":"U'BA17859C2BF8104CBCE325534FD24B6F'","@COMMON_NAME":"ServiceDesk"},
"requested_by":{"@id":"U'BA17859C2BF8104CBCE325534FD24B6F'","@REL_ATTR":"U'BA17859C2BF8104CBCE325534FD24B6F'","@COMMON_NAME":"ServiceDesk"},
"status":{"@id":"6000","@REL_ATTR":"OP","@COMMON_NAME":"Open"},
"summary":"test",
"description":"test",
}
}
Result is below:
{
"chg": {
"@id": "400054",
"@REL_ATTR": "400054",
"@COMMON_NAME": "24",
"link": {
"@href": "http://SDMHostName:8050/caisd-rest/chg/400054",
"@rel": "self"
},
"chg_ref_num": 24
}
}
Obtain the X-AccessKey via login method
https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/business-management/ca-service-management/17-2/reference/ca-service-desk-manager-reference-commands/technical-reference/rest-http-methods.html#concept.dita_571265def7bea5a79bc6e3bba4cd061d4d03b036_RESTandObjectAccess
This can also be attempted with just common_name too, example:
{
"chg": {
"requestor":{"@COMMON_NAME":"ServiceDesk"},
"affected_contact":{"@COMMON_NAME":"ServiceDesk"},
"requested_by":{"@COMMON_NAME":"ServiceDesk"},
"status":{"@COMMON_NAME":"Open"},
"summary":"test",
"description":"test",
}
}