Create or update a connection
const url = 'https://example.com/api/v1/teams/example/connections/example/';const options = { method: 'PUT', headers: {cookie: 'sessionid=<sessionid>', 'Content-Type': 'application/json'}, body: '{"spec":{"name":"example","provider":"hcloud","token":"example","providerConfig":{"additionalProperty":"example"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/teams/example/connections/example/ \ --header 'Content-Type: application/json' \ --cookie sessionid=<sessionid> \ --data '{ "spec": { "name": "example", "provider": "hcloud", "token": "example", "providerConfig": { "additionalProperty": "example" } } }'/api/v1/teams/{team}/connections — a connected Hetzner Cloud project (docs/58 §3.3).
The token is write-only (P7); a Connection is referenced elsewhere by its ref.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
A Connection spec (docs/58 §3.3). token is write-only — it enters once and is never
echoed (P7); a Connection is referenced elsewhere by its server-set ref.
object
object
object
A Connection spec (docs/58 §3.3). token is write-only — it enters once and is never
echoed (P7); a Connection is referenced elsewhere by its server-set ref.
object
object
object
A Connection spec (docs/58 §3.3). token is write-only — it enters once and is never
echoed (P7); a Connection is referenced elsewhere by its server-set ref.
object
object
Responses
Section titled “ Responses ”A Connection resource (docs/58 §3.3).
object
object
object
object
Example generated
{ "apiVersion": "example", "kind": "example", "metadata": { "additionalProperty": "example" }, "spec": { "additionalProperty": "example" }, "status": { "additionalProperty": "example" }}A Connection resource (docs/58 §3.3).
object
object
object
object
Example generated
{ "apiVersion": "example", "kind": "example", "metadata": { "additionalProperty": "example" }, "spec": { "additionalProperty": "example" }, "status": { "additionalProperty": "example" }}RFC 7807 problem document
RFC 7807 application/problem+json — every non-2xx response (docs/58 §5.10).
object
Stable machine code clients switch on
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "instance": "example", "operationId": "example"}