Sitemaps: get
Wymaga autoryzacji
Pobiera informacje o konkretnej mapie witryny.
Wypróbuj
Żądanie
Żądanie HTTP
GET https://www.googleapis.com/webmasters/v3/sites/siteUrl/sitemaps/feedpath
Parametry
Nazwa parametru |
Wartość |
Opis |
Parametry ścieżki |
feedpath |
string |
Adres URL faktycznej mapy witryny. Na przykład: http://www.example.com/sitemap.xml
|
siteUrl |
string |
Adres URL usługi określony w Search Console. Na przykład:
http://www.example.com/
(usługa z prefiksem URL),
lub sc-domain:example.com
(usługę Domena).
|
Autoryzacja
To żądanie wymaga autoryzacji z co najmniej jednym z tych zakresów (więcej informacji o uwierzytelnianiu i autoryzowaniu).
Zakres |
https://www.googleapis.com/auth/webmasters.readonly |
https://www.googleapis.com/auth/webmasters |
Treść żądania
Nie podawaj treści żądania przy użyciu tej metody.
Odpowiedź
Jeśli operacja się uda, metoda zwróci zasób map witryn w treści odpowiedzi.
Wypróbuj
Użyj poniższego eksploratora interfejsów API, aby wywołać tę metodę na bieżących danych i wyświetlić odpowiedź.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-24 UTC.
[null,null,["Ostatnia aktualizacja: 2024-08-24 UTC."],[[["Retrieves data for a specified sitemap using its URL and the site's URL as registered in Google Search Console."],["Requires authorization with either `https://www.googleapis.com/auth/webmasters.readonly` or `https://www.googleapis.com/auth/webmasters` scope."],["Uses an HTTP GET request with `feedpath` and `siteUrl` as path parameters."],["Returns a Sitemaps resource with information about the requested sitemap if successful."]]],["This outlines how to retrieve information about a specific sitemap via a `GET` request to `https://www.googleapis.com/webmasters/v3/sites/siteUrl/sitemaps/feedpath`. The request requires authorization using either the `webmasters.readonly` or `webmasters` scope. Two path parameters, `feedpath` (sitemap URL) and `siteUrl` (property URL), are needed. No request body is required; a successful response returns a Sitemaps resource.\n"]]