Getting the upload information

Returns the information about the RSS feed upload in Yandex.Webmaster.

  1. Request format
  2. Response format
  3. Response codes
  4. Example

Request format

GET https://api.webmaster.yandex.net/v4/user/{user-id}/hosts/{host-id}/turbo/tasks/{task-id}
user-idUser ID. To get the value, use the GET /v4/user operation.
host-id
Site ID. Has the scheme:host:port format, where
  • scheme — The http or https protocol.
  • host — Site URL with or without www.
  • port — The port to connect to. For the http protocol — 80, for the https protocol — 443.

For example: https:example.com:443 or http:www.example.com:80.

You can also get the site ID using the operation GET /user/{user-id}/hosts.

task-idThe ID for the RSS feed upload task. You can get it when you create the RSS feed upload task or receive the list of previously created tasks.
user-idUser ID. To get the value, use the GET /v4/user operation.
host-id
Site ID. Has the scheme:host:port format, where
  • scheme — The http or https protocol.
  • host — Site URL with or without www.
  • port — The port to connect to. For the http protocol — 80, for the https protocol — 443.

For example: https:example.com:443 or http:www.example.com:80.

You can also get the site ID using the operation GET /user/{user-id}/hosts.

task-idThe ID for the RSS feed upload task. You can get it when you create the RSS feed upload task or receive the list of previously created tasks.

Response format

The service returns data in either JSON (default) or XML format. To get the XML response, pass the HTTP header Accept: application/xml in the request.

{
  "mode": "string",
  "load_status": "string",
  "turbo_pages": [
    {
      "link": "string",
      "preview": "string",
      "title": "string"
    }
  ],
  "errors": [
    {
      "error_code": "string",
      "help_link": "string",
      "line": int32,
      "column": int32,
      "text": "string",
      "context": {
        "text": "string",
        "position": int32
      },
      "tag": "string"
    }
  ],
  "stats": {
    "pages_count": int32,
    "errors_count": int32,
    "warnings_count": int32
  }
}
mode
Turbo page loading mode.
load_status
Turbo page loading status. Possible values:
  • PROCESSING — The file is validated for errors.
  • OK —The file is uploaded and doesn't contain errors.
  • WARNING — XML elements in the file aren't supported by Yandex or are specified incorrectly.
  • ERROR — The file contains errors (for example, duplicate XML elements).
turbo_page
Page block.
link
The URL of the source page for which the Turbo page is generated.
preview
The link to view the Turbo page.
title
Page heading.
error
The error block
error_code
Error code.
help_link
Link to the error description.
line
Number of line in the RSS feed line where the error was found.
column
Number of column in the RSS feed where the error was found.
text
The row in which the error was found.
context
The error context.
text
The Turbo page source code fragment.
position
The error position within the code fragment.
tag
The element in which the error was detected.
stats
Contains an array of information.
pages_count
Total number of pages loaded.
errors_count
Number of critical errors.
warnings_count
Number of errors.

Response codes

Code Description

200 OK

The request is successfully completed.

403 Forbidden

INVALID_USER_ID
The ID of the user who issued the token differs from the one specified in the request. The examples below {user_id} show the correct uid of the OAuth token owner.
Example response
{
  "error_code": "INVALID_USER_ID",
  "available_user_id": 1,
  "error_message": "Invalid user id. {user_id} should be used."
}
Copied to clipboard
error_code
Error code.
available_user_id
ID of the user who allowed access.
error_message
Error message.

404 Not Found

HOST_NOT_VERIFIED
Site management rights are not verified.
Example response
{
  "error_code": "HOST_NOT_VERIFIED",
  "host_id": "http:ya.ru:80",
  "error_message": "some string"
}
Copied to clipboard
error_code
Error code.
host_id
ID of the requested site.
error_message
Error message.
TASK_NOT_FOUND
Failed to find a task with the specified ID.
Example response
{
  "error_code": "TASK_NOT_FOUND",
  "error_message": "some string"
}
Copied to clipboard
error_code
Error code.
error_message
Error message.
Code Description

200 OK

The request is successfully completed.

403 Forbidden

INVALID_USER_ID
The ID of the user who issued the token differs from the one specified in the request. The examples below {user_id} show the correct uid of the OAuth token owner.
Example response
{
  "error_code": "INVALID_USER_ID",
  "available_user_id": 1,
  "error_message": "Invalid user id. {user_id} should be used."
}
Copied to clipboard
error_code
Error code.
available_user_id
ID of the user who allowed access.
error_message
Error message.

404 Not Found

HOST_NOT_VERIFIED
Site management rights are not verified.
Example response
{
  "error_code": "HOST_NOT_VERIFIED",
  "host_id": "http:ya.ru:80",
  "error_message": "some string"
}
Copied to clipboard
error_code
Error code.
host_id
ID of the requested site.
error_message
Error message.
TASK_NOT_FOUND
Failed to find a task with the specified ID.
Example response
{
  "error_code": "TASK_NOT_FOUND",
  "error_message": "some string"
}
Copied to clipboard
error_code
Error code.
error_message
Error message.

Example

Request:

curl -X GET \
  'https://api.webmaster.yandex.net/v4/user/12345678/hosts/https:example.com:443/turbo/tasks/12345e0-678f-9e' \
  -H 'Authorization: OAuth oauth_token'
Copied to clipboard

Response:

{
    "mode": "DEBUG",
    "load_status": "OK",
    "turbo_pages": [
        {
            "link": "https://example.com",
            "preview": "https://yandex.ru/turbo?text=https%3A%2F%2Fexample.com%2F&from=webmaster&ncrnd=6249270910336449448",
 "title": "The Healthy Breakfast restaurant"
        }
    ],
    "errors": [],
    "stats": {
        "pages_count": 1,
        "errors_count": 0,
        "warnings_count": 0
    }
}