Copying a page

Copies a page to a new address.

Asynchronous operation. If all checks pass, returns information on how to check its status.

Validation error codes (error_code)

  • IS_CLOUD_PAGE: Cloud pages cannot be cloned.
  • SLUG_OCCUPIED: The cloned page would overlap an existing page.
  • SLUG_RESERVED: Pages cannot be cloned to reserved addresses.
  • FORBIDDEN: No access to the source page or the destination cluster.
  • QUOTA_EXCEEDED: The page creation limit for the current organization has been reached.
  • CLUSTER_BLOCKED: The cluster is temporarily locked for moving.

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}/clone

Path parameters

Name

Description

idx

Type: integer

Page ID. The value of idx is the same as the id field value in the response to GET /v1/pages?slug=… or POST /v1/pages.

Body

application/json
{
  "target": "example",
  "title": "example",
  "subscribe_me": false
}

Name

Description

target

Type: string

The page address (slug) after copying

Example: example

subscribe_me

Type: boolean

Subscribe to changes

Default: false

title

Any of 2 types
  • Type: string

    Min length: 1

    Max length: 255

    Example: example

  • Type: null

    Example: null

If provided, the title of the page after copying

Example: example

Responses

200 OK

OK

Body

application/json
{
  "operation": {
    "type": "clone",
    "id": "example"
  },
  "dry_run": false,
  "status_url": "example"
}

Name

Description

operation

Type: B2BOperationIdentity

id

Type: string

Asynchronous operation ID. Use this value as task_id when requesting the operation status.

Example: example

type

Type: string

The asynchronous operation type.

Const: clone

Example: clone

Asynchronous operation type and ID.

Example
{
  "type": "clone",
  "id": "example"
}

status_url

Type: string

URL for retrieving operation progress information

Example: example

dry_run

Type: boolean

Indicates that execution conditions are checked without starting the operation.

Default: false