catalogs_attributes_config
Creates, updates, deletes, gets or lists a catalogs_attributes_config
resource.
Overview
Name | catalogs_attributes_config |
Type | Resource |
Id | google.retail.catalogs_attributes_config |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_catalogs_get_attributes_config
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. Immutable. The fully qualified resource name of the attribute config. Format: projects/*/locations/*/catalogs/*/attributesConfig |
attributeConfigLevel | string | Output only. The AttributeConfigLevel used for this catalog. |
catalogAttributes | object | Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute. The key is catalog attribute's name. For example: color , brands , attributes.custom_attribute , such as attributes.xyz . The maximum number of catalog attributes allowed in a request is 1000. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_catalogs_get_attributes_config | select | projectsId , locationsId , catalogsId | Gets an AttributesConfig. | |
projects_locations_catalogs_update_attributes_config | update | projectsId , locationsId , catalogsId | updateMask | Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
catalogsId | string | |
locationsId | string | |
projectsId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_catalogs_get_attributes_config
Gets an AttributesConfig.
SELECT
name,
attributeConfigLevel,
catalogAttributes
FROM google.retail.catalogs_attributes_config
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND catalogsId = '{{ catalogsId }}' -- required;
UPDATE
examples
- projects_locations_catalogs_update_attributes_config
Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.
UPDATE google.retail.catalogs_attributes_config
SET
data__name = '{{ name }}',
data__catalogAttributes = '{{ catalogAttributes }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND catalogsId = '{{ catalogsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
attributeConfigLevel,
catalogAttributes;