Delete a source connection - Spacefast Docs
Delete a source connection
Deletes one source connection and stops future repository builds. Close its source workspaces before deletion.
HTTP Request
DELETE /v1/spaces/{spaceId}/source/connection
Authorization
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 - OAuth 2.0 with Spacefast scopes. People use the authorization code flow; machines use client credentials.
Scopes:
spaces:write
Path parameters
spaceId: string (required)
Query parameters
connectionType: string (required, default: "connected")- Allowed:
connected,hosted
- Allowed:
Responses
204: The source connection was deleted.
Example Request
cURL
curl -X DELETE "https://api.spacefast.com/v1/spaces/string/source/connection?connectionType=connected" \
-H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://api.spacefast.com/v1/spaces/string/source/connection?connectionType=connected", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});
Python
import requests
response = requests.delete(
"https://api.spacefast.com/v1/spaces/string/source/connection?connectionType=connected",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)
Response
204: The source connection was deleted.