Create a rig

Create a rig. Without git_url, appends the rig to city.toml synchronously (201). With git_url, clones and provisions asynchronously: returns 202 with an event_cursor — watch the city event stream for request.result.rig.create, rig.provision.progress, or request.failed carrying the request_id — or 200 for an idempotent replay of a succeeded create.

post/v0/city/{cityName}/rigs

Request

  • The document declares no server URL.
  • Auth: none declared. Required headers: X-GC-Request

Path parameters

cityNamestring required

City name.

Headers

X-GC-Requeststring required

Anti-CSRF header required on mutation requests. Any non-empty value is accepted; the header's presence is what the server checks.

Idempotency-Keystring

Idempotency key for safe retries (synchronous create).

Request body

default_branchstring

Mainline branch (e.g. main, master). Auto-detected when omitted.

git_urlstring

Git URL to clone (triggers async provisioning).

namestring required

Rig name.

pathstring

Filesystem path (server-derived for git_url clones).

prefixstring

Session name prefix.

request_idstring

Client-supplied idempotency key; reuse across retries.

Response

Rig already exists — idempotent request_id replay of a succeeded async create.

default_branchstring

Resolved mainline branch (created/exists).

event_cursorstring

City event-stream cursor captured before accept (202 only); pass as after_seq to the events stream to receive request.result.rig.create / rig.provision.progress / request.failed without replaying unrelated backlog.

prefixstring

Resolved session-name prefix (created/exists).

request_idstring

Correlation ID; echo of the request's request_id, or a server-minted id on 202.

rigstring

Rig name (created/exists).

status'created' | 'accepted' | 'exists' required

created (201 sync), accepted (202 async provisioning), exists (200 idempotent replay).

Changes

No recorded changes to this operation across all 50 revisions of this API.