Skip to main content
GET
/
audits
/
{auditId}
/
risks
/
{snapshotId}
Java
package hello.world;

import com.vanta.vanta_auditor_api.Vanta;
import com.vanta.vanta_auditor_api.models.operations.ListAuditRisksRequest;
import com.vanta.vanta_auditor_api.models.operations.ListAuditRisksResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Vanta sdk = Vanta.builder()
                .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
            .build();

        ListAuditRisksRequest req = ListAuditRisksRequest.builder()
                .auditId("<id>")
                .snapshotId("<id>")
                .build();

        ListAuditRisksResponse res = sdk.audits().listAuditRisks()
                .request(req)
                .call();

        if (res.paginatedResponseAuditRisk().isPresent()) {
            System.out.println(res.paginatedResponseAuditRisk().get());
        }
    }
}
{
  "results": {
    "pageInfo": {
      "hasNextPage": true,
      "hasPreviousPage": false,
      "startCursor": "5f2c939a52855e725c8d5824",
      "endCursor": "5f2c939a52855e725c8d5824"
    },
    "data": [
      {
        "id": "5f2c939a52855e725c8d5824",
        "riskId": "RISK-001",
        "riskScenario": "Unauthorized access to production database",
        "likelihood": 4,
        "impact": 5,
        "inherentRisk": 20,
        "treatment": "MITIGATE",
        "treatmentStatus": "IN_PROGRESS",
        "residualRisk": 6,
        "reviewStatus": "APPROVED",
        "owner": {
          "displayName": "Jane Doe"
        },
        "categories": [
          "Cryptography",
          "Privacy"
        ],
        "ciaCategories": [
          "CONFIDENTIALITY",
          "INTEGRITY"
        ],
        "linkedControlIds": [
          "control-1",
          "control-2"
        ],
        "identified": "2023-01-15T10:00:00.000Z"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://developer.vanta.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

auditId
string
required

The audit ID

snapshotId
string
required

The risk assessment snapshot ID

Query Parameters

pageSize
integer<int32>
default:10

Maximum number of results per page (1-100, default 10) Controls the maximum number of items returned in one response from the API.

Required range: 1 <= x <= 100
pageCursor
string

Pagination cursor from previous response A marker or pointer, telling the API where to start fetching items for the subsequent page in a paginated dataset. Note that the requested page will not include the item that corresponds to this cursor but will start from the one immediately after this cursor.

Search term for filtering by risk scenario description

orderBy
enum<string>

Field to sort results by. Allowed: "riskId", "riskScenario", "inherentRisk", "treatment", "residualRisk", "reviewStatus", "owner", "categories", "ciaCategories", "identified". Default: "identified"

Available options:
inherentRisk,
riskId,
riskScenario,
treatment,
residualRisk,
reviewStatus,
owner,
categories,
ciaCategories,
identified
orderDirection
enum<string>

Sort direction: "asc" or "desc". Default: "desc" Sort direction: "asc" for ascending, "desc" for descending.

Available options:
asc,
desc

Response

200 - application/json

Paginated list of risks with pagination metadata

results
object
required