Set Archive Policy
curl --request POST \
--url https://api.zerodrive.dev/v1/archive/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prefix": "Renders/2025",
"drive_id": "primary",
"min_age_days": 90,
"enabled": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prefix: 'Renders/2025', drive_id: 'primary', min_age_days: 90, enabled: true})
};
fetch('https://api.zerodrive.dev/v1/archive/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/archive/policies"
payload = {
"prefix": "Renders/2025",
"drive_id": "primary",
"min_age_days": 90,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Set Archive Policy
Create or update an automatic age-based cold-archive policy for a prefix.
POST
https://api.zerodrive.dev
/
v1
/
archive
/
policies
Set Archive Policy
curl --request POST \
--url https://api.zerodrive.dev/v1/archive/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prefix": "Renders/2025",
"drive_id": "primary",
"min_age_days": 90,
"enabled": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prefix: 'Renders/2025', drive_id: 'primary', min_age_days: 90, enabled: true})
};
fetch('https://api.zerodrive.dev/v1/archive/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/archive/policies"
payload = {
"prefix": "Renders/2025",
"drive_id": "primary",
"min_age_days": 90,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Authorizations
Body
application/json
Response
Saved policy
The response is of type object.

