REST v.2 components


Components are a critical part of the application infrastructure in BMC Release Process Management (RPM) and represent software components inside an application. Through their child object, installed components, they can be associated with particular applications and environments, storing versions and property values unique to those instances. This controller works closely with installed components, which are the objects assignable to components inside a request.

GET /v2/components

Returns a list of components to which you have access.

Filters

  • app_name—String value of the application name associated with a component
  • name—String value of the component name
  • property_name—String value of a property name associated with a component
  • request_template_id—Integer value of a request template
  • for_create—String value to return components with associated version tags

    Note

    You can use this filter only with one value: for_create: "release_plan". For more information, see Examples with filters.

Common attributes

  • format—Be sure to include an accept header or add JSON to the last path element
  • token—Your API token for authentication

Errors caused

  • ERROR 403 Forbidden—When the token is invalid
  • ERROR 404 Not Found—When no records are 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 a list of all components, run the following REST call:

curl -i -H "accept: applications/json" -X GET http://[rails_host]/v2/components?token=[api_token]

Examples with filters

To get components and their associated version tags, run the following REST call:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X GET -d '{"filters":{"for_create":"release_plan"}}' http://[rails_host]/v2/components?token=[api_token]

To get components and their associated version tags for a specific request template, run the following REST call:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X GET -d '{"filters":{"for_create":"release_plan","request_template_id":2 }}' http://[rails_host]/v2/components?token=[api_token]

To get components used in a specific request template, run the following REST call:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X GET -d '{"filters":{"request_templates_id":2}}' http://[rails_host]/v2/components?token=[api_token]

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*