HCC Docs

Dev sessions

Create a dev session (what `hcc dev` attaches with)

POST /v1/dev/sessions dev:connect

While it is attached, the test environment’s flow events go to it instead of the test flow endpoint URL, and it gets a copy of every test Event. One per workspace: the last one attached wins.

Body

  • host string

    The machine hcc dev runs on, shown on the dashboard’s banner

Responses

  • 201

    Created; open connectUrl within 60 s

    Fields
    • data DevSession required
      Fields
      • id string required
      • connectUrl string required

        The WebSocket to open, with token in the hcc-dev-token header

      • token string required

        One-time; opens the socket within 60 s

      • expiresAt string required

        When token stops working

      • webhookSecret string required

        Signs the copies of test Events the session forwards

      • workspace object required
      • flowEndpoint object required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 403

    A live key (test_mode_only): dev sessions run against the test environment only

  • 404

    Not found

  • 429

    rate_limited, or another limit named by error.code

Detach a dev session

DELETE /v1/dev/sessions/{id} dev:connect

Idempotent. Test flow events go to the test flow endpoint URL again.

Path

  • id string required

Responses

  • 204

    Detached

  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 403

    A live key (test_mode_only): dev sessions run against the test environment only

  • 404

    Not found

  • 429

    rate_limited, or another limit named by error.code