catalogs
Creates, updates, deletes, gets or lists a catalogs
resource.
Overview
Name | catalogs |
Type | Resource |
Id | google.retail.catalogs |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_catalogs_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. Immutable. The fully qualified resource name of the catalog. |
displayName | string | Required. 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. |
productLevelConfig | object | Required. The product level configuration. (id: GoogleCloudRetailV2ProductLevelConfig) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_catalogs_list | select | projectsId , locationsId | pageSize , pageToken | Lists all the Catalogs associated with the project. |
projects_locations_catalogs_patch | update | projectsId , locationsId , catalogsId | updateMask | Updates the Catalogs. |
projects_locations_catalogs_export_analytics_metrics | exec | projectsId , locationsId , catalogsId | Exports analytics metrics. Operation.response is of type ExportAnalyticsMetricsResponse . Operation.metadata is of type ExportMetadata . | |
projects_locations_catalogs_set_default_branch | exec | projectsId , locationsId , catalogsId | Set 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}. | |
projects_locations_catalogs_complete_query | exec | projectsId , locationsId , catalogsId | query , visitorId , languageCodes , deviceType , dataset , maxSuggestions , enableAttributeSuggestions , entity | Completes 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. |
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 | |
dataset | string | |
deviceType | string | |
enableAttributeSuggestions | boolean | |
entity | string | |
languageCodes | string | |
maxSuggestions | integer (int32) | |
pageSize | integer (int32) | |
pageToken | string | |
query | string | |
updateMask | string (google-fieldmask) | |
visitorId | string |
SELECT
examples
- projects_locations_catalogs_list
Lists all the Catalogs associated with the project.
SELECT
name,
displayName,
productLevelConfig
FROM google.retail.catalogs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
UPDATE
examples
- projects_locations_catalogs_patch
Updates the Catalogs.
UPDATE google.retail.catalogs
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__productLevelConfig = '{{ productLevelConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND catalogsId = '{{ catalogsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
displayName,
productLevelConfig;
Lifecycle Methods
- projects_locations_catalogs_export_analytics_metrics
- projects_locations_catalogs_set_default_branch
- projects_locations_catalogs_complete_query
Exports analytics metrics. Operation.response
is of type ExportAnalyticsMetricsResponse
. Operation.metadata
is of type ExportMetadata
.
EXEC google.retail.catalogs.projects_locations_catalogs_export_analytics_metrics
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required
@@json=
'{
"outputConfig": "{{ outputConfig }}",
"filter": "{{ filter }}"
}';
Set 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}.
EXEC google.retail.catalogs.projects_locations_catalogs_set_default_branch
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required
@@json=
'{
"branchId": "{{ branchId }}",
"note": "{{ note }}",
"force": {{ force }}
}';
Completes 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.
EXEC google.retail.catalogs.projects_locations_catalogs_complete_query
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required,
@query='{{ query }}',
@visitorId='{{ visitorId }}',
@languageCodes='{{ languageCodes }}',
@deviceType='{{ deviceType }}',
@dataset='{{ dataset }}',
@maxSuggestions='{{ maxSuggestions }}',
@enableAttributeSuggestions={{ enableAttributeSuggestions }},
@entity='{{ entity }}';