Method: attributes.list
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trả về danh sách các thuộc tính sẵn có đối với một vị trí có quốc gia và danh mục chính đã cho.
Yêu cầu HTTP
GET https://mybusiness.googleapis.com/v4/attributes
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số truy vấn
Tham số |
name |
string
Tên tài nguyên của vị trí để tra cứu các thuộc tính có sẵn.
|
categoryId |
string
Mã nhận dạng ổn định của danh mục chính để tìm các thuộc tính hiện có.
|
country |
string
Mã quốc gia theo ISO 3166-1 alpha-2 để tìm các thuộc tính có sẵn.
|
languageCode |
string
Mã BCP 47 của ngôn ngữ để lấy tên hiển thị thuộc tính. Nếu ngôn ngữ này không có sẵn, chúng sẽ được cung cấp bằng tiếng Anh.
|
pageSize |
integer
Số thuộc tính cần đưa vào mỗi trang. Giá trị mặc định là 200, giá trị tối thiểu là 1.
|
pageToken |
string
Nếu bạn chỉ định, hệ thống sẽ truy xuất trang tiếp theo của siêu dữ liệu thuộc tính. pageToken được trả về khi lệnh gọi đến attributes.list trả về nhiều kết quả hơn kích thước trang được yêu cầu.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Thông báo phản hồi choLocations.ListAttributeMetadata.
Biểu diễn dưới dạng JSON |
{
"attributes": [
{
object (AttributeMetadata )
}
],
"nextPageToken": string
} |
Trường |
attributes[] |
object (AttributeMetadata )
Tập hợp siêu dữ liệu thuộc tính của các thuộc tính hiện có.
|
nextPageToken |
string
Nếu số lượng thuộc tính vượt quá kích thước trang đã yêu cầu, trường này sẽ được điền sẵn một mã thông báo để tìm nạp trang thuộc tính tiếp theo trong lệnh gọi tiếp theo tới attributes.list . Nếu không còn thuộc tính nào khác, trường này sẽ không xuất hiện trong phản hồi.
|
Phạm vi cấp phép
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
Để biết thêm thông tin, hãy xem bài viết Tổng quan về OAuth 2.0.
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: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eLists available attributes for a Google Business Profile location based on primary category and country.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying location, category, and country; optional parameters include language and pagination controls.\u003c/p\u003e\n"],["\u003cp\u003eResponse provides attribute metadata and a token for retrieving additional pages if necessary.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific Google Business Profile management scopes.\u003c/p\u003e\n"]]],[],null,["# Method: attributes.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListAttributeMetadataResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n\nReturns the list of available attributes that would be available for a location with the given primary category and country.\n\n### HTTP request\n\n`GET https://mybusiness.googleapis.com/v4/attributes`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name of the location to look up available attributes. |\n| `categoryId` | `string` The primary category stable ID to find available attributes. |\n| `country` | `string` The ISO 3166-1 alpha-2 country code to find available attributes. |\n| `languageCode` | `string` The BCP 47 code of language to get attribute display names in. If this language is not available, they will be provided in English. |\n| `pageSize` | `integer` How many attributes to include per page. Default is 200, minimum is 1. |\n| `pageToken` | `string` If specified, the next page of attribute metadata is retrieved. The `pageToken` is returned when a call to `attributes.list` returns more results than can fit into the requested page size. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for Locations.ListAttributeMetadata.\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"attributes\": [ { object (/my-business/reference/rest/v4/attributes#AttributeMetadata) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `attributes[]` | `object (`[AttributeMetadata](/my-business/reference/rest/v4/attributes#AttributeMetadata)`)` A collection of attribute metadata for the available attributes. |\n| `nextPageToken` | `string` If the number of attributes exceeded the requested page size, this field will be populated with a token to fetch the next page of attributes on a subsequent call to `attributes.list`. If there are no more attributes, this field will not be present in the response. |\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/plus.business.manage`\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]