Skip to main content
Version: v2.0

Create CI relation

Create a relationship between CIs.

HTTP request​

POST /api/now/v1/cmdb/instance/{className}/{sys_id}/relation

Path parameters​

NameDescription
classNameClass name
sys_idSys_id

Query parameters​

None.

Request body​

Supply a cmdbinstanceapi.CmdbInstance.

Response​

An item envelope of CmdbInstance.

Example​

// Build the request body
var body cmdbinstanceapi.CmdbInstance
response, err := client.Now().Cmdb().Instance().ByClass("cmdb_ci_linux_server").ByID("{sysID}").Relation().Post(ctx, body, nil)
if err != nil {
log.Fatal(err)
}
Was this page helpful?