Re-sync a connection's tools - Spacefast Docs
Re-sync a connection's tools
Re-resolves the tool catalog behind a connection. Token refresh happens on its own; this is about the tools.
Endpoint
POST /v1/connectors/connections/{connectionId}/refresh
Authorization
AuthorizationBearer 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
AuthorizationOAuth2 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
connectionIdstring required
Minimum length 1
Query parameters
teamstring
Minimum length 1 · Maximum length 255
Responses
200 Response for status 200
$schemastring
Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
dataobject required
A configured instance of a connector, with a credential the control plane holds and never hands out.
Properties:
idstring required- Connection id (
cxn_). This is also the first segment of every tool address it owns.
- Connection id (
connectorstring required- Slug of the connector this connection authenticates.
ownerstring requiredteamis shared with everyone on the team;personalis yours, and only within this team — connecting the same account for another team is another connection.- Allowed:
team,personal
displayNamestring required- What people call this connection, e.g. "Linear (support)".
descriptionstring | any required- Agent-visible note on what this connection is for. Shown to models choosing between several.
statusstring required- Derived connection state. Never stored, so it cannot drift from the credential it describes.
- Allowed:
pending_authorization,active,degraded,needs_reauth,revoked
identityLabelstring | any required- Account label reported by the provider, when it identifies itself. Null until the first successful probe.
credentialConfiguredboolean required- Whether a usable credential is stored. The credential itself is never returned by any endpoint.
authMethodstring | any required- Slug of the connector auth method this connection used.
scopesstring[] required- Scopes actually granted, when the provider reports them.
isDefaultboolean required- Whether this is the connection an agent gets when it names the connector alone.
toolCountinteger required- Tools reachable through this connection at the last sync.
createdBystring | any required- User who connected it; null for first-party connections Spacefast owns.
lastCheckedAtstring| any required - Last health probe.
revokedAtstring| any required - When it was disconnected. The credential is purged; the row tombstones.
createdAtstringrequired updatedAtstringrequired
Operation object required
- Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously.
Properties:
idstring requiredkindstring requiredstatusstring required- Allowed:
queued,running,succeeded,failed,canceled
- Allowed:
resourcesobject[] required- Array of
object
- Array of
progressobjectdiagnosticsobject[]createdAtstringrequired finishedAtstring
Error response
If an error occurs, this is the structure returned:
{ "$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" }