Rest Constraints - Documentation for Bmc Release Process Management 5.0.07

GET /v1/constraints

Returns all the constraints (unarchived by default).

Filters

  • constraint — Complex filter by constraint (by ID and type; only supported type is ‘RouteGate’). See sample below.
  • governor — Complex filter by governor (by ID and type; only supported type is ‘PlanStageInstance). See sample below.
  • route_id — Integer for route ID
  • constrainable_type – String for constrainable type (currently only ‘RouteGate’ supported)
  • active — Boolean value for showing active (on by default, can be combined with inactive to show both)
  • inactive — Boolean value for showing inactive (can be combined with active to show both)

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 404 Not Found — Occurs when no records are found

Examples

To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:

curl -i -H "accept: text/xml" -X GET 
curl -i -H "accept: application/json" -X GET 

An example of filters:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X GET -d '{ "filters": { "name":"Dev" } }' 

An example of filters with constraint:

curl -i -H "accept: application/json" -H "Content-type: application/json" -X GET -d '{ "filters": { "constraint": { "id":1, "type":"RouteGate" } } }' 

An example of filters with governor:

curl -i -H "accept: text/xml" -H "Content-type: text/xml" -X GET -d '<filters><governor><id>1</id><type>PlanStageInstance</type></governor></filters>' 

GET /v1/constraints/[id]

Returns a constraint by the ID.

Common attributes

  • id — Numerical unique ID for record
  • 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 404 Not found — Occurs when record to show is not found

Examples

To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:

curl -i -H "accept: text/xml" -X GET 
curl -i -H "accept: application/json" -X GET 
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest