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

# Get one Connection

> Never returns credentials.

**Scope:** `workspace:connections:read`. See [API Tokens](https://docs.cloudthinker.io/guide/api/tokens.md#scopes).


## OpenAPI

````yaml /api-reference/openapi.json get /v1/workspaces/{workspace_id}/workspace/connections/{connection_id}
openapi: 3.1.0
info:
  title: CloudThinker Public API
  version: 1.0.0
  description: >-
    Public API v1. Every path names its workspace. IDs are UUIDs. Lists page
    with `limit` and `cursor`. Writes take `Idempotency-Key`. A write runs at
    once when the token's scopes allow it. Clients ask their person first for
    operations marked `x-confirm`.
servers:
  - url: https://app.cloudthinker.io/api/public
security:
  - bearer: []
tags:
  - name: token
    description: The calling token.
  - name: chat
    description: Ask CloudThinker and read past conversations.
  - name: resolve
    description: Production signals, incidents and root cause analysis.
  - name: review
    description: Code reviews, findings and release risk.
  - name: approvals
    description: Approval requests waiting for a person.
  - name: workspace
    description: Connections and their health.
  - name: optimize
    description: Cloud cost overview, savings findings and anomalies.
  - name: cyber
    description: Pentest apps and findings, code audits.
paths:
  /v1/workspaces/{workspace_id}/workspace/connections/{connection_id}:
    get:
      tags:
        - workspace
      summary: 'Get one Connection: status, status message, tools, latest test.'
      description: Never returns credentials.
      operationId: workspace.connections.get
      parameters:
        - $ref: '#/components/parameters/WorkspaceId'
        - name: connection_id
          in: path
          required: true
          description: Connection id.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionDetail'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - bearer: []
components:
  parameters:
    WorkspaceId:
      name: workspace_id
      in: path
      required: true
      description: Workspace to act in. Every call names it.
      schema:
        type: string
        format: uuid
  headers:
    X-Request-ID:
      description: Request id. Quote it to support.
      schema:
        type: string
    RateLimit-Limit:
      description: Requests allowed in the current window.
      schema:
        type: integer
    RateLimit-Remaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the window resets.
      schema:
        type: integer
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  schemas:
    ConnectionDetail:
      type: object
      title: ConnectionDetail
      properties:
        id:
          type: string
          format: uuid
        kind:
          $ref: '#/components/schemas/ConnectionKind'
        name:
          type: string
        prefix:
          type: string
        alias:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        category:
          anyOf:
            - $ref: '#/components/schemas/ConnectionCategory'
            - type: 'null'
        environment:
          anyOf:
            - $ref: '#/components/schemas/ConnectionEnvironment'
            - type: 'null'
        status:
          $ref: '#/components/schemas/ConnectionStatus'
        status_message:
          type: string
        cost_capable:
          type: boolean
          description: True when Optimize can read cost data through it.
        tools:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionTool'
        locations:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionLocation'
          description: Saved URL, host, region and tenant values. Never credentials.
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        test:
          anyOf:
            - $ref: '#/components/schemas/ConnectionTest'
            - type: 'null'
          description: Latest test. Null when never tested.
        demo:
          type: boolean
          description: True when it runs on CloudThinker's shared demo environment.
      required:
        - id
        - kind
        - name
        - prefix
        - alias
        - description
        - category
        - environment
        - status
        - status_message
        - cost_capable
        - tools
        - locations
        - updated_at
        - test
        - demo
      description: One installed Connection with its latest test.
    ConnectionKind:
      type: string
      enum:
        - builtin
        - mcp
      title: ConnectionKind
    ConnectionCategory:
      type: string
      enum:
        - cloud_platform
        - infrastructure_automation
        - container_platform
        - app_platform
        - database
        - ai_engineering
        - monitoring
        - log_analytics
        - incident_management
        - software_delivery
        - security_identity
        - compliance
        - soc
        - work_management
        - product_insight
        - data_streaming
      title: ConnectionCategory
    ConnectionEnvironment:
      type: string
      enum:
        - production
        - staging
        - development
      title: ConnectionEnvironment
    ConnectionStatus:
      type: string
      enum:
        - connected
        - testing
        - disconnecting
        - error
      title: ConnectionStatus
    ConnectionTool:
      type: object
      title: ConnectionTool
      properties:
        name:
          type: string
        enabled:
          type: boolean
        approval:
          type: boolean
          description: True when each call needs a person's approval.
      required:
        - name
        - enabled
        - approval
    ConnectionLocation:
      type: object
      title: ConnectionLocation
      properties:
        key:
          type: string
        value:
          type: string
      required:
        - key
        - value
    ConnectionTest:
      type: object
      title: ConnectionTest
      properties:
        connection_id:
          type: string
          format: uuid
        phase:
          $ref: '#/components/schemas/ConnectionTestPhase'
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        elapsed_ms:
          type:
            - integer
            - 'null'
        last_error:
          type:
            - string
            - 'null'
        failure_kind:
          anyOf:
            - $ref: '#/components/schemas/ConnectionFailureKind'
            - type: 'null'
      required:
        - connection_id
        - phase
        - started_at
        - elapsed_ms
        - last_error
        - failure_kind
      description: Latest connection test.
    ApiErrorResponse:
      type: object
      title: ApiErrorResponse
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorDetail'
        request_id:
          type: string
      required:
        - error
        - request_id
      description: >-
        Every non-2xx response. Read `error.code` and `error.action`; quote
        `request_id` to support.
      x-todo:
        - >-
          detail: deprecated untyped compatibility payload; still sent by the
          server, left out of the public contract
    ConnectionTestPhase:
      type: string
      enum:
        - queued
        - starting_sandbox
        - running_script
        - succeeded
        - failed
        - timeout
        - cancelled
      title: ConnectionTestPhase
    ConnectionFailureKind:
      type: string
      enum:
        - auth_failed
        - host_key_mismatch
        - unreachable
        - remote_exit_code
      title: ConnectionFailureKind
    ApiErrorDetail:
      type: object
      title: ApiErrorDetail
      properties:
        code:
          anyOf:
            - $ref: '#/components/schemas/ApiErrorCode'
            - type: string
        category:
          $ref: '#/components/schemas/ApiErrorCategory'
        message:
          type: string
        action:
          anyOf:
            - $ref: '#/components/schemas/ApiErrorAction'
            - type: 'null'
        action_target:
          type:
            - string
            - 'null'
        retryable:
          type: boolean
        field_errors:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/ApiFieldError'
      required:
        - code
        - category
        - message
      x-todo:
        - >-
          context: untyped dict[str, JsonValue] in today's model; type its known
          keys or keep it out of the public contract
    ApiErrorCode:
      type: string
      enum:
        - validation_error
        - unauthenticated
        - forbidden
        - not_found
        - conflict
        - rate_limited
        - dependency_unavailable
        - dependency_timeout
        - internal_error
      title: ApiErrorCode
    ApiErrorCategory:
      type: string
      enum:
        - invalid_input
        - unauthenticated
        - forbidden
        - policy_blocked
        - plan_limit
        - not_found
        - conflict
        - reconnect_required
        - rate_limited
        - dependency_unavailable
        - dependency_timeout
        - internal
      title: ApiErrorCategory
    ApiErrorAction:
      type: string
      enum:
        - fix_input
        - open_settings
        - contact_admin
        - upgrade
        - buy_credits
        - reconnect
        - retry
        - reload
        - sign_in
        - sso_login
        - copy_error_id
      title: ApiErrorAction
    ApiFieldError:
      type: object
      title: ApiFieldError
      properties:
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        code:
          type: string
        message:
          type: string
      required:
        - path
        - code
        - message
  responses:
    BadRequest:
      description: The request is malformed.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    Unauthenticated:
      description: Missing, expired or revoked token.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    Forbidden:
      description: The token lacks the scope, or your role lacks the permission.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    NotFound:
      description: Not found in this workspace, or you are not a member.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    ValidationError:
      description: A parameter or body field is invalid. See `error.field_errors`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    RateLimited:
      description: Too many requests. Wait `Retry-After` seconds.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        CloudThinker token: a personal access token `ct_pat_…` (fine-grained
        scopes, created in Settings) or an OAuth access token `ct_oat_…` (1
        hour, from the OAuth flow). Send `Authorization: Bearer <token>`. Scopes
        have the form `module:resource:read|write`; write includes read.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.