Manifest Evaluation REST API - v2


The Manifest Evaluation REST API provides a way to perform an application policy evaluation on supported manifest files discovered in a source control branch

Manifest evaluations are executed asynchronously and it is thus a 2-step process for the API user to obtain the results:

Request a Manifest Evaluation

To request a manifest evaluation, you need the ID of the application associated with the source control repository, the name of the target branch in the source control repository and the ID of the target stage.  For manifest evaluations, the target stage is usually "develop".  Other stage IDs that can be used are "build", "stage-release", "release", "operate".

POST /api/v2/evaluation/applications/{applicationInternalId}/manifestEvaluation

with a JSON body:

	"stageId": "develop",
	"branchName": "my-test-branch-name"

Example using the cURL tool:

curl -u admin:admin123 -X POST -H "Content-Type: application/json" -d '{"stageId":"develop","branchName":"my-test-branch-name"}' 'http://localhost:8070/api/v2/evaluation/applications/cb748fb6ff8f4251b40b63edf1cc465c/manifestEvaluation'

which will result in a JSON response like this:

	"statusUrl": "api/v2/evaluation/applications/cb748fb6ff8f4251b40b63edf1cc465c/status/accc369749774924baa1d207494c29e1"

Check the Status of a Manifest Evaluation Request

The status URL returned above can be used to check the manifest evaluation status:

GET api/v2/evaluation/applications/{applicationInternalId}/status/{statusId}

Example using the cURL tool:

curl -u admin:admin123 'http://localhost:8070/api/v2/evaluation/applications/cb748fb6ff8f4251b40b63edf1cc465c/status/accc369749774924baa1d207494c29e1'

The response will include one of three possible status values:

  • "FAILED"

For example, if the manifest evaluation is still in progress:

	"status": "PENDING"

or, in the rare case of an error that causes the manifest evaluation to fail:

	"status": "FAILED",
	"reason": "message"

or, finally, if the evaluation is successful links to the evaluation report are provided:

	"status": "COMPLETED",
	"reportHtmlUrl": "ui/links/application/cb748fb6ff8f4251b40b63edf1cc465c/report/affdb6b964a64f0bad2db7170c7560dc",
	"embeddableReportHtmlUrl": "ui/links/application/cb748fb6ff8f4251b40b63edf1cc465c/report/affdb6b964a64f0bad2db7170c7560dc/embeddable",
	"reportPdfUrl": "ui/links/application/cb748fb6ff8f4251b40b63edf1cc465c/report/affdb6b964a64f0bad2db7170c7560dc/pdf",
	"reportDataUrl": "api/v2/applications/cb748fb6ff8f4251b40b63edf1cc465c/reports/affdb6b964a64f0bad2db7170c7560dc"