> ## 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.

# List snapshotted issues for an audit

> Retrieves a list of snapshots that have been shared with an audit.

The snapshots returned contain metadata about point-in-time captures of issues for an audit.
This data can be used to filter down the list of issues to specific snapshots when querying the GET /audits/{auditId}/issues/items endpoint.

Supports filtering by:
- `search`: full text search across snapshot title and description

Results are sorted by snapshot creation date in descending order (newest first).

Uses cursor-based pagination. To paginate:
1. Make initial request with desired `pageSize`
2. Check `results.pageInfo.hasNextPage`
3. Use `results.pageInfo.endCursor` as `pageCursor` for next request

Rate limit: 10 requests / minute.



## OpenAPI

````yaml https://spec.speakeasy.com/vanta/vanta/conduct-an-audit-with-code-samples get /audits/{auditId}/issues/snapshots
openapi: 3.0.0
info:
  title: Conduct an audit
  version: 1.0.0
  description: >-
    The Auditor API lets audit firms conduct audits from a tool outside of
    Vanta. Unlock data syncing with Vanta through this API.


    **Note for Vanta Gov (FedRAMP) customers:** Select `Vanta Gov (FedRAMP)`
    from the server dropdown to issue requests against
    `https://api.vanta-gov.com`. The OAuth token URL shown below defaults to the
    commercial host — replace it with `https://api.vanta-gov.com/oauth/token`.
  termsOfService: https://www.vanta.com/terms
  license:
    name: UNLICENSED
  contact:
    name: API Support
    url: https://help.vanta.com/
    email: support@vanta.com
servers:
  - url: https://api.vanta.com/v1
    description: Vanta (Commercial)
  - url: https://api.vanta-gov.com/v1
    description: Vanta Gov (FedRAMP)
security: []
paths:
  /audits/{auditId}/issues/snapshots:
    get:
      tags:
        - Audits
      summary: List snapshotted issues for an audit
      description: >-
        Retrieves a list of snapshots that have been shared with an audit.


        The snapshots returned contain metadata about point-in-time captures of
        issues for an audit.

        This data can be used to filter down the list of issues to specific
        snapshots when querying the GET /audits/{auditId}/issues/items endpoint.


        Supports filtering by:

        - `search`: full text search across snapshot title and description


        Results are sorted by snapshot creation date in descending order (newest
        first).


        Uses cursor-based pagination. To paginate:

        1. Make initial request with desired `pageSize`

        2. Check `results.pageInfo.hasNextPage`

        3. Use `results.pageInfo.endCursor` as `pageCursor` for next request


        Rate limit: 10 requests / minute.
      operationId: ListAuditSnapshots
      parameters:
        - description: The audit ID
          in: path
          name: auditId
          required: true
          schema:
            type: string
        - description: Maximum number of results per page (1-100, default 10)
          in: query
          name: pageSize
          required: false
          schema:
            $ref: '#/components/schemas/PageSize'
        - description: Pagination cursor from previous response
          in: query
          name: pageCursor
          required: false
          schema:
            $ref: '#/components/schemas/PageCursor'
        - description: Search term for filtering by snapshot title and description
          in: query
          name: search
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedIssueSnapshotMetadataResponse'
              examples:
                Example 1:
                  value:
                    results:
                      pageInfo:
                        hasNextPage: false
                        hasPreviousPage: false
                        startCursor: null
                        endCursor: null
                      data:
                        - id: 5f2c939a52855e725c8d5823
                          title: Snapshot taken on 2024-06-01T00:00:00Z
                          description: >-
                            This snapshot captures all open issues as of June
                            1st, 2024.
                          createdAt: '2024-06-01T00:00:00.000Z'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: ListAuditSnapshots
          source: |-
            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.listAuditSnapshots({
                auditId: "<id>",
              });

              console.log(result);
            }

            run();
        - lang: java
          label: ListAuditSnapshots
          source: >-
            package hello.world;


            import com.vanta.vanta_auditor_api.Vanta;

            import
            com.vanta.vanta_auditor_api.models.operations.ListAuditSnapshotsResponse;

            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();

                    ListAuditSnapshotsResponse res = sdk.audits().listAuditSnapshots()
                            .auditId("<id>")
                            .pageSize(10)
                            .call();

                    if (res.paginatedIssueSnapshotMetadataResponse().isPresent()) {
                        System.out.println(res.paginatedIssueSnapshotMetadataResponse().get());
                    }
                }
            }
components:
  schemas:
    PageSize:
      type: integer
      format: int32
      default: 10
      description: >-
        Controls the maximum number of items returned in one response from the
        API.
      minimum: 1
      maximum: 100
    PageCursor:
      type: string
      description: >-
        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.
    PaginatedIssueSnapshotMetadataResponse:
      $ref: '#/components/schemas/PaginatedResponse_IssueSnapshotMetadata_'
    PaginatedResponse_IssueSnapshotMetadata_:
      properties:
        results:
          properties:
            data:
              items:
                $ref: '#/components/schemas/IssueSnapshotMetadata'
              type: array
            pageInfo:
              $ref: '#/components/schemas/PageInfo'
          required:
            - data
            - pageInfo
          type: object
      required:
        - results
      type: object
      additionalProperties: false
    IssueSnapshotMetadata:
      properties:
        id:
          type: string
          description: The unique identifier for the issue snapshot.
          example: 5f2c939a52855e725c8d5823
        title:
          type: string
          description: The title of the snapshot
          example: Snapshot taken on 2024-06-01T00:00:00Z
        description:
          type: string
          description: The description of the snapshot
          example: This snapshot captures all open issues as of June 1st, 2024.
        createdAt:
          type: string
          format: date-time
          description: The date and time when the snapshot was created.
          example: '2024-06-01T00:00:00.000Z'
      required:
        - id
      type: object
      additionalProperties: false
    PageInfo:
      description: Provides information about the pagination of a dataset.
      properties:
        endCursor:
          type: string
          nullable: true
          description: >-
            The cursor that points to the end of the current page, or null if
            there is no such cursor.
        hasNextPage:
          type: boolean
          description: Indicates if there is another page after the current page.
        hasPreviousPage:
          type: boolean
          description: Indicates if there is a page before the current page.
        startCursor:
          type: string
          nullable: true
          description: >-
            The cursor that points to the start of the current page, or null if
            there is no such cursor.
      required:
        - endCursor
        - hasNextPage
        - hasPreviousPage
        - startCursor
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````