REST v.2 request properties


Requests are the primary process model of BMC Release Process Management (RPM). They can belong to plans and projects and typically have one or more steps that do manual or automated work to complete the release.

Note

When you open a request in RPM, the request URL contains a request number. To receive a request ID, subtract 1000 from a request number. For example:

  • PostgreSQL: If the number specified in the request URL is 1001, then the request ID is 1.
  • Oracle: If the number specified in the request URL is 11001, then the request ID is 10001.

GET /v2/request_properties

Returns a list of all request properties which a user can access.

Note

The GET method for the request properties does not return the runtime request properties.

Filters

request_idInteger ID of a request for which you want to retrieve request properties

request_template_idInteger ID of a request template for which you want to retrieve request properties. Request template ID can be obtained using the GET method for request templates.

stage_id—Integer value for the stage included in the plan

Note

The stage_id filter works only when combined with the release_id filter.

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 a list of all request properties:

curl -i -H "accept: application/json" -H "Content-Type: application/json" -X GET http://[rails_host]/v2/request_properties/?token=[api_token]

GET /v2/request_properties/[id]

Returns a request property by ID.

Common attributes

  • id—Numerical unique ID for the 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:

curl -i -H "accept:  application/json" -H "Content-Type: application/json" -X GET http://[rails_host]/brpm/v2/release_plans/[id]?token=[api_token]

POST /v2/request_properties

Creates a new request property in a request or request template from the posted data. You can create request properties only for the requests with the CreatedPlanned, or Hold statuses.

Required attributes

  • name—String for the request property name

Depending on the object for which you create a request property, one of the following is required:

  • request_id—Integer ID of a request for which you want to create request properties
  • request_template_idInteger ID of a request template for which you want to create request properties. Request template ID can be obtained using the GET method for request templates.

Optional attributes

  • value—String value of a request property
  • private—Boolean value
  • required—Boolean value

Common attributes

  • format—An accept header or JSON added 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 request property in a request template:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X POST -d '{"name": "Prop_02", "value": "value_02", "request_template_id": "1"}' http://[rails_host]/v2/request_properties?token=[api_token]

To create a private request property in a request template:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X POST -d '{"name": "Prop_03", "value": "value_03_Private", "private:"true, "request_template_id": "1", }' http://[rails_host]/v2/request_properties?token=[api_token]

To create a required request property in a request template:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X POST -d '{"name": "Prop_04", "value": "value_04", "required:" true, "request_template_id": "1", }' http://[rails_host]/v2/request_properties?token=[api_token]

 To create a request property in a request:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X POST -d '{"name": "Prop_02", "value": "value_02", "request_id": "1000"}' http://[rails_host]/v2/request_properties?token=[api_token]

 To create a required request property in a request:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X POST -d '{"name": "Prop_04", "value": "value_04", "required:" true, "request_id": "1000", }' http://[rails_host]/v2/request_properties?token=[api_token]

PUT /v2/request_properties/[id]

Updates an existing request property with values from a posted document. You can edit request properties only for the requests with the Created, Planned, or Hold statuses.

Editable attributes

  • name—String for the request property name
  • private—Boolean value

    Note

     If you decrypt a private request property, the value of this property is cleared.

  • required—Boolean value
  • value—String value of a request property

Common attributes

  • format—An accept header or .xml or .json added to the last path element
  • token—API Token for authentication

Errors caused

  • ERROR 403 Forbidden—Occurs when the token is invalid
  • ERROR 404 Not found—Occurs when the 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 the URL or your valid API key and application host into a browser or HTTP client like Wget or cURL.

curl -i -H "accept: application/json" -H "Content-type: application/json" -X PUT -d '{"name": "Req_Prop_01_Updated","private":false, "required": false}'  http://[rails_host]/v2/request_properties/[id]?token=[api_token]

DELETE /v2/request_properties/[id]

Deletes a request property from a request or request template.

Common attributes

  • id—Numerical unique ID for the record
  • format—An accept header or .xml or .json added to the last path element
  • token—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 the URL or your valid API key and application host into a browser or HTTP client like Wget or cURL.

curl -i -H "accept:  application/json" -H "Content-Type: application/json" -X DELETE http://[rails_host]/v2/request_properties/[id]?token=[api_token]

 

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