Delete an artifact - Spacefast Docs
Delete an artifact
Removes the source file in a commit. Git history keeps the body recoverable.
DELETE /v1/artifacts/{ref}
Authorization
Authorization
Bearer token · header requiredAuthorization: Bearer <key>with the Space key (sfc_prefix) of an unclaimed Space. The same key is the fragment of the claim URL and the token in the Space's/__/ <key>sign-in URL.or
Authorization
Bearer token · header requiredAuthorization: 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 requiredOAuth 2.0 with Spacefast scopes. People use the authorization code flow; machines use client credentials.
Scopes: connectors:execute
Path parameters
refstring required
Query parameters
teamstring min length 1
Responses
204 Response for status 204
{
"$schema": "string<uri>",
"data": null
}
Problem details (RFC 9457)
Any 4xx/5xx response is one application/problem+json document.
{
"$schema": "string<uri>",
"type": "string",
"title": "string",
"status": -9007199254740991,
"detail": "string",
"code": "string",
"pointer": "string",
"details": {
"property1": null,
"property2": null
},
"suggestions": [
"string"
],
"next": [
"string"
],
"requestId": "string"
}
Try it
Server
Base URL https://api.spacefast.com
Authorization
Bearer token Remember on this device Include my values in samples
Parameters
refpath *teamquery
Request examples
cURL
curl -X DELETE "https://api.spacefast.com/v1/artifacts/string" \
-H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://api.spacefast.com/v1/artifacts/string", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});
Python
import requests
response = requests.delete(
"https://api.spacefast.com/v1/artifacts/string",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)
Response
204 default
{
"$schema": "http://example.com",
"data": null
}