Skip to main content
GET
/
audits
/
{auditId}
/
personnel
/
groups
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.listPersonnelGroups({
    auditId: "<id>",
  });

  console.log(result);
}

run();
{
  "results": {
    "pageInfo": {
      "hasNextPage": true,
      "hasPreviousPage": false,
      "startCursor": "5f2c939a52855e725c8d5824",
      "endCursor": "5f2c939a52855e725c8d5824"
    },
    "data": [
      {
        "id": "5f2c939a52855e725c8d5824",
        "name": "Engineering",
        "members": 42,
        "source": "Okta",
        "tasks": [
          {
            "name": "Security Training"
          },
          {
            "name": "Policy Acceptance"
          }
        ],
        "tasksLastUpdated": "2024-06-15T10:30:00.000Z",
        "pointOfContact": "Jane Doe"
      }
    ]
  }
}

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.

Search term for filtering by group name

sourcesMatchesAny
string[]

Filter groups by IDP source service names

orderBy
enum<string>

Field to sort results by. Allowed: "name", "members", "source", "tasksLastUpdated", "pointOfContact". Default: "name"

Available options:
name,
members,
source,
tasksLastUpdated,
pointOfContact
orderDirection
enum<string>

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

Available options:
asc,
desc

Response

200 - application/json

Paginated list of groups with pagination metadata

results
object
required