Rest Constraints - Documentation for Bmc Release Process Management 5.0.07
Get /V1/constraintsReturns All the Constraints (Unarchived by Default). Filtersconstraint — Complex Filter by Constraint (By Id and Type; Only Supported Type...
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 IDconstrainable_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 elementtoken— Your API Token for authentication
Errors caused
ERROR 403 Forbidden— Occurs when the token is invalidERROR 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>'
Must Read
GET /v1/constraints/[id]
Returns a constraint by the ID.
Common attributes
id— Numerical unique ID for recordformat— Ensure to include an accept header or add .xml or .json to the last path elementtoken— Your API Token for authentication
Errors caused
ERROR 403 Forbidden— Occurs when the token is invalidERROR 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