> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kosli.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.kosli.com/feedback

```json
{
  "path": "/api-reference/snapshots/list-snapshots",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# List snapshots

> Get list of snapshots for an environment.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json get /snapshots/{org}/{env_name}
openapi: 3.1.0
info:
  title: Kosli API
  summary: The API for communicating with Kosli
  description: >

    # Authentication 


    When making requests against Kosli API, you can authenticate your requests
    using a bearer token. 

    Set the bearer token in the request Authorization header to a valid API
    key. 

    API Keys can be personal or for service accounts. Check the [service
    accounts
    documentation](https://docs.kosli.com/getting_started/service-accounts/) for
    details. 


    ## Curl example


    ```shell

    curl -H "Authorization: Bearer <<your-api-key>>"
    https://app.kosli.com/api/v2/environments/<<your-org-name>>

    ```
  version: '2.0'
servers:
  - url: https://app.kosli.com/api/v2
    description: EU
  - url: https://app.us.kosli.com/api/v2
    description: US
security:
  - HTTPBearer: []
paths:
  /snapshots/{org}/{env_name}:
    get:
      tags:
        - Snapshots
      summary: List snapshots
      description: Get list of snapshots for an environment.
      operationId: get_snapshot_snapshots__org___env_name__get
      parameters:
        - name: env_name
          in: path
          required: true
          schema:
            type: string
            title: Env Name
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: The page number of response
            default: 1
            title: Page
          description: The page number of response
        - name: per_page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: How many results to return per page of response
            default: 15
            title: Per Page
          description: How many results to return per page of response
        - name: interval
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: |-
              Expression to specify the interval of snapshots to query.
              Must be two snapshot expressions separated by '..'
              ie: '5..10', or '~5..NOW
            default: 1..NOW
            title: Interval
          description: |-
            Expression to specify the interval of snapshots to query.
            Must be two snapshot expressions separated by '..'
            ie: '5..10', or '~5..NOW
        - name: reverse
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: >-
              Return results in reverse order. Expected values: True or False.
              Defaults to False.
            default: false
            title: Reverse
          description: >-
            Return results in reverse order. Expected values: True or False.
            Defaults to False.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GetSnapshotListItem'
                title: Response 200 Get Snapshot Snapshots  Org   Env Name  Get
        '404':
          description: Flow Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__35
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    GetSnapshotListItem:
      properties:
        index:
          type: integer
          title: Index
        from:
          type: number
          title: From
        to:
          type: number
          title: To
        compliant:
          type: boolean
          title: Compliant
        duration:
          type: number
          title: Duration
      type: object
      required:
        - index
        - from
        - to
        - compliant
        - duration
      title: GetSnapshotListItem
    fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__35:
      properties:
        message:
          type: string
          title: Message
          description: Error message
        errors:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Errors
          description: Validation errors by field
      type: object
      required:
        - message
      title: NotFoundResponseModel
      description: Flow not found
      examples:
        - message: Flow not found
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````