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

# List all secrets

> Get a paginated list of all secrets



## OpenAPI

````yaml /swagger/5.12/ai-studio-swagger.yml get /secrets
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /secrets:
    get:
      tags:
        - secrets
      summary: List all secrets
      description: Get a paginated list of all secrets
      parameters:
        - name: page_size
          in: query
          description: Number of items per page
          schema:
            type: integer
        - name: page
          in: query
          description: Page number
          schema:
            type: integer
        - name: all
          in: query
          description: Return all records without pagination
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.SecretListResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '503':
          description: When TYK_AI_SECRET_KEY is not set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api.SecretListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/api.SecretResponse'
        meta:
          type: object
          properties:
            page_number:
              type: integer
            page_size:
              type: integer
            total_count:
              type: integer
            total_pages:
              type: integer
      description: Secret list response model
    api.ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
      description: Error response model
    api.SecretResponse:
      type: object
      properties:
        attributes:
          type: object
          properties:
            value:
              type: string
            var_name:
              type: string
        id:
          type: string
        type:
          type: string
      description: Secret response model
  securitySchemes:
    BearerAuth:
      type: apiKey
      name: Authorization
      in: header

````