Roles & permissions
What a member may do. permissions is the tree of sections a right is granted on — READ or WRITE, and a grant covers everything under its section; roles are the three every account has — administrator, editor, and one that holds only the sections its membership grants — beside the named sets of grants an account defines for itself.
List account roles
The account's own roles: named sets of grants, defined once and given to members and invitations by name — role: accounts/{account}/roles/{role} — beside the three roles every account has (roles). A member's rights follow the role, so changing its grants changes what every holder may do. Reading the roles takes the account.access section; defining, changing and deleting them takes writing it. A role that a member holds or an invitation names is not deleted, and deleting the account deletes its roles.
path Parameters
account_idId of the parent account.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: display_name asc. Sortable: none — this collection serves its documented order only.
filterAIP-160 subset (§8). Filterable: display_name. A field outside the list is INVALID_ARGUMENT.
List account roles › Responses
One page of roles.
This page of roles, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Create account role
Defines a role of the account: send display_name, and the grants it holds — the same {permission, level} a roles/sections membership carries — with an optional description. Give it to a member or an invitation by its name, accounts/{account}/roles/{role}. A name another role of the account has is ALREADY_EXISTS on display_name; nobody may define a role wider than their own: that is PERMISSION_DENIED.
path Parameters
account_idId of the parent account.
Create account role › Request Body
display_nameThe role's name, as member pickers show it — unique in the account, surrounding spaces dropped, at most 100 characters. A second role of the same name is ALREADY_EXISTS. The list is ordered by it.
descriptionWhat the role is for, in a sentence a member picker can show next to the choice; at most 1000 characters, empty when there is none.
grantsWhat the role holds, as {permission, level} — a section id from permissions and READ or WRITE. A grant covers the section's whole subtree and brings its implies along. Every member holding the role holds exactly these, and a change counts from their next request. Nobody may define a role wider than their own: that is PERMISSION_DENIED.
Create account role › Responses
The created resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
display_nameThe role's name, as member pickers show it — unique in the account, surrounding spaces dropped, at most 100 characters. A second role of the same name is ALREADY_EXISTS. The list is ordered by it.
descriptionWhat the role is for, in a sentence a member picker can show next to the choice; at most 1000 characters, empty when there is none.
grantsWhat the role holds, as {permission, level} — a section id from permissions and READ or WRITE. A grant covers the section's whole subtree and brings its implies along. Every member holding the role holds exactly these, and a change counts from their next request. Nobody may define a role wider than their own: that is PERMISSION_DENIED.
member_countHow many members of the account hold the role now. A role that a member holds, or that an invitation names, cannot be deleted.
Get account role
The account's own roles: named sets of grants, defined once and given to members and invitations by name — role: accounts/{account}/roles/{role} — beside the three roles every account has (roles). A member's rights follow the role, so changing its grants changes what every holder may do. Reading the roles takes the account.access section; defining, changing and deleting them takes writing it. A role that a member holds or an invitation names is not deleted, and deleting the account deletes its roles.
path Parameters
account_idId of the parent account.
role_idId of the parent role.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get account role › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
display_nameThe role's name, as member pickers show it — unique in the account, surrounding spaces dropped, at most 100 characters. A second role of the same name is ALREADY_EXISTS. The list is ordered by it.
descriptionWhat the role is for, in a sentence a member picker can show next to the choice; at most 1000 characters, empty when there is none.
grantsWhat the role holds, as {permission, level} — a section id from permissions and READ or WRITE. A grant covers the section's whole subtree and brings its implies along. Every member holding the role holds exactly these, and a change counts from their next request. Nobody may define a role wider than their own: that is PERMISSION_DENIED.
member_countHow many members of the account hold the role now. A role that a member holds, or that an invitation names, cannot be deleted.
Delete account role
Deletes a role nobody holds. While a member holds it, or an invitation — pending or expired — names it, the answer is FAILED_PRECONDITION: give those members another role and withdraw those invitations first.
path Parameters
account_idId of the parent account.
role_idId of the parent role.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete account role › Responses
Deleted. No body (§7).
Update account role
Changes a role's display_name, description or grants. Every member holding the role holds the new grants from their next request. The grants as they will be are weighed against the caller's own, all of them: a role wider than the caller's is PERMISSION_DENIED.
path Parameters
account_idId of the parent account.
role_idId of the parent role.
query Parameters
update_maskComma-separated field paths to merge. A field named here and sent as null is cleared; without the mask a null is dropped (§7, §11).
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Update account role › Request Body
display_nameThe role's name, as member pickers show it — unique in the account, surrounding spaces dropped, at most 100 characters. A second role of the same name is ALREADY_EXISTS. The list is ordered by it.
descriptionWhat the role is for, in a sentence a member picker can show next to the choice; at most 1000 characters, empty when there is none.
grantsWhat the role holds, as {permission, level} — a section id from permissions and READ or WRITE. A grant covers the section's whole subtree and brings its implies along. Every member holding the role holds exactly these, and a change counts from their next request. Nobody may define a role wider than their own: that is PERMISSION_DENIED.
Update account role › Responses
The updated resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
display_nameThe role's name, as member pickers show it — unique in the account, surrounding spaces dropped, at most 100 characters. A second role of the same name is ALREADY_EXISTS. The list is ordered by it.
descriptionWhat the role is for, in a sentence a member picker can show next to the choice; at most 1000 characters, empty when there is none.
grantsWhat the role holds, as {permission, level} — a section id from permissions and READ or WRITE. A grant covers the section's whole subtree and brings its implies along. Every member holding the role holds exactly these, and a change counts from their next request. Nobody may define a role wider than their own: that is PERMISSION_DENIED.
member_countHow many members of the account hold the role now. A role that a member holds, or that an invitation names, cannot be deleted.
List built-in roles
The three roles every account has without defining them, which a membership names in its role: roles/admin — everything in the account, access management included, but not the owner's own acts; roles/editor — everything but access management; and roles/sections — only the sections its membership grants. The account's owner holds everything whatever the role says, and is the only one who may delete the account. Website content stays readable under every role, so pickers work; changing it takes a grant. An account defines roles of its own under accounts/{account}/roles.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: create_time desc. Sortable: none — this collection serves its documented order only.
filterAIP-160 subset (§8). Filterable: none. A field outside the list is INVALID_ARGUMENT.
List built-in roles › Responses
One page of roles.
This page of roles, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Get built-in role
The three roles every account has without defining them, which a membership names in its role: roles/admin — everything in the account, access management included, but not the owner's own acts; roles/editor — everything but access management; and roles/sections — only the sections its membership grants. The account's owner holds everything whatever the role says, and is the only one who may delete the account. Website content stays readable under every role, so pickers work; changing it takes a grant. An account defines roles of its own under accounts/{account}/roles.
path Parameters
role_idId of the parent role.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get built-in role › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
display_nameThe role's name as a person reads it, in English.
descriptionWhat a member with this role may do, in a sentence or two a member picker can show next to the choice.
grantsWhat the role holds, as {permission, level} — computed from permissions on every read rather than stored, so a section a new release adds is in roles/admin and roles/editor the day it ships. Minimal: no grant that another one already covers, and implies already followed. Empty for roles/sections, whose grants are each membership's own.
List permissions
The sections of the product a right can be granted on, as a tree: each has an id a grant names ({permission, level}, with level READ or WRITE — writing includes reading), and a grant on a section covers everything under it. Listed in tree order, each section right after its parent. Nothing here is stored or writable: it is the platform's catalogue, and a section a new release adds shows up here — and in every role that holds its parent — without anyone editing a role.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: create_time desc. Sortable: none — this collection serves its documented order only.
filterAIP-160 subset (§8). Filterable: none. A field outside the list is INVALID_ARGUMENT.
List permissions › Responses
One page of permissions.
This page of permissions, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Get permission
The sections of the product a right can be granted on, as a tree: each has an id a grant names ({permission, level}, with level READ or WRITE — writing includes reading), and a grant on a section covers everything under it. Listed in tree order, each section right after its parent. Nothing here is stored or writable: it is the platform's catalogue, and a section a new release adds shows up here — and in every role that holds its parent — without anyone editing a role.
path Parameters
permission_idId of the parent permission.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get permission › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
parentThe section this one belongs to, as its resource name. Absent on the two roots — account, everything about the account itself, and website, everything inside its websites. A grant on a section covers every section under it.
display_nameThe section's name as a person reads it, in English. tenant-admin shows its own translation, looked up by id, and falls back to this one.
descriptionWhat a grant on this section lets a member do, in a sentence or two a role editor can show as help text.
readable_by_all_membersTrue where every member of the account may read without any grant — everything inside the websites, and the account's settings and projects — so that every picker works under every role. On such a section a READ grant only decides whether it shows in the menu; changing anything still takes WRITE.
impliesThe grants holding this section brings along, as {when, permission, level}: whoever holds when (READ or WRITE) on this section — or on a section above it — holds level on permission too. It is what keeps a narrow role usable: writing a theme uploads its logo, so it brings writing to the media library with it. Empty on most sections.