Update user/group access to a page

Updates an existing personal access to a page.

Lets you change the role of a user or group, as well as configure access inheritance for subpages.

Request

POST

https://api.wiki.yandex.net/v1/pages/{idx}/access/{access_id}

Path parameters

Name

Description

access_id

Type: string

Access ID

Example: ``

idx

Type: integer

Page ID

Query parameters

Name

Description

prevent_selflock

Type: boolean

If true, an error is raised when updating an access would cause the co-author to lose read access or access management permissions

Default: false

Body

application/json
{
  "role": "reader",
  "inheritance": "inherited"
}

Name

Description

inheritance

All of 1 type
  • InheritanceAPI

    Type: InheritanceAPI

    Access inheritance for subpages:

    • inherited — access is inherited by subpages
    • not_inherited — access is not inherited by subpages

    Enum: inherited, not_inherited

Access inheritance for subpages: inherited (inherited), not_inherited (not inherited)

Example: inherited

role

All of 1 type
  • RoleAPI

    Type: RoleAPI

    Page access role:

    • reader — read
    • editor — edit
    • extra_editor — extended editing (access management)
    • author — author (full access)

    Enum: reader, editor, extra_editor, author

The new access role: reader (read), editor (edit), extra_editor (extended editing), author (author)

Example: reader

RoleAPI

Page access role:

  • reader — read
  • editor — edit
  • extra_editor — extended editing (access management)
  • author — author (full access)

Type: string

Enum: reader, editor, extra_editor, author

InheritanceAPI

Access inheritance for subpages:

  • inherited — access is inherited by subpages
  • not_inherited — access is not inherited by subpages

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: example

role

All of 1 type
  • RoleAPI

    Type: RoleAPI

    Page access role:

    • reader — read
    • editor — edit
    • extra_editor — extended editing (access management)
    • author — author (full access)

    Enum: reader, editor, extra_editor, author

Access role

Example: reader

created_at

Type: string<date-time>

Date and time the access was created

Example: 2025-01-01T00:00:00Z

group

All of 1 type
  • GroupSchema

    Type: GroupSchema

    Information about the group

    Example
    {
      "id": "example",
      "identity": {
        "src": "dir",
        "id": "example"
      },
      "name": "example",
      "type": "wiki",
      "metadata": {
        "url": "example",
        "externals_count": 0
      },
      "members_count": 0
    }
    

The group the access is granted to (populated if the access is granted to a group)

Example
{
  "id": "example",
  "identity": {
    "src": "dir",
    "id": "example"
  },
  "name": "example",
  "type": "wiki",
  "metadata": {
    "url": "example",
    "externals_count": 0
  },
  "members_count": 0
}

inheritance

All of 1 type
  • InheritanceAPI

    Type: InheritanceAPI

    Access inheritance for subpages:

    • inherited — access is inherited by subpages
    • not_inherited — access is not inherited by subpages

    Enum: inherited, not_inherited

Access inheritance setting for subpages

Example: inherited

user

All of 1 type
  • UserSchema

    Type: UserSchema

    Information about the user

    Example
    {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    }
    

The user the access is granted to (populated if the access is granted to a user)

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

UserIdentity

User identifier

Name

Description

cloud_uid

Type: string

User identifier in the cloud (for the external instance)

Example: example

uid

Type: string

User identifier in Yandex (for the internal instance)

Example: example

Example
{
  "uid": "example",
  "cloud_uid": "example"
}

UserSchema

Information about the user

Name

Description

affiliation

Type: string

User affiliation (for example, yandex, external)

Example: example

display_name

Type: string

User display name

Example: example

id

Type: integer

Internal user identifier

is_dismissed

Type: boolean

The user has been dismissed

username

Type: string

User login

Example: example

identity

All of 1 type
  • UserIdentity

    Type: UserIdentity

    User identifier

    Example
    {
      "uid": "example",
      "cloud_uid": "example"
    }
    

User identifier in the system

Example
{
  "uid": "example",
  "cloud_uid": "example"
}
Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

ComSource

Group identifier source:

  • dir — IAM
  • cloud — Yandex Cloud
  • com — local database
  • staff — 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: example

src

All of 1 type
  • ComSource

    Type: ComSource

    Group identifier source:

    • dir — IAM
    • cloud — Yandex Cloud
    • com — local database
    • staff — Staff (internal employee directory)

    Enum: dir, cloud, com, staff

Identifier source

Example: dir

Example
{
  "src": "dir",
  "id": "example"
}

GroupType

Group type:

  • wiki — a Wiki group
  • service — a service group
  • servicerole — a service role
  • group — a regular group
  • department — a 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

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

Example
{
  "dir_id": "example"
}

GroupSchema

Information about the group

Name

Description

identity

All of 1 type
  • ComIdentitySchema

    Type: ComIdentitySchema

    Group identifier

    Example
    {
      "src": "dir",
      "id": "example"
    }
    

Group identifier in the system

Example
{
  "src": "dir",
  "id": "example"
}

name

Type: string

Group name

Example: example

type

All of 1 type
  • GroupType

    Type: GroupType

    Group type:

    • wiki — a Wiki group
    • service — a service group
    • servicerole — a service role
    • group — a regular group
    • department — a department

    Enum: wiki, service, servicerole, group, department

Group type

Example: wiki

id

Type: string

Group identifier. For the external instance, dir_id; for the internal instance, staff_id

Example: example

members_count

Type: integer

Number of group members

Default: 0

metadata

Any of 2 types
  • IntranetGroupMetadata

    Type: IntranetGroupMetadata

    Group metadata from the internal directory

    Example
    {
      "url": "example",
      "externals_count": 0
    }
    
  • IamGroupMetadata

    Type: IamGroupMetadata

    Group metadata from IAM (Identity and Access Management)

    Example
    {
      "dir_id": "example"
    }
    

Additional group metadata

Example
{
  "url": "example",
  "externals_count": 0
}
Example
{
  "id": "example",
  "identity": {
    "src": "dir",
    "id": "example"
  },
  "name": "example",
  "type": "wiki",
  "metadata": {
    "url": "example",
    "externals_count": 0
  },
  "members_count": 0
}