Skip to main content

POST Relate a Change Request

URL: http://{{server-url}}/api/v1/change/{{change-Id}}/relation/bulk/create

Example: http://172.16.11.140/api/analytics/v1/change/1/relation/bulk/create

You can relate a change request with the required Asset(s) or CI(s) by calling the above endpoint with the change ID. You have to pass the following key-values:

note
  • You can establish relationships with multiple assets/CIs.
  • However, archived or in-stage assets/CIs cannot be related.
  • If any assets/CIs included in the API are unavailable, archived, or in stage, a partial relationship cannot be created.

Header

KeyDescription
AuthorizationBearer {access token obtained after authorization} or API Key
Content-Typeapplication/json

Body

KeyValue TypeDescription
destinationModelStringEnter the module with which the change request must be linked. Possible values are:

- hardware= asset_hardware

- cmdb=cmdb

- Software= asset_software

- nonit=asset_non_it

destination NamesStringName of the Asset or CI.
typeStringRelation type.

For example:

{
"destinationModel": "asset_hardware",
"destinationNames": [
"AST-2","AST-1"
],
"type": "related"
}

Example (Request & Response)

Request

curl --location 'http://172.16.11.140/api/analytics/v1/change/1/relation/bulk/create' \
--header 'Authorization: Apikey kZ90fnHR0j1WGkC%2F%40unQah0xXglX5HB%2B3bnPQdMhu41S4QK2SOGLjBIW%2BNnfmxejE%2FPcYlg%3D%3D' \
--header 'Content-Type: application/json' \
--data '{
"destinationModel": "asset_hardware",
"destinationNames": [
"AST-2","AST-1"
],
"type": "related"
}'

Response

{
"successIds": [
5,
6
],
"failerIds": null
}