Skip to main content
PATCH
/
samples
/
{id}
/
retention
Set retention on a single sample
curl --request PATCH \
  --url https://app.strandai.com/api/v1/samples/{id}/retention \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expiresAt": "2023-11-07T05:31:56Z",
  "pin": true,
  "useOrgDefault": true,
  "reason": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expiresAt": "2023-11-07T05:31:56Z",
  "retentionChangedAt": "2023-11-07T05:31:56Z",
  "retentionChangedBy": "<string>",
  "batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Documentation Index

Fetch the complete documentation index at: https://docs.strandai.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Body

application/json

Provide exactly one of expiresAt, pin: true, or useOrgDefault: true. pin: true is sugar for expiresAt: null. useOrgDefault: true reverts the sample to the org's default retention policy.

expiresAt
string<date-time> | null
pin
boolean
useOrgDefault
boolean
reason
string
Maximum string length: 500

Response

Updated sample

id
string<uuid>
required
expiresAt
string<date-time> | null
expiresAtSource
enum<string> | null
Available options:
org_default,
override,
null
retentionChangedAt
string<date-time> | null
retentionChangedBy
string | null
batchId
string<uuid>