Product Update

Set Manager of New Change with API

Carlyn Manly
September 23, 2018
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.