레퍼런스HTTP APIWorkspace settings

Choose the author App people link their GitHub accounts with (owner or admin)

PUT
/v1/workspaces/{id}/github-settings/user-link-app

Names the author connection (connection_id) whose OAuth client people link their accounts with. The client secret belongs to that connection: after a change, oauth.client_secret_set is that connection's, so a secret may need setting again (PUT …/oauth-client-secret). A link started before the change cannot finish with the old connection's state. A reviewer connection is 400 role_mismatch; an unknown one 404. Writes a set_github_app receipt with the connection before and after; receipt_id is null when nothing changed. API keys are refused.

Auth: cookie session only; no scope. Idempotency-Key: ignored.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Path Parameters

id*string

The workspace's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Request Body

application/json
  1. body
connection_id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Stored; the receipt and the user-linking state.

application/json
  1. response
receipt_id*|null
oauth*
Example Request
curl -X PUT 'https://example.com/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/github-settings/user-link-app' \  -H 'Content-Type: application/json' \  -d '{  "connection_id": "019a0000-0000-7000-8000-0000000000c9"}'
Example Response
{  "receipt_id": "c4a1e9d2-7b3f-4e8a-a6c5-1d2e3f4a5b6c",  "oauth": {    "connection_id": "019a0000-0000-7000-8000-0000000000c9",    "client_id": "Iv23liExampleClientId",    "client_secret_set": false,    "callback_url": "https://console.example.com/settings/linked-accounts/github"  }}