Getting the RSS feed upload link

Returns a link for uploading the RSS feed. The link is valid for 10 minutes after receiving it.

  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/uploadAddress
 ? [mode=<string>]
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.

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.

mode
The RSS feed upload mode. Possible values:
  • PRODUCTION — Publication.
  • DEBUG — Debug mode.

Default value is PRODUCTION.

mode
The RSS feed upload mode. Possible values:
  • PRODUCTION — Publication.
  • DEBUG — Debug mode.

Default value is PRODUCTION.

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.

{
  "valid_until": "YYYY-MM-DDThh:mm:ss±hh:mm",
  "upload_address": "string"
}
valid_until

The date and time until which the URL is available for download (10 minutes after the request).

upload_address

The link to create a task for the RSS feed upload.

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.
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.

Example

Request:

curl -X GET \
  'https://api.webmaster.yandex.net/v4/user/12345678/hosts/https:example.com:443/turbo/uploadAddress?mode=PRODUCTION' \
  -H 'Authorization: OAuth oauth_token'
Copied to clipboard

Response:

{
  "valid_until": "2018-11-10T18:12:22.085+03:00",
  "upload_address": "https://api.webmaster.yandex.net/v3.2/upload/turbo/yXOkhVGtFtUiZfRBJxIivnlHW90o5jrpBhFSjnGg_yMyg7tYc9sGsOtDSkaGQx-N_2i_2bQxgvUk1gbxreD_uA"
}