Create a new change request
POST /api/cr/v1/crs
creates an empty change request (CR) or a CR containing items.
Request schema
Method | URL |
---|---|
POST | /api/cr/v1/crs |
Request header
*indicates mandatory fields
Field | Value Type | Description of values |
---|---|---|
*Authorization |
String | Enter: Bearer access token. |
*Upc-Selected-Company |
Integer | Company’s ID. Use the value returned in the id field received in response to the following request: GET /api/auth/v1/companies . |
X-User-Id |
Text | Enter the email address of the user being impersonated. This value is required if you are using a two-legged token. If you are using a three-legged token, then this field is not required. |
Request body
Field | Value Type | Description of values |
---|---|---|
*projectId |
String | Project’s ID number. Use GET /api/project/v1/projects and note the number provided in the id field. |
items |
Integer/Array | Items listed by their item version ID number. To get an item ID number:
previewItem= in the URL. Omit items from your request to create an empty CR.Note: Project-level, parent-level, and item-level configurations are automatically associated with the CR request when the configuration items are added to the CR request. |
description |
String | Description of the CR. |
*wfDefinitionId |
Integer | Workflow’s ID number. Use GET /api/workflow/v1/workflows and note the value for content.id .You can only use active workflows. |
*priority |
String | Default priority is Medium. Expected values:
|
Sample request to create an empty CR
{
"projectId": 4356,
"description": "Release drone's camera assembly",
"wfDefinitionId": 5009,
"priority": "Low"
}
Sample request to send specified items through a CR workflow
{
"projectId": 4356,`
"description": "Release drone's camera assembly",`
"items": [
488217,
531338
],
"wfDefinitionId": 5009,
"priority": "Low",
"releaseMaturity": "Beta"
}
Response schema
Response body
HTTP 200 Response:
Field | Value Type | Description of values |
---|---|---|
id |
Integer | CR’s unique ID number. |
num |
String | CR’s unique ID as tracked in Upchain. |
status |
String | CR’s initial status is always Draft. Any changes to the CR must be done while it is in Draft state. |
wfDefinitionId |
Integer | The same workflow’s ID number provided in the request. |
description |
String | The same description provided in the request. |
priority |
String | The same priority provided in the request. |
printZoneId |
Integer | Print zone’s ID number. Returns null if not applicable. |
releaseMaturity |
String | Returns null since the workflow has not been started yet. |
Sample Response
{
"id": 16123,
"num": "CR11802-10004",
"status": "Draft",
"wfDefinitionId": 5009,
"description": "Release drone's camera assembly",
"priority": "Low",
"printZoneId": null,
"releaseMaturity": null
}