Method: attributes.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
返回可用属性的列表,这些属性适用于具有指定主要类别和国家/地区的营业地点。
HTTP 请求
GET https://mybusiness.googleapis.com/v4/attributes
网址采用 gRPC 转码语法。
查询参数
参数 |
name |
string
用于查找可用属性的营业地点的资源名称。
|
categoryId |
string
主要类别的稳定 ID,可用于查找可用属性。
|
country |
string
ISO 3166-1 alpha-2 国家/地区代码,可用于查找可用属性。
|
languageCode |
string
用于获取属性显示名称的 BCP 47 语言代码。如果未推出该语言版本,则会以英语提供。
|
pageSize |
integer
每页包含的属性数量。默认值为 200,最小值为 1。
|
pageToken |
string
如果指定,则检索下一页属性元数据。当调用 attributes.list 返回的结果数超过所请求的页面大小所能容纳的数量时,系统会返回 pageToken 。
|
响应正文
如果成功,响应正文将包含结构如下的数据:
Locations.ListAttributeMetadata 的响应消息。
JSON 表示法 |
{
"attributes": [
{
object (AttributeMetadata )
}
],
"nextPageToken": string
} |
字段 |
attributes[] |
object (AttributeMetadata )
一组可用属性的属性元数据。
|
nextPageToken |
string
如果属性数量超过所请求的页面大小,系统会使用令牌填充此字段,以在后续调用 attributes.list 时获取下一页属性。如果没有其他属性,此字段将不会在响应中显示。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
如需了解详情,请参阅 OAuth 2.0 概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\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)."]]