Deployments.ai Docs
Artifacts

Set or clear artifact retention

PATCH /v1/artifacts/{artifactId}/retention · SDK updateArtifactRetention · CLI deployments artifact retention

PATCH
/v1/artifacts/{artifactId}/retention

Requires artifacts:write.

Authorization

headerAuthorizationBearer <token>

Opaque bearer credential scoped to one service account and tenant.

Path Parameters

artifactId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-organization?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Request Body

application/json
  1. body
expectedVersion*integer
Range0 <= value
retentionExpiresAt*|null

Response Body

ArtifactResponse

application/json
  1. response
agentDeploymentId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
artifactId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
byteSize*number|||
contentType*string
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
fileName?string
input?|||
metadata?
name*string
object*"artifact"
Value in"artifact"
retentionExpiresAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
runId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
status*string
Value in"available""deleted""failed""pending"
threadId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
type*string
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*number|||
visibility*string
Value in"organization""private""public"
curl -X PATCH "https://example.com/v1/artifacts/string/retention" \  -H "Content-Type: application/json" \  -d '{    "expectedVersion": 0,    "retentionExpiresAt": "2019-08-24T14:15:22Z"  }'
{  "agentDeploymentId": "string",  "artifactId": "string",  "byteSize": 0,  "contentType": "string",  "createdAt": "2019-08-24T14:15:22Z",  "fileName": "string",  "input": {    "kind": "image",    "mediaType": "image/jpeg"  },  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "object": "artifact",  "retentionExpiresAt": "2019-08-24T14:15:22Z",  "runId": "string",  "status": "available",  "threadId": "string",  "type": "string",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0,  "visibility": "organization"}