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

# Get Secrets For Current Environment



## OpenAPI

````yaml /openapi.json get /secrets/{workspace_id}/{team_id}/{project_id}/{environment_id}/
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /secrets/{workspace_id}/{team_id}/{project_id}/{environment_id}/:
    get:
      tags:
        - SECRET MANAGEMENT
      summary: Get Secrets For Current Environment
      operationId: >-
        get_secrets_for_current_environment_secrets__workspace_id___team_id___project_id___environment_id___get
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: environment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Environment Id
        - name: workspace_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Workspace Id
        - name: version
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: >-
              Read every secret at this version instead of its latest. Version
              numbers are per secret, so this is not an environment-wide
              snapshot: a secret with fewer versions is read at its newest one.
            title: Version
          description: >-
            Read every secret at this version instead of its latest. Version
            numbers are per secret, so this is not an environment-wide snapshot:
            a secret with fewer versions is read at its newest one.
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SecretResponse'
                title: >-
                  Response Get Secrets For Current Environment Secrets 
                  Workspace Id   Team Id   Project Id   Environment Id   Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
        - APIKeyHeader: []
components:
  schemas:
    SecretResponse:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        key:
          type: string
          title: Key
        value:
          type: string
          title: Value
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        current_version:
          type: integer
          title: Current Version
        environment_type:
          $ref: '#/components/schemas/EnvironmentType'
      type: object
      required:
        - id
        - key
        - value
        - created_at
        - updated_at
        - current_version
        - environment_type
      title: SecretResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EnvironmentType:
      type: string
      enum:
        - dev
        - staging
        - prod
        - pilot
        - custom
      title: EnvironmentType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````