Get items of a specific state that are currently in a change request
GET /api/cr/v1/crs/{id}/items
gets items in a change request (CR) that are in the specified itemState
. If there are no items that meet the criteria in the request then an empty 200-HTTP response is returned. Otherwise, the response returns a list of items that meet the itemState
condition defined in the request.
Request schema
Method | URL |
---|---|
GET | /api/cr/v1/crs/{id}/items |
Request header
*indicates mandatory fields.
Field | Value Type | Description of values |
---|---|---|
*Authorization |
String | Enter: Bearer access token. |
*id |
Integer | CR’s unique ID number. This is not the same as the number in the CR's name. To get the CR ID:
preview<workflowname>= in the URL. Alternatively, you may obtain the ID when the CR is created using POST /api/cr/v1/crs . |
itemState |
String | Examples of expected values:
|
*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. |
Sample request
{
"crId": 16141,
"itemState": "Approval Pending",
"upc-selected-company": 68
}
Response schema
Response body
The following information, about each item that meets the requirement, is returned in the 200-HTTP response:
Field | Value Type (max.char) | Description of values |
---|---|---|
version |
String | Item’s version number. |
number |
String | Item’s number as recorded in Upchain. |
majorRevision |
String | Incremented major revision number. |
minorRevision |
String | Minor revision number. |
releaseType |
String | Whether Major or Minor. |
revisionNote |
String | CR creator’s revision note. |
name |
String | Item’s name. |
id |
Integer | Item’s ID number. |
state |
String | Item’s state as specified in the itemState field in the request. |
Sample response
[
{
"version": "000",
"number": "DFLT 8623",
"majorRevision": "AA",
"minorRevision": "XX",
"releaseType": "Major",
"revisionNote": "Initial Release",
"name": "COMPANY NAME 1",
"id": 365816,
"state": "APPROVAL PENDING"
},
{
"number": "DFLT 8635",
"version": "000",
"majorRevision": "AA",
"minorRevision": "XX",
"releaseType": "Major",
"revisionNote": "Initial Release",
"name": "TOP_HEAD_ATTACH",
"id": 365831,
"state": "APPROVAL PENDING"
},
{
"number": "DFLT 8641",
"version": "000",
"majorRevision": "AA",
"minorRevision": "XX",
"releaseType": "Major",
"revisionNote": "Initial Release",
"name": "COMPANY NAME 2",
"id": 365837,
"state": "APPROVAL PENDING"
}
]