Product Update

Set Manager of New Change with API

Carlyn Manly
2018-09-23
1 Min Read

A minor feature has been added to the REST API for changes. This API now allows the manager of the change to be set when a new change is created. In the past, the API user would always become the manager of the change, which mimics the behavior of the user interface when a change manager opens a new change.
By making it possible to select a different manager for a new change, the API now provides some extra flexibility that developers will surely appreciate. Here’s an example of a CURL command for creating a new change for a manager whose person record in Xurrent has the ID 558:

curl -u β€œapi-token:x” -X POST -H β€œX-4meAccount: wna-it” -d β€˜{β€œsubject”:”Server Upgrade”, β€œsource”:”API” β€œcategory”:”standard”, β€œchange_type”:”infrastructure_change”, β€œjustification”:”correction”, β€œservice”:”17230β€³, β€œtemplate_id”:”20362β€³, β€œstart_at”:”2018-10-06T03:00:00Z”, β€œmanager”:”558β€³}’ β€œhttps://api.4me.com/v1/changes”

If a manager is not specified, the manager of the new change will still automatically be set to the API user.