REST v.2 releases
A release is an application version with a specific set of component versions that can be deployed through the stages of a route. A release can be created using the BMC Release Lifecycle Management Requester UI (now called Release Process Management - Requester UI, 5.0.03.001 onward)
GET /v2/release_plans
Returns a list of releases to which you have access in RLM Requester UI (now called RPM Requester UI, 5.0.03.001 onward).
Filters
name—String for the release name
Common attributes
- format—Ensure to include an accept header or add 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 or you do not have appropriate permissions.
Examples
To test this method, insert the URL or your valid API key and application host into a browser or HTTP client like Wget or cURL.
To get a list of all releases from the RLM Requester UI (now called RPM Requester UI, 5.0.03.001 onward), run the following REST call:
Example with filters
To get the details of a release by name, run the following REST call:
GET /v2/release_plans/[id]
Returns a release by ID.
Common attributes
- id—Numerical unique ID for record
- format—Ensure to include an accept header or add 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 the URL or your valid API key and application host into a browser or HTTP client like Wget or cURL.
To get the details of a release by ID, run the following REST call:
Sample output
The following JSON is a sample output from GET /v2/releases[id]:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge,chrome=1
ETag: "2cc123e9d6250a7304c599313c07946b"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 82e494f1ea321abc54c14f17dbac6d84
X-Runtime: 0.487000
Date: Fri, 29 Jul 2016 11:47:38 GMT
X-Rack-Cache: miss
Vary: Origin
Content-Type: application/json;charset=utf-8
Content-Length: 1450
[{
"created_at":"2016-07-27T07:14:56-04:00",
"id":2,"name":"JPetStore",
"default_route":{"id":2,"name":"[default]",
"accessible_environments":[{"environment_type_id":2,"id":3,"name":"DEV1"},{"environment_type_id":2,"id":4,"name":"DEV2"},{"environment_type_id":3,"id":5,"name":"TEST"}],
"enabled_environments":[{"environment_type_id":2,"id":3,"name":"DEV1"},{"environment_type_id":2,"id":4,"name":"DEV2"},{"environment_type_id":3,"id":5,"name":"TEST"}]},
"plan":{"id":2,"name":"JPetStore","stages":[{"id":3,"name":"Development","position":1,"required":true,"environment_type":{"id":2,"name":"Development"}}, {"id":4,"name":"Testing","position":2,"required":true,"environment_type":{"id":3,"name":"Testing"}}]},
"plan_template":{"id":2,"name":"JPetStore_plan"},
"request_template":{"id":2,"name":"JPS_req_templ"},
"app":{"id":2,"name":"JPetStore"},
"release":{"id":3,"name":"5.1"},
"release_plan_components":[{"component_name":"Jenkins","id":2,"version_tag_name":"5.0.00.01"}],
"accessible_requests":[{"aasm_state":"created","id":10,"name":"JPetStore 5.1 DEV1","updated_at":"2016-07-27T07:15:03-04:00","number":1010,"plan_member":{"id":8,"stage":{"id":4,"name":"Development"},"environment":{"deployment_policy":"opened","id":3,"name":"DEV1"}}},{"aasm_state":"created","id":9,"name":"JPetStore 5.1 DEV2","updated_at":"2016-07-27T07:15:03-04:00","number":1009,"plan_member":{"id":6,"stage":{"id":3,"name":"Development"},"environment":{"deployment_policy":"opened","id":3,"name":"DEV2"}}}]
}]
POST /v2/release_plans
Creates a new release from the posted data.
Required attributes
- {{code language="none"}}
app_id
{{/code}}—Integer ID of the application for which you create a release - plan_template_id—Integer ID of the plan template that you want to use for release creation
- request_template_id—ID of the request template for the application for which a release is created
- Specify one of the following attributes:
- release_id—Integer value of a release tag template ID
- manual_release—String value of a release tag
- release_plan_components_attributes:
- component_name—String value of a component name which is used in the request template
- version_tag_name—String value of a version tag name which is assigned to the component
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 the URL or your valid API key and application host into a browser or HTTP client like Wget or cURL.
To create a release with a release tag template, run the following REST call:
To create a release with a manual release tag, run the following REST call:
Related topics