Removing a sitemap

Description

Deletes a sitemap file added by the user.

Request format

Send a DELETE request to the address of the sitemap resource to remove.

DELETE https://api.webmaster.yandex.net/v3/user/{user-id}/hosts/{host-id}/user-added-sitemaps/{sitemap-id}/

Path parameters

NameRequiredTypeDefault valueDescription
user-idYesint64The user ID.
host-idYeshost idSite ID.
sitemap-idYessitemap idID of the sitemap file.

Response format

If successful, the server returns 204. The response body isn't passed.

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 specified sitemap doesn't exist in the collection of sitemap files added by the user for this site.

  • SITEMAP_NOT_ADDED error

    {
      "error_code": "SITEMAP_NOT_ADDED",
      "host_id": "http:ya.ru:80",
      "sitemap_id": "c7-fe:80-c0",
      "error_message": "explicit error message"
    }
    ParameterDescription
    error_codeError code.
    host_idSite ID.
    sitemap_idID of the sitemap file.
    error_messageError message.
  • HOST_NOT_VERIFIED error

    The site hasn't been added to the list of sites, or the user hasn't verified site management rights.

    {
      "error_code": "HOST_NOT_VERIFIED",
      "host_id": "http:ya.ru:80",
      "error_message": "explicit error message"
    }
    ParameterDescription
    error_codeError code.
    host_idSite ID.
    error_messageError message.