Update a connection - Spacefast Docs

Update a connection

Renames a connection or replaces the agent-visible note on what it is for. Credentials are immutable: to rotate one, reconnect.

PATCH /v1/connectors/connections/{connectionId}

Authorization

Authorization Bearer token · header required

Authorization: Bearer <token> with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).

or
Authorization OAuth2 access token · header required

OAuth 2.0 with Spacefast scopes. People use the authorization code flow; machines use client credentials.

Scopes: connectors:write

Path parameters

Query parameters

Request body

required application/json

Responses

200 Response for status 200

Properties

Error Response

Try it

Server

Base URL https://api.spacefast.com Custom base URL Overrides the selected server when set.

Parameters

Body

application/json

Send

Request

cURL

curl -X PATCH "https://api.spacefast.com/v1/connectors/connections/string" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{\n  "displayName": "string",\n  "description": "string"\n}'

JavaScript

const response = await fetch("https://api.spacefast.com/v1/connectors/connections/string", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"displayName\": \"string\",\n  \"description\": \"string\"\n}"
});

Python

import requests

response = requests.patch(
    "https://api.spacefast.com/v1/connectors/connections/string",
    headers={
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/json"
    },
    data="{\n  \"displayName\": \"string\",\n  \"description\": \"string\"\n}",
)

Response

200 Default

{
  "$schema": "http://example.com",
  "data": {
    "id": "string",
    "connector": "string",
    "owner": "team",
    "displayName": "string",
    "description": "string",
    "status": "pending_authorization",
    "identityLabel": "string",
    "credentialConfigured": true,
    "authMethod": "string",
    "scopes": [\
      "string"\
    ],
    "isDefault": true,
    "toolCount": -9007199254740991,
    "createdBy": "string",
    "lastCheckedAt": "2019-08-24T14:15:22Z",
    "revokedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}

Error Example

{
  "$schema": "http://example.com",
  "type": "string",
  "title": "string",
  "status": -9007199254740991,
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": [\
    "string"\
  ],
  "next": [\
    "string"\
  ],
  "requestId": "string"
}