Sites: list
Cần phải uỷ quyền
Liệt kê các trang web của người dùng trong Search Console.
Thử ngay.
Yêu cầu
Yêu cầu HTTP
GET https://www.googleapis.com/webmasters/v3/sites
Ủy quyền
Yêu cầu này cần có sự uỷ quyền với ít nhất một trong các phạm vi sau (đọc thêm về tính năng xác thực và uỷ quyền).
Phạm vi |
https://www.googleapis.com/auth/webmasters.readonly |
https://www.googleapis.com/auth/webmasters |
Nội dung yêu cầu
Đừng cung cấp nội dung yêu cầu bằng phương thức này.
Phản hồi
Nếu thành công, phương thức này sẽ trả về nội dung phản hồi có cấu trúc như sau:
{
"siteEntry": [
sites Resource
]
}
Tên tài sản |
Giá trị |
Mô tả |
Ghi chú |
siteEntry[] |
list |
Chứa thông tin về cấp độ quyền của một trang web trong Search Console. Để biết thêm thông tin, hãy xem bài viết Quyền trong Search Console. |
|
Hãy dùng thử!
Hãy sử dụng APIs Explorer (Trình khám phá API) bên dưới để gọi phương thức này trên dữ liệu trực tiếp và xem phản hồi.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-08-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-08-24 UTC."],[[["Lists the Search Console sites that a user has access to, along with their permission levels."],["Requires authorization using specific scopes to access the data."],["Uses a simple `GET` request to retrieve the list of sites."],["Returns a response containing an array of `siteEntry` objects, each representing a Search Console site with its associated permissions."]]],["This document outlines how to list a user's Search Console sites via the Webmasters API v3. The `GET` request to `https://www.googleapis.com/webmasters/v3/sites` requires authorization using either the `webmasters.readonly` or `webmasters` scope. No request body is needed. A successful response returns a JSON object containing a `siteEntry` list. Each entry details permission level information for a Search Console site. The provided link gives more information on Search Console permissions.\n"]]