Sites: add
Cần phải uỷ quyền
Thêm một trang web vào nhóm trang web của người dùng trong Search Console.
Thử ngay.
Yêu cầu
Yêu cầu HTTP
PUT https://www.googleapis.com/webmasters/v3/sites/siteUrl
Tham số
Tên thông số |
Giá trị |
Mô tả |
Tham số đường dẫn |
siteUrl |
string |
URL của cơ sở lưu trú cần thêm. Ví dụ:
http://www.example.com/ (đối với tài sản có tiền tố URL) hoặc
sc-domain:example.com (đối với Tài sản miền)
|
Ủy quyền
Yêu cầu này cần có sự cho phép có phạm vi sau (đọc thêm về quy trình xác thực và uỷ quyền).
Phạm vi |
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ề một nội dung phản hồi trống.
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."],[[["Adds a website to the user's Search Console account, allowing it to be managed and monitored."],["Uses a PUT request to the specified endpoint with the website URL as a path parameter."],["Requires authorization with the `https://www.googleapis.com/auth/webmasters` scope."],["The request body should be empty, and a successful response will also be empty."]]],["This content describes adding a site to a user's Search Console. A `PUT` request to `https://www.googleapis.com/webmasters/v3/sites/siteUrl` is required, with the `siteUrl` path parameter specifying the site's URL (e.g., `http://www.example.com/` or `sc-domain:example.com`). Authorization using the `https://www.googleapis.com/auth/webmasters` scope is mandatory. No request body is needed, and a successful request returns an empty response body. The content refers to using the API Explorer to test the request.\n"]]