Getting a list of tasks for reindexing

Returns a list of tasks for reindexing site pages.

Request format

GET https://api.webmaster.yandex.net/v4/user/{user-id}/hosts/{host-id}/recrawl/queue
  ? [offset=<int32>]
  & [limit=<int32>]
  & [date_from=<datetime>]
  & [date_to=<datetime>]

user-id

Type: int64. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the GET /v4/user method.

host-id

Type: host id (string). The site ID. To get it, use the GET /v4/user/{user-id}/hosts method.

offset

Offset in the list. Default value: 0.

limit

Page size. The minimum value is 1. Default value: 50.

date_from

Start of the date range

date_to

End of the date range.

Response format

Examples

{
  "tasks": [
    {
      "task_id": "c7fe80c0-36e3-11e6-8b2d-df96aa592c0a",
      "url": "http://example.com/some/path?a=b",
      "added_time": "2016-01-01T00:00:00,000+0300",
      "state": "IN_PROGRESS"
    }
  ]
}
<Data>  
  <task>    
    <task_id>c7fe80c0-36e3-11e6-8b2d-df96aa592c0a</task_id>    
    <url>http://example.com/some/path?a=b</url>    
    <added_time>2016-01-01T00:00:00,000+0300</added_time>    
    <state>IN_PROGRESS</state>
  </task>
</Data>

Name

Required

Type

Description

task_id

Yes

string

ID of the reindexing task.

url

Yes

string

The URL of the page sent for reindexing.

added_time

No

datetime

Date the reindexing request was created.

state

Yes

string (RecrawlStatusEnum)

The status of the reindexing request.

Reindexing request status (RecrawlStatusEnum)

Indicator

Description

IN_PROGRESS

The request is being processed.

DONE

The robot crawled the URL

FAILED

The robot failed to crawl the page. Make sure it is accessible to the robot and the server responds fast enough.

Response codes

To view the response structure in detail, click the reason.

Code

Reason

Description

200

OK

403

INVALID_USER_ID

The ID of the user who issued the token differs from the one specified in the request. In the examples below, {user_id} shows the correct uid of the OAuth token owner.

{   
    "error_code": "INVALID_USER_ID",   
    "available_user_id": 1,   
    "error_message": "Invalid user id. {user_id} should be used."
}
<Data>     
    <error_code>INVALID_USER_ID</error_code>     
    <available_user_id>1</available_user_id>     
    <error_message>Invalid user id. {user_id} should be used.</error_message> 
</Data>

404

HOST_NOT_VERIFIED

Site management rights are not verified.

{   
    "error_code": "HOST_NOT_VERIFIED",   
    "host_id": "http:ya.ru:80",   
    "error_message": "some string" 
}
<Data>   
    <error_code>HOST_NOT_VERIFIED</error_code>     
    <host_id>http:ya.ru:80</host_id>   
    <error_message>some string</error_message>
</Data>

Type: int64. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the GET /v4/user method.

Type: host id (string). The site ID. To get it, use the GET /v4/user/{user-id}/hosts method.

Offset in the list. Default value: 0.

Page size. The minimum value is 1. Default value: 50.

Start of the date range

End of the date range.

Required

Yes

Type

string

Description

ID of the reindexing task.

Required

Yes

Type

string

Description

The URL of the page sent for reindexing.

Required

No

Type

datetime

Description

Date the reindexing request was created.

Required

Yes

Type

string (RecrawlStatusEnum)

Description

The status of the reindexing request.

Description

Error code.

Description

ID of the user who allowed access.

Description

ID of the requested site.

Description

Error message.