Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

/rest/{version}/applications/{appId}/policyStatuses

Descriptor

Value

HTTP Method

GET

Description

Get the status for all policies attach to the application with the provided appId.

Required Permission

Read Access (Any Role)

Version Introduced

2.4.0

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.

Changes in 2.5.1.12

Changed the "passing" field to "currentStatus".  The values are "PASSING", "FAILING", and "NO SCANS FOUND".

Changes in 2.6.2

Adds application details to the response.

Changes in 2.7.5

Added "testEnvironment", "releaseFrequency", and "isInternal" to the REST call response.

Request Header Parameters

Parameter

Value

Required

Description

Accept

String

Yes

A value of ‘application/json’ must be provided.

Sample Call:

Code Block
themeEclipse
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" http://localhost:8080/threadfix/rest/latest/applications/1/policyStatuses

Sample Output:

Values for statusLastChanged and lastEvaluated are returned as Epoch time in milliseconds.

Eclipse
Code Block
theme
{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": [
        {
            "id": 2,
            "currentStatus": "PASSING",
            "statusLastChanged": 1469133001000,
            "name": "Passing App",
            "lastEvaluated": 1469133001000,
            "policy": {
                "name": "Critical Policy",
                "filterName": "Critical Filter",
                "id": 1
            }
        }
    ]
}

 From version 2.6.2

Values for statusLastChanged and lastEvaluated are returned as Epoch time in milliseconds.

Eclipse
Code Block
theme
{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": {
        "id": 1,
        "name": "Main Application",
        "url": null,
        "applicationCriticality": {
            "id": 2,
            "name": "Medium"
        },
        "overallPolicyStatus": "PASSING",
        "policyStatuses": [
            {
            "id": 2,
            "currentStatus": "PASSING",
            "statusLastChanged": 1469133001000,
            "name": "Passing App",
            "lastEvaluated": 1469133001000,
            "policy": {
                "name": "Critical Policy",
                "filterName": "Critical Filter",
                "id": 1
            }
        }
    ],
	"description": null,
    "releaseFrequency": "UNKNOWN",
    "testEnvironment": null,
    "isInternal": false
}


Page Tree
rootPolicies API