Guest Machines
API referenceRuns

Delete an artifact

DELETE/api/v1/artifacts/{artifact_id}

Delete artifact metadata and bytes as its owner/run actor or an admin.

Deletion is permanent. It removes the downloadable bytes but does not rewrite historical run or verification evidence.

If a non-terminal run is still using the file, the endpoint returns 409 artifact.in_use with the authorized holder run IDs. Wait for or stop those runs before retrying.

Required access

Credentials: service principal, delegated token, user session

Scope: runs:edit

Requires mutation access to the run that created the artifact. Direct users may remove files from their own runs; organization admins may remove any visible file; delegated tokens are limited to their user's runs.

Authorization

AuthorizationBearer <token>

An organization-owned automation key, prefixed gsmc_sk_. Already bound to one organization, so it needs no X-Org-Id header. It carries no user identity: it never reaches a private resource however it is scoped, and a run it starts has no user for an interactive tool to reach.

In: header

Path Parameters

artifact_id*Artifact Id
Formatuuid

Header Parameters

X-Org-Id?|

Selects the active organization for a credential that belongs to more than one. Service-principal keys are bound to a single organization and ignore it.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v1/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Authorization: Bearer $GUEST_MACHINES_API_KEY"
Empty
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}