Save Bucket Rules
curl --request PUT \
--url https://api.zerodrive.dev/v1/brain/rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folder_rules": [
{
"prefix": "Clients/Acme",
"bucket": "business",
"client_id": "acme"
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
folder_rules: [{prefix: 'Clients/Acme', bucket: 'business', client_id: 'acme'}]
})
};
fetch('https://api.zerodrive.dev/v1/brain/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/brain/rules"
payload = { "folder_rules": [
{
"prefix": "Clients/Acme",
"bucket": "business",
"client_id": "acme"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){}Save Bucket Rules
Save folder-to-bucket and client_id override rules and apply them immediately in the live index.
PUT
https://api.zerodrive.dev
/
v1
/
brain
/
rules
Save Bucket Rules
curl --request PUT \
--url https://api.zerodrive.dev/v1/brain/rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folder_rules": [
{
"prefix": "Clients/Acme",
"bucket": "business",
"client_id": "acme"
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
folder_rules: [{prefix: 'Clients/Acme', bucket: 'business', client_id: 'acme'}]
})
};
fetch('https://api.zerodrive.dev/v1/brain/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/brain/rules"
payload = { "folder_rules": [
{
"prefix": "Clients/Acme",
"bucket": "business",
"client_id": "acme"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){}
