Skip to main content
GET
/
audits
/
{auditId}
/
risks
/
snapshots
TypeScript
import { Vanta } from "vanta-auditor-api-sdk";

const vanta = new Vanta({
  bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
});

async function run() {
  const result = await vanta.audits.listRiskSnapshots({
    auditId: "<id>",
  });

  console.log(result);
}

run();
{
  "results": {
    "pageInfo": {
      "hasNextPage": false,
      "hasPreviousPage": false,
      "startCursor": "507f1f77bcf86cd799439011",
      "endCursor": "507f1f77bcf86cd799439011"
    },
    "data": [
      {
        "id": "507f1f77bcf86cd799439011",
        "createdAt": "2024-08-15T14:30:00.000Z"
      }
    ]
  }
}

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

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.

Response

200 - application/json

Paginated list of risk snapshots with pagination metadata

results
object
required