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.