/rest/{version}/applications/{appId}/policy/eval?policyId={policyId}
Descriptor | Value |
---|---|
HTTP Method | GET |
Description | Gets the status of a policy even if the policy is not attached to the application. |
Required Permission | Read Access (Any Role) |
Version Introduced | 2.6 |
Request Header Parameters
Parameter | Value | Required | Description |
---|---|---|---|
Accept | String | Yes | A value of ‘application/json’ must be provided. |
Sample Call:
curl -X GET 'http://localhost:8080/threadfix/rest/Latest/applications/1/policy/eval?policyId=1' -H 'Authorization: APIKEY {apiKey}'
Sample Output:
Sample return for application having a scan.
{ "message": "", "success": true, "responseCode": -1, "object": { "id": null, "currentStatus": "FAILING", "statusLastChanged": null, "name": "ThreadFix Scan", "lastEvaluated": 1524505539031, "policy": { "name": "Low Policy", "filterName": "Low Filter", "id": 3 } } }
Sample return for an application with no scan.
{ "message": "", "success": true, "responseCode": -1, "object": { "id": null, "currentStatus": "NO SCANS FOUND", "statusLastChanged": null, "name": "ThreadFix No Scan", "lastEvaluated": 1524505897127, "policy": { "name": "Low Policy", "filterName": "Low Filter", "id": 3 } } }