L'API
Google Business Performance propose une
NOUVELLE méthode qui permet d'extraire plusieurs `DailyMetrics` avec une seule requête API.
Consultez le
planning d'abandon et les instructions pour migrer de la méthode API reportInsights v4 à l'API Google Business Profile Performance.
Method: attributes.list
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Affiche la liste des attributs disponibles pour un établissement associé à la catégorie principale et au pays spécifiés.
Requête HTTP
GET https://mybusiness.googleapis.com/v4/attributes
L'URL utilise la syntaxe de transcodage gRPC.
Paramètres de requête
Paramètres |
name |
string
Nom de ressource de l'emplacement pour rechercher les attributs disponibles.
|
categoryId |
string
ID stable de la catégorie principale permettant de trouver les attributs disponibles.
|
country |
string
Code pays ISO 3166-1 alpha-2 pour trouver les attributs disponibles.
|
languageCode |
string
Code BCP 47 de la langue dans laquelle obtenir les noms à afficher des attributs. Si cette langue n'est pas disponible, elles seront fournies en anglais.
|
pageSize |
integer
Nombre d'attributs à inclure par page. La valeur par défaut est 200, la minimale est 1.
|
pageToken |
string
Si une valeur est spécifiée, la page suivante des métadonnées d'attribut est récupérée. Le pageToken est renvoyé lorsqu'un appel à attributes.list renvoie plus de résultats que la page demandée peut en contenir.
|
Corps de la requête
Le corps de la requête doit être vide.
Corps de la réponse
Si la requête aboutit, le corps de la réponse contient des données qui ont la structure suivante :
Message de réponse pour Location.ListAttributeMetadata.
Représentation JSON |
{
"attributes": [
{
object (AttributeMetadata )
}
],
"nextPageToken": string
} |
Champs |
attributes[] |
object (AttributeMetadata )
Ensemble de métadonnées pour les attributs disponibles.
|
nextPageToken |
string
Si le nombre d'attributs dépasse la taille de page demandée, ce champ sera renseigné avec un jeton permettant d'extraire la page d'attributs suivante lors d'un appel ultérieur à attributes.list . S'il n'y a plus d'attributs, ce champ ne sera pas présent dans la réponse.
|
Champs d'application des autorisations
Nécessite l'un des champs d'application OAuth suivants :
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
Pour en savoir plus, consultez la Présentation d'OAuth 2.0.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[null,null,["Dernière mise à jour le 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)."]]