Product Update

Maintaining Relations with the REST API

Carlyn Manly
2014-11-26
1 Min Read

The REST API of the Xurrent service has been extended to make it possible for developers to maintain the one-to-many as well as the many-to-many links between records.

Since it has recently become possible to link multiple CIs to a request, we can use that feature to provide some examples.

The following cURL call can be used to add a configuration item to a request:

curl -u "token:x" -X POST "https://api.4me.com/v1/requests/123456/cis/654321"

And here’s how the API can be used to remove that same CI again:

curl -u "token:x" -X DELETE "https://api.4me.com/v1/requests/123456/cis/654321"

Removing all CIs from the request is even simpler:

curl -u "token:x" -X DELETE "https://api.4me.com/v1/requests/123456/cis"

In the above examples, token represents a user’s Xurrent API token. You can find your API token in the β€œPersonal Information” section of the Settings console.

Take a look at the Change Log of the Xurrent Developer documentation to look at all the possibilities that have been added.