Getting a list of original texts

Description

Gets a list of all original texts from the site that were added to Yandex.Webmaster.

Request format

Send a GET request to the operation address for the original-texts resource for the user's site:

GET https://api.webmaster.yandex.net/v3/user/{user-id}/hosts/{host-id}/original-texts/[?offset={offset}&limit={limit}]

Path parameters

NameRequiredTypeDefault valueDescription
user-idYesint64The user ID.
host-idYeshost idSite ID.

Query arguments

NameRequiredTypeDefault valueDescription
OffsetNoint320Offset in the resulting list. The minimum value is 0.
LimitNoint3210Page size (1-100).

Response format

If successful, the server returns 200 OK and a list of the site's original texts

Samples

{
  "original_texts": [
    {
      "id": "explicit error message",
      "content_snippet": "explicit error message",
      "date": "2016-01-01T00:00:00,000+0300"
    }, ...
  ],
  "count": 1,
  "quota_remainder": 1
}
NameRequiredTypeDescription
idYesstringID of an original text.
content_snippetYesstringExtract from the original text.
DateNoyyyy-MM-ddTHH:mm:ss,sssZDate when the original text was added.
countYesint32The number of original texts added.
quota_remainderYesint32The remainder of the daily quota for the number of added texts.

Errors

403 Forbidden

The user ID for the token doesn't match the one specified in the request. In the examples below, {user_id} is the correct uid for the owner of the OAuth token.

{
  "error_code": "INVALID_USER_ID",
  "available_user_id": 1,
  "error_message": "Invalid user id. {user_id} should be used."
}
ParameterDescription
error_codeError code.
available_user_idID of the user who allowed access.
error_messageError message.

404 Not Found

The site isn't in the list of the user's sites, or rights to the site haven't been verified.

{
  "error_code": "HOST_NOT_VERIFIED",
  "host_id": "http:ya.ru:80",
  "error_message": "explicit error message"
}
ParameterDescription
error_codeError code.
host_idThe ID of the requested site.
error_messageError message.