Update User/Group Access to a Page
Updates an existing personal access permission for the page.
You can change the user or group role and configure whether subpages inherit the access
permission.
For common headers and authentication methods, see Access to the API. For sample scenarios, see API usage examples.
Request
POST
https://api.wiki.yandex.net/v1/pages/{idx}/access/{access_id}
Path parameters
|
Name |
Description |
|
access_id |
Type: string Personal page access permission ID. Pass the Example: `` |
|
idx |
Type: integer Page ID. The value of |
Query parameters
|
Name |
Description |
|
prevent_selflock |
Type: boolean If Default: |
Body
application/json
{
"role": "reader",
"inheritance": "inherited"
}
|
Name |
Description |
|
inheritance |
All of 1 type
Access inheritance for subpages: Example: |
|
role |
All of 1 type
New access role: Example: |
RoleAPI
Page access role:
reader: Read.editor: Edit.extra_editor: Extended editing.author: Author (full access).
Type: string
Enum: reader, editor, extra_editor, author
InheritanceAPI
Access inheritance for subpages:
inherited: Subpages inherit the access permission.not_inherited: Subpages do not inherit the access permission.
Type: string
Enum: inherited, not_inherited
Responses
200 OK
OK
Body
application/json
{
"id": "example",
"created_at": "2025-01-01T00:00:00Z",
"user": {
"id": 0,
"identity": {
"uid": "example",
"cloud_uid": "example"
},
"username": "example",
"display_name": "example",
"is_dismissed": true,
"affiliation": "example"
},
"group": {
"id": "example",
"identity": {
"src": null,
"id": "example"
},
"name": "example",
"type": "wiki",
"metadata": {
"url": "example",
"externals_count": 0
},
"members_count": 0
},
"role": "reader",
"inheritance": "inherited"
}
|
Name |
Description |
|
id |
Type: string Unique access identifier Example: |
|
role |
All of 1 type
Access role Example: |
|
created_at |
Type: string<date-time> Date and time the access was created Example: |
|
group |
All of 1 type
Group granted access (populated if access was granted to a group) Example
|
|
inheritance |
All of 1 type
Access inheritance setting for subpages Example: |
|
user |
All of 1 type
User granted access (populated if access was granted to a user) Example
|
UserIdentity
User identifier
|
Name |
Description |
|
cloud_uid |
Type: string User identifier in the cloud Example: |
|
uid |
Type: string Yandex user ID Example: |
Example
{
"uid": "example",
"cloud_uid": "example"
}
UserSchema
User information
|
Name |
Description |
|
affiliation |
Type: string User affiliation Example: |
|
display_name |
Type: string User display name Example: |
|
id |
Type: integer Internal user identifier |
|
is_dismissed |
Type: boolean The user is dismissed |
|
username |
Type: string User login Example: |
|
identity |
All of 1 type
User identifier in the system Example
|
Example
{
"id": 0,
"identity": {
"uid": "example",
"cloud_uid": "example"
},
"username": "example",
"display_name": "example",
"is_dismissed": true,
"affiliation": "example"
}
ComSource
Source of the group ID:
dir: IAM.cloud: Yandex Cloud.com: Local database.staff: Internal employee directory.
Type: string
Enum: dir, cloud, com, staff
ComIdentitySchema
Group identifier
|
Name |
Description |
|
id |
Type: string Group identifier in the specified source Example: |
|
src |
All of 1 type
Identifier source Example: |
Example
{
"src": "dir",
"id": "example"
}
GroupType
Group type:
wiki: Wiki group.service: Service group.servicerole: Service role.group: Regular group.department: Department.
Type: string
Enum: wiki, service, servicerole, group, department
IntranetGroupMetadata
Group metadata from the internal directory
|
Name |
Description |
|
externals_count |
Type: integer Number of external consultants in the group |
|
url |
Type: string Group URL in the directory Example: |
Example
{
"url": "example",
"externals_count": 0
}
IamGroupMetadata
Group metadata from IAM (Identity and Access Management)
|
Name |
Description |
|
dir_id |
Type: string Directory identifier Example: |
Example
{
"dir_id": "example"
}
GroupSchema
Group information
|
Name |
Description |
|
identity |
All of 1 type
Group identifier in the system Example
|
|
name |
Type: string Group name Example: |
|
type |
All of 1 type
Group type Example: |
|
id |
Type: string Group ID. Uses dir_id in the external version and staff_id in the internal version. Example: |
|
members_count |
Type: integer Number of group members Default: |
|
metadata |
Any of 2 types
Additional group metadata Example
|
Example
{
"id": "example",
"identity": {
"src": "dir",
"id": "example"
},
"name": "example",
"type": "wiki",
"metadata": {
"url": "example",
"externals_count": 0
},
"members_count": 0
}