Skip to main content

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

State

Value

All

MATCH_STATE_ALL

State

MATCH_STATE_EXACT

Unknown

MATCH_STATE_UNKNOWN

Violation State Filters

State

Value

All

VIOLATION_STATE_ALL

Not Violating

VIOLATION_STATE_NOT_VIOLATING

Open

VIOLATION_STATE_OPEN

Quarantined

VIOLATION_STATE_QUARANTINED

Waived

VIOLATION_STATE_WAIVED

Search Filters

Field

Value

Policy Name

POLICY_NAME

Component Coordinates

COMPONENT_COORDINATES

Sort Fields

Field

Value

Policy Threat Level

POLICY_THREAT_LEVEL

Policy Name

POLICY_NAME

Component Coordinates

COMPONENT_COORDINATES

Quarantine Time

QUARANTINE_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
  }
]