Experimental - Repository Results View REST API

The Repository Results View REST API allows pulling up the information about components in a single repository. This REST API endpoint can be accessed by anyone with View IQ Elements permission.

POST Details Repository Results.

To get the details about the repository results, you can issue a POST request to the following path:

POST /api/experimental/repositories/{repositoryId}/results/details

You will also need to include JSON data specifying the page, page size, match state filters, violation state filters, search filters and sort fields.

Match State Filters

StateValue
All

MATCH_STATE_ALL

StateMATCH_STATE_EXACT
UnknownMATCH_STATE_UNKNOWN

Violation State Filters

StateValue
AllVIOLATION_STATE_ALL
Not ViolatingVIOLATION_STATE_NOT_VIOLATING
OpenVIOLATION_STATE_OPEN
QuarantinedVIOLATION_STATE_QUARANTINED
WaivedVIOLATION_STATE_WAIVED

Search Filters

FieldValue
Policy NamePOLICY_NAME
Component CoordinatesCOMPONENT_COORDINATES

Sort Fields

FieldValue
Policy Threat LevelPOLICY_THREAT_LEVEL
Policy NamePOLICY_NAME
Component CoordinatesCOMPONENT_COORDINATES
Quarantine TimeQUARANTINE_TIME

For example, you could send a JSON like this:

{
  "page": 1,
  "pageSize": 10,
  "matchStateFilters": [
    "MATCH_STATE_ALL"
  ],
  "violationStateFilters": [
    "VIOLATION_STATE_ALL"
  ],
  "searchFilters": [
    {
      "filterableField": "POLICY_NAME",
      "value": "Policy Name Test"
    }
  ],
  "sortFields": [
    {
      "sortableField": "POLICY_NAME",
      "asc": false,
      "sortPriority": 1
    }
  ]
}

If your request was successfully processed, the system will respond with the HTTP response code 200 OK and the json response will look like the following:

[
  {
    "threatLevel": 1,
    "policyName": "Architecture-Cleanup",
    "componentDisplayText": "ant : ant : 1.6.3",
    "pathname": "org/springframework/spring-core/5.3.6/spring-core-5.3.6.jar",
    "componentIdentifier": {
      "format": "maven",
      "coordinates": {
        "artifactId": "spring-core",
        "classifier": "",
        "extension": "jar",
        "groupId": "org.springframework",
        "version": "5.3.6"
      }
    },
    "hash": "8f91f60f628075701fde",
    "matchStateId": "exact",
    "quarantineTime": null,
    "waived": false
  },
  {
    "threatLevel": 7,
    "policyName": "Security-Medium",
    "componentDisplayText": "ant : ant : 1.6.3",
    "pathname": "org/springframework/spring-core/5.3.6/spring-core-5.3.6.jar",
    "componentIdentifier": {
      "format": "maven",
      "coordinates": {
        "artifactId": "spring-core",
        "classifier": "",
        "extension": "jar",
        "groupId": "org.springframework",
        "version": "5.3.6"
      }
    },
    "hash": "8f91f60f628075701fde",
    "matchStateId": "exact",
    "quarantineTime": null,
    "waived": false
  }
]