Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
/rest/policies/{policyId}
Descriptor | Value |
---|---|
HTTP Method | GET |
Description | Get details for a single policy |
Restricted | True |
Changes in 2.4.1 | Added the statusLastChanged and lastEvaluated fields to the response. These fields are also now in the older versions of the call. |
Request Header Parameters
Parameter | Value | Required | Description |
---|---|---|---|
Accept | String | Yes | A value of ‘application/json’ must be provided. |
Sample Call:
Code Block | ||
---|---|---|
| ||
curl --insecure -H 'Accept: application/json' http://localhost:8080/threadfix/rest/policies/1?apiKey={apiKey} |
Sample Output:
Code Block | ||
---|---|---|
| ||
{ "message": "", "success": true, "responseCode": -1, "object": { "id": 1, "name": "Critical Policy", "policyStatuses": [ { "id": 2, "passing": true, "emailLists": [], "emailAddresses": [ "email1@testemail.com", "email3@testemail.com" ], "sendEmail": false, "statusLastChanged": 1469133001000, "name": "Passing App", "lastEvaluated": 1469133001000, "policy": { "name": "Critical Policy", "filterName": "Critical Filter", "id": 1 }, "application": { "name": "Passing App", "id": 1, "team": { "name": "Test Team", "id": 1 } } }, { "id": 1, "passing": false, "emailLists": [ { "id": 1, "name": "Sample Email List", "emailAddresses": [ "email1@testemail.com", "email2@testemail.com" ] } ], "emailAddresses": [], "sendEmail": false, "statusLastChanged": null, "name": "Failing App", "lastEvaluated": 1469132998000, "policy": { "name": "Critical Policy", "filterName": "Critical Filter", "id": 1 }, "application": { "name": "Failing App", "id": 2, "team": { "name": "Test Team", "id": 1 } } } ], "filterJsonBlob": { "id": 1, "json": "{\"scanners\":[],\"genericVulnerabilities\":[],\"severities\":{\"critical\":true},\"numberMerged\":null,\"path\":null,\"parameter\":null,\"numberVulnerabilities\":10,\"showOpen\":true,\"showClosed\":false,\"showFalsePositive\":false,\"showHidden\":false,\"showDefectPresent\":false,\"showDefectNotPresent\":false,\"showDefectOpen\":false,\"showDefectClosed\":false,\"showInconsistentClosedDefectNeedsScan\":false,\"showInconsistentClosedDefectOpenInScan\":false,\"showInconsistentOpenDefect\":false,\"daysOldModifier\":null,\"daysOld\":null,\"startDate\":null,\"endDate\":null,\"filterType\":{\"isVulnSearchFilter\":true},\"genericSeverities\":[{\"intValue\":5}],\"channelTypes\":[],\"usingComponentsWithKnownVulnerabilities\":false}", "name": "Critical Filter", "defaultTrending": false }, "emailLists": [ { "id": 1, "name": "Sample Email List", "emailAddresses": [ "email1@testemail.com", "email2@testemail.com" ] } ], "emailAddresses": [ "email3@testemail.com" ], "sendEmail": false, "applications": [ { "id": 1, "name": "Passing App", "url": null, "applicationCriticality": { "id": 2, "name": "Medium" }, "team": { "name": "Test Team", "id": 1 } }, { "id": 2, "name": "Failing App", "url": null, "applicationCriticality": { "id": 2, "name": "Medium" }, "team": { "name": "Test Team", "id": 1 } } ] } } |
Page Tree | ||
---|---|---|
|