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

# List secrets for a resource

> Retrieves a list of all secrets associated with a specific resource. Secrets are stored in Infisical and scoped by organization, project, and resource. Returns only secret metadata, not the actual secret values.



## OpenAPI

````yaml /openapi/em-runtime-governance-v2.yaml get /governance/resources/{resource_type}/{resource_id}/secrets
openapi: 3.1.0
info:
  title: em_runtime_governance
  version: 5.27.0
servers: []
security: []
paths:
  /governance/resources/{resource_type}/{resource_id}/secrets:
    get:
      tags:
        - secrets
      summary: List secrets for a resource
      description: >-
        Retrieves a list of all secrets associated with a specific resource.
        Secrets are stored in Infisical and scoped by organization, project, and
        resource. Returns only secret metadata, not the actual secret values.
      operationId: list_secrets
      parameters:
        - name: resource_type
          in: path
          required: true
          schema:
            type: string
            description: Type of resource containing the secrets
            title: Resource Type
          description: Type of resource containing the secrets
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier of the resource containing the secrets
            title: Resource Id
          description: Unique identifier of the resource containing the secrets
        - name: X-Project-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SecretSummary'
                title: Response List Secrets
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - HTTPBearer: []
components:
  schemas:
    SecretSummary:
      properties:
        name:
          type: string
          title: Name
          description: Name of the secret
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of the secret
        created_at:
          type: string
          title: Created At
          description: Timestamp when the secret was created
        updated_at:
          type: string
          title: Updated At
          description: Timestamp when the secret was last updated
      type: object
      required:
        - name
        - created_at
        - updated_at
      title: SecretSummary
      description: Lightweight representation used in list responses.
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
      description: Standard error response model.
    ErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
        request_id:
          type: string
          title: Request Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - code
        - message
        - request_id
        - timestamp
      title: ErrorBody
      description: Error body with structured details.
    ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - INVALID_TOKEN
        - INSUFFICIENT_PERMISSIONS
        - RESOURCE_NOT_FOUND
        - RESOURCE_ALREADY_EXISTS
        - VALIDATION_ERROR
        - RATE_LIMIT_EXCEEDED
        - SERVICE_UNAVAILABLE
        - INTERNAL_ERROR
      title: ErrorCode
      description: Standard error codes for API responses.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````