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

# Check connection status

> Returns the current connection state for a camera (connected/disconnected,
model, id). When connected, `data.mode` reports the active SDK
connection mode (`remote` / `remote-transfer` / `contents`).




## OpenAPI

````yaml /openapi.yaml get /api/cameras/{cameraId}/connection
openapi: 3.1.0
info:
  title: Alpha Camera REST API
  version: 3.0.0
  description: >
    RESTful control for Sony cameras — shooting, settings, live view with OSD
    overlay,

    focus control, and file transfer through a clean HTTP interface.


    Built on the Sony Camera Remote SDK. Supports USB and network camera
    connections

    with multi-camera simultaneous operation.


    ## Connection Modes


    | Mode | Description |

    |------|-------------|

    | `remote` | Full camera control: shooting, settings, live view.
    Auto-transfer images to host PC. |

    | `remote-transfer` | Camera control + explicit SD card file access. Most
    capable mode. |

    | `contents` | SD card file access only. No shooting or settings control. |


    ## Quick Start


    1. `GET /api/cameras` — discover cameras

    2. `POST /api/cameras/{id}/connection` — connect

    3. `PUT /api/cameras/{id}/priority-key` — set to `pc-remote`

    4. `PUT /api/cameras/{id}/properties/{name}` — configure settings

    5. `POST /api/cameras/{id}/actions/af-shutter` — shoot

    6. `DELETE /api/cameras/{id}/connection` — disconnect


    ## Priority Key Requirement


    The camera's priority key **must** be set to `pc-remote` before it accepts
    any

    remote property changes or shooting commands.
  license:
    name: Proprietary
  contact:
    name: Camera Remote SDK
    url: https://github.com/ocjlee888/camera-remote-sdk-project
servers:
  - url: http://{host}:{port}
    description: |
      Local camera server. The server binary runs on the host that has the
      camera physically connected (USB or network). Defaults to
      `http://localhost:8080`; override `host` and `port` when the server
      runs on a different machine (e.g. a Raspberry Pi next to the camera).
    variables:
      host:
        default: localhost
        description: Host running the camera server binary
      port:
        default: '8080'
        description: Port the camera server is listening on
security: []
tags:
  - name: Connection
    description: Camera discovery, connection, and disconnection
  - name: Properties
    description: Read and write camera properties (ISO, aperture, shutter speed, etc.)
  - name: Actions
    description: Shooting commands and motor control (shutter, zoom, focus)
  - name: Live View
    description: Live view streaming and OSD overlay control
  - name: Events
    description: Server-Sent Events for real-time camera callbacks
  - name: SD Card
    description: SD card file browsing and download
  - name: Settings
    description: Save path configuration and camera settings file management
  - name: Server
    description: Server health, status, and log retrieval
paths:
  /api/cameras/{cameraId}/connection:
    get:
      tags:
        - Connection
      summary: Check connection status
      description: >
        Returns the current connection state for a camera
        (connected/disconnected,

        model, id). When connected, `data.mode` reports the active SDK

        connection mode (`remote` / `remote-transfer` / `contents`).
      operationId: getConnectionStatus
      parameters:
        - $ref: '#/components/parameters/cameraId'
      responses:
        '200':
          description: Connection status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionStatusResponse'
components:
  parameters:
    cameraId:
      name: cameraId
      in: path
      required: true
      description: Camera identifier (e.g. `D10F60149B0C`)
      schema:
        type: string
  schemas:
    ConnectionStatusResponse:
      type: object
      description: |
        Response envelope for `GET /api/cameras/{id}/connection`. When the
        camera is connected, `data.mode` reports the active SDK connection
        mode (`remote` / `remote-transfer` / `contents`) so clients don't
        have to remember what they passed at connect time. When the camera
        is not connected, `data` is omitted.
      example:
        success: true
        message: Camera connected
        camera:
          connected: true
          model: ILCE-7M4
          id: D06CE00004C4
        data:
          mode: remote-transfer
      required:
        - success
      properties:
        success:
          type: boolean
        message:
          type: string
        camera:
          $ref: '#/components/schemas/CameraSummary'
        data:
          type: object
          properties:
            mode:
              $ref: '#/components/schemas/ConnectionMode'
    CameraSummary:
      type: object
      description: Camera info embedded in API responses
      properties:
        connected:
          type: boolean
          example: false
        model:
          type: string
          example: ILCE-7M4
        id:
          type: string
          example: D06CE05E3323
    ConnectionMode:
      type: string
      enum:
        - remote
        - remote-transfer
        - contents
      description: >
        - `remote` — Full control + auto-transfer of captured images to host PC

        - `remote-transfer` — Full control + explicit SD card file access

        - `contents` — SD card file access only (no shooting or settings
        control)

````