Skip to main content
Sub-user API

Inline policies

Read and change a sub-user's inline policy, change an access rule's type, and see who can reach a bucket, with the Sub-user API.

Each sub-user has one inline policy per region: its own policy, which holds all of its inline policy rules in that region. One inline policy rule can cover several of your buckets, each with its own folders. A bucket policy rule covers one bucket. Allows from both types add up, and any Deny wins. For the concepts, see Inline policies.

Zata also adds its own Deny statements to every sub-user's policy (bucket settings, ACLs, tags, retention and public uploads, unless you delegated them). You can read them, but not change them.

Paths are relative to https://cli.zata.ai/cli/v1. {subuserId} is the sub-user's KC_id, {region} is idr01 or bom01, {sid} is an inline policy rule's sid, and {bucket} is a bucket name. Python examples use the call() helper from Authentication.

MethodPathWhat it does
GET/inline-policies/catalogWhat a rule may contain
GET/subusers/{subuserId}/inline-policyA sub-user's inline policy in every region
GET/subusers/{subuserId}/inline-policy/{region}A sub-user's inline policy in one region
PUT/subusers/{subuserId}/inline-policy/{region}Replace all its statements (JSON)
POST/subusers/{subuserId}/inline-policy/{region}/rulesAdd an inline policy rule
PUT/subusers/{subuserId}/inline-policy/{region}/rules/{sid}Change a rule
DELETE/subusers/{subuserId}/inline-policy/{region}/rules/{sid}Delete a rule
POST/subusers/{subuserId}/inline-policy/{region}/rules/{sid}/suspendTurn a rule off for now
POST/subusers/{subuserId}/inline-policy/{region}/rules/{sid}/resumeTurn it back on
POST/subusers/{subuserId}/access-rules/{region}/change-typeTurn a rule into the other type
GET/subusers/{subuserId}/effective-access/{region}Everything that applies to a sub-user
GET/buckets/{bucket}/subuser-accessEvery sub-user with access to a bucket
POST/buckets/{bucket}/subuser-access/revoke-allRemove every sub-user's access to a bucket

The rule object​

The rule endpoints take a rule:

FieldTypeRequiredDescription
effectstringYesAllow or Deny.
bucketsarray of stringsYes, unless scopes is sentYour own buckets in the region, exact names, no wildcards.
scopesarray of objectsNoOne entry per bucket: { "bucket", "scope_type": "bucket" or "prefix", "resources": [folders] }. Each bucket gets its own scope. If you also send buckets, it must name the same buckets.
scope_type, resourcesstring, arrayNoThe older form, without scopes: one scope for every bucket. prefix needs at least one folder.
actionsarray of stringsYesActions from the catalog. No wildcards, nothing outside s3:.
conditionsobjectNoAWS-style conditions. See Conditions.

Folders are written like 2026/ and stored as 2026/*. Bucket-wide actions (s3:GetBucketVersioning, s3:GetBucketTagging) need at least one whole bucket in the rule.

For example, all of reports and only the 2026/ folder of invoices:

{
"effect": "Allow",
"scopes": [
{ "bucket": "reports", "scope_type": "bucket" },
{ "bucket": "invoices", "scope_type": "prefix", "resources": ["2026/"] }
],
"actions": ["s3:ListBucket", "s3:GetObject"]
}

Zata writes each rule as one or more statements whose Sid starts with the rule's sid. Companion statements end in -list, -list-<n> or -bulkdelete: they let the sub-user list its folders and delete several files at once. They belong to the rule and are changed with it.

Conditions​

  • Operators: StringEquals, StringNotEquals, StringLike, StringNotLike, IpAddress, NotIpAddress, Bool, DateGreaterThan, DateGreaterThanEquals, DateLessThan, DateLessThanEquals, NumericEquals, NumericLessThan, NumericLessThanEquals, NumericGreaterThan, NumericGreaterThanEquals, each also with IfExists (for example StringLikeIfExists). The IfExists forms work only in inline policy rules, not in bucket policy rules.
  • Keys: aws:SourceIp, aws:SecureTransport, aws:CurrentTime, aws:EpochTime, aws:Referer, aws:UserAgent, s3:prefix, s3:delimiter, s3:max-keys.
  • Values: strings, numbers or booleans of up to 1,024 characters.

Limits​

Per sub-user and region. Every statement counts, including companions. A rule that doesn't fit is refused as a whole.

LimitValueError
Statements64TOO_MANY_STATEMENTS, or INLINE_RULE_TOO_LARGE for a rule
Actions per statement64TOO_MANY_ACTIONS
Resources per statement64TOO_MANY_RESOURCES
Buckets64TOO_MANY_BUCKETS
Size of your part of the policy32 KBDOCUMENT_TOO_LARGE, or INLINE_RULE_TOO_LARGE for a rule
Sid1-100 characters: letters, digits, _, -; unique; Zata's own Sids are reservedSID_INVALID, SID_DUPLICATE, SID_RESERVED

Inside the 400 INLINE_POLICY_INVALID answer, these codes appear in the errors list.

expected_hash​

Every policy has a hash (policy.hash in the read answers). Send it back as expected_hash on a write to make sure nobody changed the policy since you read it. If it changed, the write is refused with 409 INLINE_POLICY_STALE and the body has current_hash. Read again, then retry.

expected_hash is optional on the rule endpoints and required on Replace an inline policy once the sub-user has a policy in that region.

Errors on writes​

Every write on this page can answer:

StatusCodeWhen
400INLINE_POLICY_INVALIDThe rule or statements are not valid. error has the first problem, errors all of them.
400EFFECT_INVALID, BUCKETS_EMPTY, BUCKET_DUPLICATE, BUCKET_SCOPES_MISMATCH, SCOPE_INVALID, RESOURCE_EMPTY, ACTION_EMPTY, ACTION_NOT_ALLOWED, PREFIX_SCOPE_ACTION_FORBIDDENA problem in the rule. error says what.
400RESOURCE_NOT_ALLOWEDA bucket you add is not yours, or doesn't exist, in that region. The body lists buckets.
400INLINE_RULE_TOO_LARGEThe rule does not fit in the limits. Use fewer buckets or folders, or split it.
400REGION_REQUIREDThe region is missing or unknown.
403REGION_NOT_ALLOWEDThe region is not available.
403FORBIDDENThe sub-user is not yours.
404SUBUSER_NOT_FOUNDNo such sub-user.
409INLINE_POLICY_STALEexpected_hash no longer matches. The body has current_hash.
409LOG_BUCKET_CANNOT_BE_SHAREDA bucket you add receives access logs.
409OBJECT_LOCK_OPT_IN_REQUIREDUpload, retention or legal hold on an Object Lock bucket whose sub-user Object Lock setting is off. Turn it on in the console first.
409INLINE_POLICY_LOCK_LOSTAnother change landed at the same time. Nothing was changed. Retry.
409BASELINE_TOO_LARGEZata's own statements for this sub-user would grow too large.
503INLINE_POLICY_ADMIN_NOT_CONFIGUREDInline policies are not available in this region right now. Use a bucket policy rule.
503INLINE_POLICY_OWNER_CHECK_FAILED, INLINE_POLICY_LOCK_UNAVAILABLE, INLINE_POLICY_OUT_OF_SYNC, OBJECT_LOCK_CHECK_FAILEDA temporary problem. Nothing was changed. Retry.
502INLINE_POLICY_VERIFY_FAILED, INLINE_POLICY_RGW_ERRORStorage did not keep or answer the write. Read the policy again before you retry.

Get the catalog​

GET/inline-policies/catalog

Returns what a rule may contain: the actions sub-users can have, grouped (Read, Write, Delete, Bucket info, Object lock), the presets, the actions that are never allowed and why, Zata's own statements, the condition operators and keys, the limits, and whether inline policies are available in each region. The same actions are allowed in bucket policy rules for sub-users.

curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
"https://cli.zata.ai/cli/v1/inline-policies/catalog"
200 OK
{
"version": 1,
"groups": [
{ "key": "read", "label": "Read" },
{ "key": "write", "label": "Write" }
],
"actions": [
{ "action": "s3:ListBucket", "label": "List files", "group": "read", "arn": "bucket", "entireBucketOnly": false },
{ "action": "s3:GetObject", "label": "Download files", "group": "read", "arn": "object", "entireBucketOnly": false }
],
"presets": {
"allow": [
{
"id": "view",
"label": "View & Download",
"description": "Browse and download files.",
"actions": ["s3:ListBucket", "s3:GetObject", "s3:GetObjectVersion"]
}
],
"deny": [
{
"id": "deny_writes",
"label": "Block writes",
"description": "No uploads, overwrites or deletes, whatever else allows them.",
"actions": [
"s3:PutObject", "s3:DeleteObject", "s3:DeleteObjectVersion", "s3:AbortMultipartUpload",
"s3:RestoreObject", "s3:DeleteObjectTagging", "s3:PutObjectRetention", "s3:PutObjectLegalHold"
]
}
]
},
"limits": {
"maxDocumentBytes": 32768,
"maxStatements": 64,
"maxActionsPerStatement": 64,
"maxResourcesPerStatement": 64,
"maxBucketsPerPolicy": 64,
"maxSidLength": 100,
"maxConditionValueLength": 1024
},
"regions": {
"idr01": { "available": true },
"bom01": { "available": true }
},
"note": "Allows from both are combined; any Deny wins."
}

Shortened: groups, actions and the presets list only their first entries, and some fields are left out. Read the live catalog for the exact values.

Errors: none specific to this endpoint.

Get all inline policies of a sub-user​

GET/subusers/{subuserId}/inline-policy

Returns the sub-user's inline policy in each of its regions, in the same form as Get an inline policy, without KC_id on each entry.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/inline-policy"
200 OK
{
"KC_id": "5f2c8a1e-0000-4000-8000-000000000001",
"regions": [
{ "region": "idr01", "available": true, "policy": null }
]
}

policy is null when the sub-user has no inline policy rules in that region yet.

Errors

StatusCodeWhen
403FORBIDDENThe sub-user is not yours.
404SUBUSER_NOT_FOUNDNo such sub-user.

Get an inline policy​

GET/subusers/{subuserId}/inline-policy/{region}

Returns the sub-user's inline policy in one region: its statements, the rules they form (active and suspended), and the hash to send as expected_hash. available: false means inline policies are not available in that region right now.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/inline-policy/idr01"
200 OK
{
"KC_id": "5f2c8a1e-0000-4000-8000-000000000001",
"region": "idr01",
"available": true,
"policy": {
"statements": [
{
"Sid": "e8b1c4a7-0000-4000-8000-000000000004",
"Effect": "Allow",
"Action": ["s3:ListBucket", "s3:GetObject"],
"Resource": [
"arn:aws:s3:::reports",
"arn:aws:s3:::reports/*",
"arn:aws:s3:::invoices",
"arn:aws:s3:::invoices/*"
]
}
],
"rules": [
{
"sid": "e8b1c4a7-0000-4000-8000-000000000004",
"custom": false,
"effect": "Allow",
"buckets": ["reports", "invoices"],
"actions": ["s3:ListBucket", "s3:GetObject"],
"scope_type": "bucket",
"resources": null,
"scopes": [
{ "bucket": "reports", "scope_type": "bucket", "resources": null },
{ "bucket": "invoices", "scope_type": "bucket", "resources": null }
],
"conditions": null,
"status": "active"
}
],
"hash": "4f1c2b9a7d3e5f60718293a4b5c6d7e8f9011a2b3c4d5e6f708192a3b4c5d6e7",
"buckets": ["invoices", "reports"],
"createdAt": "2026-11-25T10:30:00.000Z",
"updatedAt": "2026-11-25T10:30:00.000Z"
}
}

Shortened: policy has more fields, such as summaries (one row per rule and bucket). A rule Zata can't map to the rule object (a statement you wrote in JSON) shows "custom": true and "scope_type": "custom". scope_type is per_bucket when the buckets have different scopes.

Errors

StatusCodeWhen
400REGION_REQUIREDThe region is missing or unknown.
403FORBIDDENThe sub-user is not yours.
404SUBUSER_NOT_FOUNDNo such sub-user.

Replace an inline policy​

PUT/subusers/{subuserId}/inline-policy/{region}

Replaces all active statements of the inline policy with yours (JSON mode). Suspended rules are kept. Zata's own statements are added for you; don't send them. Rules that disappear lose their pending access requests.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.

Body

FieldTypeRequiredDescription
statementsarray of objectsYesEach { "Sid", "Effect", "Action", "Resource", "Condition" }, and nothing else: no Principal, NotAction or NotResource. Resource is arn:aws:s3:::<bucket> or arn:aws:s3:::<bucket>/<pattern>, with an exact bucket name that is yours in the region.
expected_hashstringOnce a policy existsThe hash from your last read. See expected_hash.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
-H "Content-Type: application/json" \
-X PUT --data '{
"statements": [{
"Sid": "ReadReports",
"Effect": "Allow",
"Action": ["s3:ListBucket", "s3:GetObject"],
"Resource": ["arn:aws:s3:::reports", "arn:aws:s3:::reports/*"]
}],
"expected_hash": "'"$HASH"'"
}' \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/inline-policy/idr01"
200 OK

The same body as Get an inline policy, showing the policy after the change.

Errors: the errors on writes, plus:

StatusCodeWhen
428EXPECTED_HASH_REQUIREDThe sub-user already has a policy here and you sent no expected_hash. The body has current_hash.
409SID_DUPLICATEA Sid you send belongs to a suspended rule. Resume or delete that rule instead.

Add a rule​

POST/subusers/{subuserId}/inline-policy/{region}/rules

Adds one inline policy rule. Zata picks its sid and returns it. The sub-user gets a notification.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.

Body

FieldTypeRequiredDescription
ruleobjectYesSee The rule object.
expected_hashstringNoSee expected_hash.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
-H "Content-Type: application/json" \
-X POST --data '{"rule": {
"effect": "Allow",
"buckets": ["reports", "invoices"],
"actions": ["s3:ListBucket", "s3:GetObject"]
}}' \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/inline-policy/idr01/rules"
201 Created
{
"KC_id": "5f2c8a1e-0000-4000-8000-000000000001",
"sid": "e8b1c4a7-0000-4000-8000-000000000004",
"region": "idr01",
"available": true,
"policy": { "hash": "4f1c2b9a7d3e5f60718293a4b5c6d7e8f9011a2b3c4d5e6f708192a3b4c5d6e7" }
}

Shortened: policy is the full policy, as in Get an inline policy.

Errors: the errors on writes.

Change a rule​

PUT/subusers/{subuserId}/inline-policy/{region}/rules/{sid}

Replaces a rule, active or suspended, with a new rule. A suspended rule stays suspended; it is checked again when you resume it.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.
sidThe rule's sid.

Body

FieldTypeRequiredDescription
ruleobjectYesThe whole new rule. See The rule object.
expected_hashstringNoSee expected_hash.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
-H "Content-Type: application/json" \
-X PUT --data '{"rule": {
"effect": "Allow",
"scopes": [
{"bucket": "reports", "scope_type": "bucket"},
{"bucket": "invoices", "scope_type": "prefix", "resources": ["2026/"]}
],
"actions": ["s3:ListBucket", "s3:GetObject"]
}}' \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/inline-policy/idr01/rules/$SID"
200 OK

KC_id, sid, and the policy after the change, as in Get an inline policy.

Errors: the errors on writes, plus:

StatusCodeWhen
404INLINE_RULE_NOT_FOUNDNo rule with that sid.

Delete a rule​

DELETE/subusers/{subuserId}/inline-policy/{region}/rules/{sid}

Deletes a rule, active or suspended. Pending access requests on it are cancelled. The sub-user gets a notification when an active Allow rule is deleted.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.
sidThe rule's sid.

Query parameters

NameTypeRequiredDescription
expected_hashstringNoSee expected_hash. It can also go in a JSON body.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
-X DELETE \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/inline-policy/idr01/rules/$SID"
200 OK

KC_id and the policy after the change, as in Get an inline policy.

Errors: the errors on writes, plus:

StatusCodeWhen
404INLINE_RULE_NOT_FOUNDNo rule with that sid.

Suspend a rule​

POST/subusers/{subuserId}/inline-policy/{region}/rules/{sid}/suspend

Takes the rule out of the live policy but keeps it, so you can resume it. The sub-user gets a notification for each bucket. Suspending a suspended rule changes nothing and answers "already": true.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.
sidThe rule's sid.

Body

FieldTypeRequiredDescription
reasonstringNoUp to 500 characters. Default manual.
expected_hashstringNoSee expected_hash.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
-H "Content-Type: application/json" \
-X POST --data '{"reason": "Audit in progress"}' \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/inline-policy/idr01/rules/$SID/suspend"
200 OK

KC_id, sid, already (true if it was already suspended) and the policy after the change, as in Get an inline policy.

Errors: the errors on writes, plus:

StatusCodeWhen
404INLINE_RULE_NOT_FOUNDNo rule with that sid.

Resume a rule​

POST/subusers/{subuserId}/inline-policy/{region}/rules/{sid}/resume

Puts a suspended rule back. It is checked again as if it were new: the buckets must still be yours, and it must fit in the limits. Resuming an active rule answers "already": true.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.
sidThe rule's sid.

Body

FieldTypeRequiredDescription
expected_hashstringNoSee expected_hash.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
-X POST \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/inline-policy/idr01/rules/$SID/resume"
200 OK

KC_id, sid, already and the policy after the change, as in Get an inline policy.

Errors: the errors on writes, plus:

StatusCodeWhen
404INLINE_RULE_NOT_FOUNDNo rule with that sid.

Change a rule's type​

POST/subusers/{subuserId}/access-rules/{region}/change-type

Turns a bucket policy rule into an inline policy rule, or the other way round, in one step. If a step fails, the change is undone. A suspended rule stays suspended. Pending access requests on the rule are carried over or cancelled, and the answer counts them.

An inline policy rule that covers several buckets becomes one bucket policy rule per bucket only when you send "split": true. A rule written in JSON that Zata can't map to the rule object cannot change type.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.

Body

FieldTypeRequiredDescription
rule_idstringYesA bucket policy rule's id, or an inline policy rule as inline:<region>:<sid>.
tostringYesinline or bucket_policy.
splitbooleanNotrue lets a multi-bucket inline policy rule become one bucket policy rule per bucket.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
-H "Content-Type: application/json" \
-X POST --data '{"rule_id": "inline:idr01:'"$SID"'", "to": "bucket_policy", "split": true}' \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/access-rules/idr01/change-type"
200 OK
{
"KC_id": "5f2c8a1e-0000-4000-8000-000000000001",
"from": "inline",
"to": "bucket_policy",
"sid": "e8b1c4a7-0000-4000-8000-000000000004",
"split": true,
"rules": [
{ "id": "c3a9f6d1-0000-4000-8000-000000000008", "bucket_name": "reports", "type": "bucket_policy" },
{ "id": "c3a9f6d1-0000-4000-8000-000000000009", "bucket_name": "invoices", "type": "bucket_policy" }
],
"requests": { "carried": 0, "cancelled": 0 },
"region": "idr01",
"available": true
}

Shortened: each item of rules is a full bucket policy rule, and the answer also has policy, the inline policy after the change, as in Get an inline policy. split and rules appear only when converting to bucket_policy.

Errors

StatusCodeWhen
400RULE_ID_REQUIREDrule_id is missing.
400RULE_TYPE_INVALIDto is not inline or bucket_policy.
400RULE_TYPE_SAMEThe rule already has that type.
400SUBUSER_REGION_MISMATCHThe inline: id names another region than {region}.
404ACCESS_RULE_NOT_FOUND, INLINE_RULE_NOT_FOUNDNo such rule for this sub-user in this region.
409INLINE_RULE_MULTI_BUCKETThe inline policy rule covers several buckets. Send "split": true. The body lists buckets.
409INLINE_RULE_NOT_CONVERTIBLEA rule written in JSON can't change type.
502RULE_TYPE_CHANGE_FAILED, RULE_TYPE_CHANGE_VERIFY_FAILEDThe change failed and was undone. Retry.
502RULE_TYPE_CHANGE_INCOMPLETEThe rule is now an inline policy rule but is suspended. Resume it to restore the access.

Plus the errors on writes for the new rule.

Get effective access​

GET/subusers/{subuserId}/effective-access/{region}

Shows everything that decides what the sub-user can do in a region, read live: its inline policy with Zata's own statements, and every bucket policy statement that names it. The answer may be up to 30 seconds old.

Path parameters

NameDescription
subuserIdThe sub-user's KC_id.
regionidr01 or bom01.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
"https://cli.zata.ai/cli/v1/subusers/$SUBUSER_ID/effective-access/idr01"
200 OK
FieldContents
KC_id, region, subuserWho and where.
note"Allows from both are combined; any Deny wins."
inlineThe live inline policy (policy), its active rules and its suspended rules.
bucket_policiesPer bucket, the bucket policy statements that name the sub-user, each with managed, rule_id, status and permission_display.
bucket_policy_suspendedThe sub-user's suspended bucket policy rules.
read_atWhen this was read.

Errors

StatusCodeWhen
400REGION_REQUIREDThe region is missing or unknown.
403FORBIDDENThe sub-user is not yours.
404SUBUSER_NOT_FOUNDNo such sub-user.

See who has access to a bucket​

GET/buckets/{bucket}/subuser-access

Lists every sub-user that has access to the bucket, with rules of both types, read live.

Path parameters

NameDescription
bucketThe bucket name.

Query parameters

NameTypeRequiredDescription
regionstringYesidr01 or bom01.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
"https://cli.zata.ai/cli/v1/buckets/reports/subuser-access?region=idr01"
200 OK
{
"bucket": "reports",
"region": "idr01",
"note": "Allows from both are combined; any Deny wins.",
"entries": [
{
"type": "inline",
"subuser_id": "5f2c8a1e-0000-4000-8000-000000000001",
"username": "sub0abc-backup-job",
"rule_id": "inline:idr01:e8b1c4a7-0000-4000-8000-000000000004:reports",
"sid": "e8b1c4a7-0000-4000-8000-000000000004",
"managed": true,
"effect": "Allow",
"actions": ["s3:ListBucket", "s3:GetObject"],
"scope_type": "bucket",
"resources": null,
"status": "active",
"permission_display": "View Only",
"scope_display": "Entire bucket",
"buckets": ["reports", "invoices"]
}
],
"read_at": "2026-11-25T10:40:00.000Z"
}

managed: false marks a bucket policy statement that names the sub-user but was not made as a Zata rule, for example one you wrote with an S3 tool.

Errors

StatusCodeWhen
400REGION_REQUIREDregion is missing or unknown.
404BUCKET_NOT_FOUNDNo such bucket in the region, or it isn't yours.
502BUCKET_INFO_FAILEDThe bucket could not be read. Retry.

Remove all sub-users from a bucket​

POST/buckets/{bucket}/subuser-access/revoke-all

Removes every sub-user's access to the bucket: it deletes all bucket policy rules for sub-users on it, and removes the bucket from every inline policy rule that names it. The sub-users get a notification.

Path parameters

NameDescription
bucketThe bucket name.

Body

FieldTypeRequiredDescription
regionstringYesidr01 or bom01. It can also go in the query string.
curl --aws-sigv4 "aws:amz:us-east-1:zata" \
--user "$ZATA_ACCESS_KEY:$ZATA_SECRET_KEY" \
-H "Content-Type: application/json" \
-X POST --data '{"region": "idr01"}' \
"https://cli.zata.ai/cli/v1/buckets/reports/subuser-access/revoke-all"
200 OK
{
"bucket": "reports",
"region": "idr01",
"bucket_policy": {
"removed": [
{ "id": "c3a9f6d1-0000-4000-8000-000000000003", "subuser": "5f2c8a1e-0000-4000-8000-000000000001" }
],
"failed": []
},
"inline": [
{
"subuser": "5f2c8a1e-0000-4000-8000-000000000001",
"username": "sub0abc-backup-job",
"rules": ["e8b1c4a7-0000-4000-8000-000000000004"]
}
]
}

Check bucket_policy.failed: each entry has the rule id, the subuser and an error. Run the call again to retry them.

Errors

StatusCodeWhen
400REGION_REQUIREDregion is missing or unknown.
404BUCKET_NOT_FOUNDNo such bucket in the region, or it isn't yours.
409, 502, 503INLINE_POLICY_CLEANUP_FAILEDThe bucket could not be removed from a sub-user's inline policy. Retry.
502BUCKET_INFO_FAILEDThe bucket could not be read. Retry.