Google Business Performance API มีเมธอด API
ใหม่ที่อนุญาตให้ดึง `DailyMetrics` หลายรายการในคําขอ API รายการเดียว
ตรวจสอบ
กําหนดการเลิกใช้งานและวิธีการย้ายข้อมูลจากเมธอด v4 reportInsights API ไปยัง API ประสิทธิภาพของ Google Business Profile
Method: attributes.list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงรายการแอตทริบิวต์ที่ใช้ได้ซึ่งจะพร้อมใช้งานสำหรับสถานที่ซึ่งมีหมวดหมู่หลักและประเทศที่ระบุ
คำขอ HTTP
GET https://mybusiness.googleapis.com/v4/attributes
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์การค้นหา
พารามิเตอร์ |
name |
string
ชื่อทรัพยากรของตำแหน่งเพื่อค้นหาแอตทริบิวต์ที่พร้อมใช้งาน
|
categoryId |
string
รหัสแบบคงที่ของหมวดหมู่หลักสำหรับค้นหาแอตทริบิวต์ที่พร้อมใช้งาน
|
country |
string
รหัสประเทศ ISO 3166-1 alpha-2 เพื่อค้นหาแอตทริบิวต์ที่ใช้ได้
|
languageCode |
string
รหัสภาษา BCP 47 ที่ใช้รับชื่อที่แสดงของแอตทริบิวต์ แต่หากไม่มีภาษาดังกล่าว ก็จะเป็นภาษาอังกฤษ
|
pageSize |
integer
จำนวนแอตทริบิวต์ที่จะใส่ใน 1 หน้า ค่าเริ่มต้นคือ 200 และต่ำสุดคือ 1
|
pageToken |
string
หากระบุไว้ ระบบจะดึงข้อมูลหน้าถัดไปของข้อมูลเมตาของแอตทริบิวต์ ระบบแสดงผล pageToken เมื่อการเรียก attributes.list แสดงผลลัพธ์มากเกินกว่าพอดีกับขนาดหน้าที่ร้องขอ
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ข้อความตอบกลับสำหรับ 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 Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 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)."]]