Skip to main content

catalogs

Creates, updates, deletes, gets or lists a catalogs resource.

Overview

Namecatalogs
TypeResource
Idgoogle.retail.catalogs

Fields

NameDatatypeDescription
namestringRequired. Immutable. The fully qualified resource name of the catalog.
displayNamestringRequired. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
productLevelConfigobjectConfigures what level the product should be uploaded with regards to how users will be send events and how predictions will be made.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_catalogs_listSELECTlocationsId, projectsIdLists all the Catalogs associated with the project.
projects_locations_catalogs_patchUPDATEcatalogsId, locationsId, projectsIdUpdates the Catalogs.
projects_locations_catalogs_complete_queryEXECcatalogsId, locationsId, projectsIdCompletes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.
projects_locations_catalogs_export_analytics_metricsEXECcatalogsId, locationsId, projectsIdExports analytics metrics. Operation.response is of type ExportAnalyticsMetricsResponse. Operation.metadata is of type ExportMetadata.
projects_locations_catalogs_set_default_branchEXECcatalogsId, locationsId, projectsIdSet a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using "default_branch" to the actual branch id set as default. For example, if projects/*/locations/*/catalogs/*/branches/1 is set as default, setting SearchRequest.branch to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting SearchRequest.branch to projects/*/locations/*/catalogs/*/branches/1. Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using projects/*/locations/*/catalogs/*/branches/default_branch as SearchRequest.branch to route the traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. More specifically: PredictionService will only return product IDs from branch {newBranch}. SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). * UserEventService will only join events with products from branch {newBranch}.

SELECT examples

Lists all the Catalogs associated with the project.

SELECT
name,
displayName,
productLevelConfig
FROM google.retail.catalogs
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a catalogs resource.

/*+ update */
UPDATE google.retail.catalogs
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
productLevelConfig = '{{ productLevelConfig }}'
WHERE
catalogsId = '{{ catalogsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';