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

# Get Secret

> Get detailed information about a secret.

**Required Role:** VIEWER or higher

Returns:
- Secret metadata (no credentials)
- Number of locations using this secret
- List of locations using this secret

**Security Note:** Credentials are NEVER returned.



## OpenAPI

````yaml GET /v1/teams/{team_id}/secrets/{secret_id}
openapi: 3.1.0
info:
  title: Data Raven API
  description: Cloud-to-cloud data transfer platform powered by RClone
  version: 0.5.0
servers: []
security: []
paths:
  /v1/teams/{team_id}/secrets/{secret_id}:
    get:
      tags:
        - Secrets
      summary: Get Secret Details
      description: |-
        Get detailed information about a secret.

        **Required Role:** VIEWER or higher

        Returns:
        - Secret metadata (no credentials)
        - Number of locations using this secret
        - List of locations using this secret

        **Security Note:** Credentials are NEVER returned.
      operationId: get_secret_details_v1_teams__team_id__secrets__secret_id__get
      parameters:
        - name: secret_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Secret Id
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretDetailResponse'
        '404':
          description: Secret not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SecretDetailResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        secret_type:
          $ref: '#/components/schemas/LocationType'
        auth_method:
          $ref: '#/components/schemas/AuthMethod'
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          type: string
          format: uuid
          title: Created By
        vault_secret_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Vault Secret Id
          description: AWS SSM Parameter Store secret ID (null if using external vault)
        vault_connection_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Vault Connection Id
          description: External vault connection ID (null if using AWS SSM Parameter Store)
        vault_connection_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Vault Connection Name
          description: Name of the vault connection
        vault_type:
          anyOf:
            - $ref: '#/components/schemas/VaultType'
            - type: 'null'
          description: Type of external vault (onepassword, doppler, infisical)
        external_field_mappings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: External Field Mappings
          description: Field name to vault reference mappings
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Email
          description: Email of user who created this secret
        updated_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Updated By
          description: User who last updated this secret
        updated_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated By Email
          description: Email of user who last updated this secret
        location_count:
          type: integer
          title: Location Count
          description: Number of locations using this secret
        locations:
          anyOf:
            - items:
                $ref: '#/components/schemas/LocationReference'
              type: array
            - type: 'null'
          title: Locations
          description: Locations using this secret
        task_count:
          type: integer
          title: Task Count
          description: Number of tasks using locations with this secret
          default: 0
        tasks:
          anyOf:
            - items:
                $ref: '#/components/schemas/TaskReference'
              type: array
            - type: 'null'
          title: Tasks
          description: Tasks using locations with this secret
      type: object
      required:
        - id
        - name
        - description
        - secret_type
        - auth_method
        - created_at
        - created_by
        - updated_at
        - location_count
      title: SecretDetailResponse
      description: Schema for detailed secret information including usage statistics.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LocationType:
      type: string
      enum:
        - s3
        - azure_blob
        - gcs
        - r2
        - b2
        - wasabi
        - railway
        - oracle_object_storage_s3
        - s3_compatible
        - tigris
        - digitalocean_spaces
        - hetzner
        - rabata
      title: LocationType
      description: Cloud storage provider types.
    AuthMethod:
      type: string
      enum:
        - s3_access_key
        - r2_access_key
        - wasabi_access_key
        - railway_access_key
        - oracle_object_storage_s3_access_key
        - s3_compatible_access_key
        - tigris_access_key
        - digitalocean_spaces_access_key
        - hetzner_access_key
        - rabata_access_key
        - azure_account_key
        - azure_sas_url
        - gcs_service_account
        - b2_application_key
      title: AuthMethod
      description: |-
        Authentication mechanism identifiers for cloud storage credentials.

        Each provider may support one or more authentication methods.
        Explicit names ensure clarity and make it easy to add new methods.
    VaultType:
      type: string
      enum:
        - onepassword
        - doppler
        - infisical
      title: VaultType
      description: |-
        External vault provider types for credential storage.

        ONEPASSWORD: 1Password via service account SDK
        DOPPLER: Doppler secrets manager via service token
        INFISICAL: Infisical via machine identity (Universal Auth)
    LocationReference:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: LocationReference
      description: Minimal location info for use in secret details.
    TaskReference:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: TaskReference
      description: Minimal task info for use in secret details.
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````