REST apps
Apps (short for applications) are the primary software objects in BMC Release Process Management. Apps have components that are installed in multiple environments and can be deployed through process models, such as plans and requests.
GET /v1/apps
Returns all the apps
Filters
- name — String value for the application name
- active — Boolean value indicating active apps (default is to show only active apps)
- inactive — Boolean value indicating inactive apps
Common attributes
- format — Ensure that you 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, enter this URL or your valid API key and application host into a browser or HTTP client, such as wget or curl. For example:
An example of filters:
GET /v1/apps/[id]
Returns an app by the ID
Common attributes
- id — Numeric unique ID for a record
- format — Ensure that you 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, enter this URL or your valid API key and application host into a browser or HTTP client, such as wget or curl. For example:
POST /v1/apps
Creates a new app from a posted data
Required attribute
- name — Unique name (string) of the app
Optional attributes
- active — Boolean value (default is true)
- app_version — String that represents the application version
- business_process_ids — Array of integer IDs for related business processes
- component_ids — Array of integer IDs for related components
- component_template_ids — Array of integer IDs for related component templates
- default — Boolean value (default value is false)
- description — String that describes the app
- environment_ids — Array of integer IDs for related environments
- installed_component_ids — Array of integer IDs for related installed components
- package_template_ids — Array of integer IDs for related package templates
- request_ids — Array of integer IDs for related requests
- team_ids — Array of integer IDs for related teams
- ticket_ids — Array of integer IDs for related tickets
- user_ids — Array of integer IDs for related users
Common attributes
- format — Ensure that you 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, enter this URL or your valid API key and application host into a browser or HTTP client, such as wget or curl. For example:
PUT /v1/apps/[id]
Updates an existing app with values from a posted document
Editable attributes
- active — Boolean value (default is true)
- app_version — String that represents the application version
- business_process_ids — Array of integer IDs for related business processes
- component_ids — Array of integer IDs for related components
- component_template_ids — Array of integer IDs for related component templates
- default — Boolean value (default value is false)
- description — String that describes the app
- environment_ids — Array of integer IDs for related environments
- installed_component_ids — Array of integer IDs for related installed components
- name — Unique name (string) of the app
- package_template_ids — Array of integer IDs for related package templates
- request_ids — Array of integer IDs for related requests
- team_ids — Array of integer IDs for related teams
- ticket_ids — Array of integer IDs for related tickets
- user_ids — Array of integer IDs for related users
Common attributes
- format — Ensure that you 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, enter this URL or your valid API key and application host into a browser or HTTP client, such as wget or curl. For example:
DELETE /v1/apps/[id]
Makes an app inactive. Sets the active parameter for the app to false.
Common attributes
- id — Numerical unique ID for the record
- format — Ensure that you 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
Sample output
The following JSON is a sample output from GET /v1/apps:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "eeeb7bdbbb9f3cf4b0fa00e781e6fdd1"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 01f9fa0eeb3138f7920d30e7029849ad
X-Runtime: 1.759000
Content-Type: application/json;charset=utf-8
Content-Length: 6418
Date: Tue, 23 Oct 2012 13:33:59 GMT
[{
"active": true,
"app_version": "2.0.4",
"created_at": "2011-04-29T00:12:12-04:00",
"default": false,
"id": 1,
"name": "SR_|_SmartRelease",
"updated_at": "2012-09-06T08:11:35-04:00",
"requests": [{
"id": 35,
"name": "Request Example"
}],
"steps": [{
"id": 1,
"name": "Step 1"
}],
"environments": [{
"id": 1,
"name": "aws_cloud"
}, {
"id": 2,
"name": "production"
}],
"components": [{
"id": 1,
"name": "AppContainer"
}, {
"id": 2,
"name": "SS_Apache"
}, {
"id": 3,
"name": "SS_Passenger"
}, {
"id": 4,
"name": "SS_MySQL"
}, {
"id": 5,
"name": "SS_RailsApp"
}],
"installed_components": [{
"id": 7
}, {
"id": 8
}, {
"id": 9
}, {
"id": 10
}, {
"id": 1
}, {
"id": 2
}, {
"id": 5
}, {
"id": 6
}, {
"id": 3
}, {
"id": 4
}],
"teams": [],
"users": [{
"email": "admin@example.com",
"first_name": "John",
"id": 1,
"last_name": "Administrator",
"login": "admin"
}],
"tickets": []
"routes":[{
"id":3,
"name":"Another Production Route",
"route_type":"open",
"route_gates": [{
"description":null,
"id":5
}]
}, {
"id":1,
"name":"[default]",
"route_type":"open",
"route_gates": [{
"description":null,
"id":1
},{
"description":null,
"id":4
}]
}]
}]
The following XML is a sample output from GET /v1/apps/1:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "ba08d21ab2b9fd1b708f87104fb3394e"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: f03b6c4fe25ae6231d34ddf89579e1e9
X-Runtime: 0.857000
Content-Type: application/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 23 Oct 2012 13:38:23 GMT
<?xml version="1.0" encoding="UTF-8"?>
<app>
<active type="boolean">true</active>
<app-version>2.0.4</app-version>
<created-at type="datetime">2011-04-29T00:12:12-04:00</created-at>
<default type="boolean">false</default>
<id type="integer">1</id>
<name>SR_|_SmartRelease</name>
<updated-at type="datetime">2012-09-06T08:11:35-04:00</updated-at>
<requests type="array">
<request>
<id type="integer">1</id>
<name nil="true"></name>
</request>
</requests>
<steps type="array">
<step>
<id type="integer">1</id>
<name>Step 1</name>
</step>
</steps>
<environments type="array">
<environment>
<id type="integer">1</id>
<name>aws_cloud</name>
</environment>
<environment>
<id type="integer">2</id>
<name>production</name>
</environment>
</environments>
<components type="array">
<component>
<id type="integer">1</id>
<name>AppContainer</name>
</component>
<component>
<id type="integer">2</id>
<name>SS_Apache</name>
</component>
<component>
<id type="integer">3</id>
<name>SS_Passenger</name>
</component>
<component>
<id type="integer">4</id>
<name>SS_MySQL</name>
</component>
<component>
<id type="integer">5</id>
<name>SS_RailsApp</name>
</component>
</components>
<installed-components type="array">
<installed-component>
<id type="integer">7</id>
</installed-component>
<installed-component>
<id type="integer">8</id>
</installed-component>
<installed-component>
<id type="integer">9</id>
</installed-component>
<installed-component>
<id type="integer">10</id>
</installed-component>
<installed-component>
<id type="integer">1</id>
</installed-component>
<installed-component>
<id type="integer">2</id>
</installed-component>
<installed-component>
<id type="integer">5</id>
</installed-component>
<installed-component>
<id type="integer">6</id>
</installed-component>
<installed-component>
<id type="integer">3</id>
</installed-component>
<installed-component>
<id type="integer">4</id>
</installed-component>
</installed-components>
<teams type="array"/>
<users type="array">
<user>
<email>admin@example.com</email>
<first-name>John</first-name>
<id type="integer">1</id>
<last-name>Administrator</last-name>
<login>admin</login>
</user>
</users>
<tickets type="array"/>
<routes type="array">
<route>
<id type="integer">3</id>
<name>Another Production Route</name>
<route-type>open</route-type>
<route-gates type="array">
<route-gate>
<description nil="true"></description>
<id type="integer">5</id>
</route-gate>
</route-gates>
</route>
<route>
<id type="integer">1</id>
<name>[default]</name>
<route-type>open</route-type>
<route-gates type="array">
<route-gate>
<description nil="true"></description>
<id type="integer">1</id>
</route-gate>
<route-gate>
<description nil="true"></description>
<id type="integer">4</id>
</route-gate>
</route-gates>
</route>
</routes>
</app>
Related topic