Using REST API
This topic contains the following high level information about the REST API provided in BMC Release Process Management:
Introduction to REST API in BMC Release Process Management
BMC Release Process Management uses a representational state transfer (REST) API for invoking functionality. In the context of the product, a REST-ful approach entails the following design commitments:
- Collection and member endpoints based on plural model names (for example "v1/requests" and "v1/requests/[id]")
- HTTP verbs map to allowed activities
- GET /collection returns the index or list view of a collection
- GET /collection/[id] returns an individual member of a collection
- POST /collection adds a member to a collection based on submitted data
- PUT /collection/[id] updates an individual member based on submitted data
- DELETE /collection/[id] attempts to delete an individual member of a collection. If the delete functionality is not available for the specified collection, the appropriate member of the collection becomes inactive or archived.
- HTTP status codes are returned to indicate status of request (for example, 200 OK or 404 Not Found) — see Error-codes-for-REST-API for latest list
- JSON and XML formats are supported for retrieval and posting, in addition to URL parameters
REST API endpoints
The REST API is handled by a parallel set of controllers that run alongside the user interface controllers. The URL for REST calls is the same as the user-interface URL, including any ports or JBoss namespace. For example, if your users access BMC Release Process Management at http://www.example.com:8080/brpm/, place all of the endpoints shown in the following table after the brpm in that URL. In a typical JBoss installation, the port and the namespace for the web application brpm are required. The full address for an API call to get a list of components would be http://www.example.com:8080/brpm/v1/components.
REST API token
To get the REST API token, you must be an administrator user. Go to your profile screen and click Show next to the API key.
REST clients
A REST API can be consumed by a variety of HTTP clients, such as curl, wget, and REST client interfaces in common programming languages. The examples that follow use curl.
Supported models
The following functions can be performed in BMC Release Process Management by using REST API:
Model name | Endpoints | Description |
---|---|---|
/v1/activity_logs | Activity logs are audit entries written when significant events in the core process models, like requests and steps, occur. | |
/v1/apps | Applications are software units that can be assigned to environments and deployed through requests. | |
/v1/business_processes | Business processes are used for categorizing requests to enable planning and reporting. | |
/v1/categories | Categories are metadata elements that group requests for reporting. | |
/v1/components | Components are abstract software sub-units. They might be used as installed components when they are assigned to a particular application and environment. | |
/v1/constraints |
| |
v1/deployment_windows/series | Deployment windows are special calendar events for allowing or preventing the access the specific environments. | |
/v1/environments | Environments are designated collections of servers and other resources, for example, Quality Assurance, User Acceptance Testing, Production, and Cloud environments. | |
/v1/environment_types | Environment types are used to categorize the environments. | |
/v1/groups | Groups are ad hoc organizational units of users collected for reporting or mass assignment to teams. | |
/v1/installed_components | Installed components are components that are assigned to a particular application and environment pair. | |
/v1/job_runs | Job runs are created by internal background workers and can be used to track automation progress in a read-only manner. | |
/v1/list_items | List_items permit string and integer values to be stored in lists that determine BMC Release Process Management program behavior or new user-defined dictionaries (see also lists). | |
/v1/lists | Lists permit interface elements to be configured as well as user-defined lists to be created (see also list_items). | |
/v1/notification_templates | Notification templates provide liquid template-based email configuration for system notification events. | |
/v1/package_contents | Package contents are metadata elements that group steps for reporting. | |
/v1/phases | Phases are metadata elements that group steps for reporting. | |
/v1/plan_stages | Plan stages are the major scheduling gates of a release plan template, such as Quality Assurance, Staging, or Production. | |
/v1/plan_stage_instances |
| |
/v1/plan_routes |
| |
/v1/routes |
| |
/v1/route_gates |
| |
/v1/plan_templates | Plan templates are saved collections of stages and request templates that structure and populate new release plans with requests. | |
/v1/plans | Plans are instances of a particular plan template to which runs and requests can be assigned. | |
/v1/procedures | Procedures are collections of steps that you can reuse in multiple requests and associate with applications. | |
/v1/properties | Properties are name-value pair storage with an audit log of all past values and polymorphic associations with a variety of models. | |
/v1/project_servers | Project servers contain integration servers for Rally, ServiceNow, and other supported integrations. | |
/v1/releases | Releases are tags for requests and plans to be used for reporting. | |
/v1/request_templates | Request templates are a convenient way to save effective requests and steps for reuse. | |
/v1/requests | Requests are the primary process model for a release, belonging to plans and containing steps and procedures. | |
/v1/runs | Runs are process models, belonging to plans and organizing a set of requests for serial or parallel execution. | |
/v1/server_groups | Server groups are collections of servers. | |
/v1/servers | Servers are logical computer names that can be assigned to installed components and have properties. | |
/v1/steps | Steps are process models that belong to requests, can be grouped in procedures, and do manual or automated work. | |
/v1/teams | Teams are collections of users for which access permissions may be set for many users at once. | |
/v1/tickets | Tickets are internal markers for outside ticketing services (JIRA, Rally, and so on) that can be assigned to plans, requests, and steps. | |
/v1/users | Users are system or external (LDAP) resources controlling program access and roles. | |
/v1/version_tags | Version tags are an authority table of versions for installed components that scope the available versions for request steps. | |
/v1/work_tasks | Work tasks are metadata models by which steps can be categorized for reporting. |