REST list items
List items are used with their parent list for maintaining various list_items options inside BMC Release Process Management. System list items are installed by default and cannot be archived or deleted.
GET /v1/list_items
Returns all list items.
Filters
- value_text — String for list_item value text
- value_num — Integer value for list item value num
- list_id — Integer ID for parent list ID
- list_name — String for parent list name
- archived — Boolean value for showing archived (can be combined with unarchived to show both)
- unarchived — Boolean value for showing unarchived (on by default, can be combined with archived to show both)
Common attributes
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 404 Not Found — Occurs when no records are found
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
An example of filters:
GET /v1/list_items/[id]
Returns a list item by ID.
Common Attributes
- id — Numerical unique ID for record
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 404 Not found — Occurs when record to show is not found
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
POST /v1/list_items
Creates a new list item from posted data.
Required Attributes
- value_text — String name of the list_item (required if value_num is blank and parent list.is_text is true)
- value_num — String name of the list_item (required if value_text is blank and parent list.is_text is false)
list_id — Integer of the parent list (required)
Common Attributes
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 422 Unprocessable entity — Occurs when validation fails and objects and errors are returned
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
PUT /v1/list_items/[id]
Updates an existing list item with values from a posted document.
Editable Attributes
- value_text — String name of the list_item (required if value_num is blank and parent list.is_text is true)
- value_num — String name of the list_item (required if value_text is blank and parent list.is_text is false)
list_id — Integer of the parent list (required)
- name — String name of the list item (required)
Toggle Archival Status
- toggle_archive — Boolean value that will toggle the archive status of an object
Common Attributes
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid.
- ERROR 404 Not found — Occurs when record to update is not found.
- ERROR 422 Unprocessable entity — Occurs when validation fails and objects and errors are returned
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
An example toggling the archive status of an object:
DELETE /v1/list_items/[id]
Deletes a list item.
Common Attributes
- id — Numerical unique ID for record
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 404 Not found — Occurs when no records are found
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
Sample Output
The following JSON is a sample output from GET /v1/list_items:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "45fc395380a559628a48a66e61b297c0"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 8d5508efe00975b2717eed48c1a09480
X-Runtime: 0.152000
Content-Type: application/json;charset=utf-8
Content-Length: 674
Date: Wed, 05 Sep 2012 18:52:52 GMT
[{
"archive_number": null,
"archived_at": null,
"created_at": "2012-09-05T13:53:25-04:00",
"created_by_id": 1,
"id": 26,
"is_text": true,
"name": "Sample List Item",
"updated_at": "2012-09-05T14:12:26-04:00",
"required?": false,
"list_item_items": [{
"archive_number": null,
"archived_at": null,
"created_at": "2012-09-05T13:53:25-04:00",
"id": 181,
"last_modified_by_id": null,
"updated_at": "2012-09-05T14:12:26-04:00",
"value_num": null,
"value_text": "Sample List Item Item 1"
}, {
"archive_number": null,
"archived_at": null,
"created_at": "2012-09-05T13:53:25-04:00",
"id": 182,
"last_modified_by_id": null,
"updated_at": "2012-09-05T14:12:26-04:00",
"value_num": null,
"value_text": "List Item Item 2"
}]
}]
The following XML is a sample output from GET /v1/list_items/1:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "9ea742c1727779538c4fc4bca1b5c259"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 2103b5e9df1d5773ea16d9bbfd9667c0
X-Runtime: 0.222000
Content-Type: application/xml;charset=utf-8
Content-Length: 6119
Date: Wed, 05 Sep 2012 15:38:46 GMT
<?xml version="1.0" encoding="UTF-8"?>
<list_item>
<archive-number nil="true"></archive-number>
<archived-at type="datetime" nil="true"></archived-at>
<created-at type="datetime">2012-09-05T13:53:25-04:00</created-at>
<created-by-id type="integer">1</created-by-id>
<id type="integer">26</id>
<is-text type="boolean">true</is-text>
<name>Sample List Item Again</name>
<updated-at type="datetime">2012-09-05T14:12:26-04:00</updated-at>
<required? type="boolean">false</required?>
<list_item-items type="array">
<list_item-item>
<archive-number nil="true"></archive-number>
<archived-at type="datetime" nil="true"></archived-at>
<created-at type="datetime">2012-09-05T13:53:25-04:00</created-at>
<id type="integer">181</id>
<last-modified-by-id type="integer" nil="true"></last-modified-by-id>
<updated-at type="datetime">2012-09-05T14:12:26-04:00</updated-at>
<value-num type="integer" nil="true"></value-num>
<value-text>Sample List Item Item 1</value-text>
</list_item-item>
<list_item-item>
<archive-number nil="true"></archive-number>
<archived-at type="datetime" nil="true"></archived-at>
<created-at type="datetime">2012-09-05T13:53:25-04:00</created-at>
<id type="integer">182</id>
<last-modified-by-id type="integer" nil="true"></last-modified-by-id>
<updated-at type="datetime">2012-09-05T14:12:26-04:00</updated-at>
<value-num type="integer" nil="true"></value-num>
<value-text>Sample List Item Item 2</value-text>
</list_item-item>
</list_item-items>
</list_item>
Related topics