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

# Sql credential list



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sql-credentials
openapi: 3.1.0
info:
  description: >-
    Deterministic biological evidence primitives with typed resource, list, and
    error responses. Each operation documents its own response shape,
    provenance, warnings, and transport headers.
  title: Rafflesia API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.rafflesia.ai
security:
  - bearerAuth: []
paths:
  /v1/sql-credentials:
    get:
      tags:
        - Sql credentials
      summary: Sql credential list
      operationId: sql_credential.list
      parameters:
        - explode: false
          in: query
          name: organization_id
          schema:
            type: string
        - explode: false
          in: query
          name: environment_id
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: OK
          headers:
            Rafflesia-Contract-Digest:
              schema:
                type: string
            Rafflesia-Version:
              schema:
                type: string
            X-Request-ID:
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Too Many Requests
          headers:
            Retry-After:
              description: Whole seconds to wait before retrying the request.
              schema:
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Service Unavailable
        '504':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeSQLCredentialListData'
          description: Gateway Timeout
      x-codeSamples:
        - lang: bash
          source: |
            curl --request GET \
              --url "https://api.rafflesia.ai/v1/sql-credentials" \
              --header "Authorization: Bearer $RAFFLESIA_API_KEY"
components:
  schemas:
    EnvelopeSQLCredentialListData:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/EnvelopeSQLCredentialListData.json
          format: uri
          readOnly: true
          type: string
        data:
          $ref: '#/components/schemas/SQLCredentialListData'
          description: Operation result data. Absent when the operation did not succeed.
        error:
          $ref: '#/components/schemas/APIError'
          description: Structured error information.
        evidence:
          $ref: '#/components/schemas/EvidenceSummary'
          description: Mechanical evidence summary for agent inspection and chaining.
        ok:
          description: Whether the operation succeeded.
          type: boolean
        provenance:
          $ref: '#/components/schemas/Provenance'
          description: Execution provenance.
        warnings:
          description: Non-fatal warnings.
          items:
            $ref: '#/components/schemas/Warning'
          type:
            - array
            - 'null'
      required:
        - ok
        - warnings
        - provenance
      type: object
    SQLCredentialListData:
      additionalProperties: false
      properties:
        connection:
          $ref: '#/components/schemas/SQLConnectionInfo'
        sql_credentials:
          items:
            $ref: '#/components/schemas/SQLCredential'
          type:
            - array
            - 'null'
      required:
        - connection
        - sql_credentials
      type: object
    APIError:
      additionalProperties: false
      properties:
        code:
          description: Stable specific error code.
          type: string
        details:
          additionalProperties: {}
          description: Additional structured error details.
          type: object
        doc_url:
          description: Stable documentation URL for this error code.
          type: string
        message:
          description: Human-readable error message.
          type: string
        param:
          description: Request field responsible for the error when known.
          type: string
        type:
          description: Stable coarse error category.
          enum:
            - invalid_request_error
            - resource_missing
            - resource_expired
            - conflict_error
            - rate_limit_error
            - authentication_error
            - permission_error
            - billing_error
            - api_error
          type: string
      required:
        - type
        - code
        - message
        - doc_url
      type: object
    EvidenceSummary:
      additionalProperties: false
      properties:
        duration_ms:
          description: >-
            Primary elapsed duration in milliseconds when the response exposes
            one.
          format: int64
          type: integer
        input_refs:
          description: >-
            Input references detected from request fields such as object_id,
            structure_id, target_id, and sequence_id.
          items:
            type: string
          type:
            - array
            - 'null'
        object_refs:
          description: Object ids or object refs visible in the response/provenance.
          items:
            type: string
          type:
            - array
            - 'null'
        output_refs:
          description: Output references detected from response data and generated objects.
          items:
            type: string
          type:
            - array
            - 'null'
        row_count:
          description: >-
            Primary row count or returned row count when the response exposes
            one.
          format: int64
          type: integer
        warnings_count:
          description: Number of non-fatal warnings in the envelope.
          format: int64
          type: integer
      required:
        - warnings_count
      type: object
    Provenance:
      additionalProperties: false
      properties:
        cache_hit:
          description: Whether cached output was reused.
          type: boolean
        created_at:
          description: UTC timestamp.
          type: string
        database_snapshots:
          description: Database snapshots used.
          items:
            $ref: '#/components/schemas/DatabaseSnapshot'
          type:
            - array
            - 'null'
        generated_object_ids:
          description: Object ids created by the operation.
          items:
            type: string
          type:
            - array
            - 'null'
        input_hash:
          description: SHA-256 hash of canonical request input.
          type: string
        operation:
          description: Primitive operation id.
          type: string
        parameters_hash:
          description: SHA-256 hash of parameters.
          type: string
        request_id:
          description: Unique request identifier.
          type: string
        server_version:
          description: Server version.
          type: string
        tool_versions:
          description: Tool versions used.
          items:
            $ref: '#/components/schemas/ToolVersion'
          type:
            - array
            - 'null'
      required:
        - request_id
        - operation
        - created_at
        - server_version
      type: object
    Warning:
      additionalProperties: false
      properties:
        code:
          description: Stable warning code.
          type: string
        details:
          additionalProperties: {}
          description: Additional structured warning details.
          type: object
        message:
          description: Human-readable warning message.
          type: string
      required:
        - code
        - message
      type: object
    SQLConnectionInfo:
      additionalProperties: false
      properties:
        catalog_database:
          type: string
        contract_version:
          type: string
        default_database:
          type: string
        dialect:
          type: string
        endpoint:
          type: string
        object:
          type: string
      required:
        - object
        - dialect
        - endpoint
        - default_database
        - catalog_database
        - contract_version
      type: object
    SQLCredential:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        description:
          type: string
        environment_id:
          type: string
        id:
          type: string
        is_active:
          type: boolean
        last_rotated_at:
          format: date-time
          type:
            - string
            - 'null'
        name:
          type: string
        object:
          type: string
        organization_id:
          type: string
        reader_role:
          type: string
        revoked_at:
          format: date-time
          type:
            - string
            - 'null'
        username:
          type: string
      required:
        - object
        - id
        - name
        - organization_id
        - environment_id
        - username
        - reader_role
        - is_active
        - created_at
      type: object
    DatabaseSnapshot:
      additionalProperties: false
      properties:
        digest:
          type: string
        kind:
          type: string
        name:
          type: string
        version:
          type: string
      required:
        - name
        - version
      type: object
    ToolVersion:
      additionalProperties: false
      properties:
        name:
          type: string
        path:
          type: string
        version:
          type: string
      required:
        - name
        - version
      type: object
  securitySchemes:
    bearerAuth:
      description: 'A Rafflesia API key, sent as `Authorization: Bearer <key>`.'
      scheme: bearer
      type: http

````