Method: locations.lookupWidgetConfig

Gets the Widget Config using the uuid.

HTTP request

POST https://discoveryengine.googleapis.com/v1alpha/{location=locations/*}/lookupWidgetConfig

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
location

string

Required. The location resource where lookup widget will be performed. Format: locations/{location}

Request body

The request body contains data with the following structure:

JSON representation
{
  "widgetConfigId": string
}
Fields
widgetConfigId

string

Required. The UUID of the Widget Config.

Response body

Response message for WidgetService.LookupWidgetConfig method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "anonymousWidgetConfig": {
    object (WidgetConfig)
  }
}
Fields
anonymousWidgetConfig

object (WidgetConfig)

The Anonymous Widget Config associated with the UUID.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

WidgetConfig

WidgetConfig captures configs at the Widget level.

JSON representation
{
  "name": string,
  "displayName": string,
  "createTime": string,
  "updateTime": string,
  "enableAutocomplete": boolean,
  "fieldsUiComponentsMap": {
    string: {
      object (UIComponentField)
    },
    ...
  },
  "facetField": [
    {
      object (FacetField)
    }
  ],
  "dataStoreType": enum (DataStoreType),
  "contentSearchSpec": {
    object (ContentSearchSpec)
  },
  "enableSummarization": boolean,
  "enableSnippetResultSummary": boolean,
  "configId": string,
  "enableQualityFeedback": boolean,
  "solutionType": enum (SolutionType),
  "allowPublicAccess": boolean,
  "allowlistedDomains": [
    string
  ],
  "enableSafeSearch": boolean,
  "enableConversationalSearch": boolean,
  "llmEnabled": boolean,
  "enableResultScore": boolean
}
Fields
name

string

Immutable. The full resource name of the widget config. Format: projects/{project}/locations/{location}/collections/{collectionId}/dataStores/{dataStoreId}/widgetConfigs/{widgetConfigId}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

displayName

string

Required. The human readable widget config display name. Used in Discovery UI.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

createTime

string (Timestamp format)

Output only. Timestamp the WidgetConfig was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Timestamp the WidgetConfig was updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

enableAutocomplete

boolean

Whether or not to enable autocomplete.

fieldsUiComponentsMap

map (key: string, value: object (UIComponentField))

The key is the UI component. Mock. Currently supported title, thumbnail, url, custom1, custom2, custom3.

The value is the name of the field along with its device visibility.

The 3 custom fields are optional and can be added or removed. title, thumbnail, url are required UI components that cannot be removed.

facetField[]

object (FacetField)

The configuration and appearance of facets in the end user view.

dataStoreType

enum (DataStoreType)

Output only. The type of the parent data store.

contentSearchSpec

object (ContentSearchSpec)

The content search spec that configs the desired behavior of content search.

enableSummarization

boolean

Turn on or off summarization for the search response.

enableSnippetResultSummary

boolean

Turn on or off summary for each snippets result.

configId

string

Output only. Unique obfuscated identifier of a WidgetConfig.

enableQualityFeedback

boolean

Turn on or off collecting the search result quality feedback from end users.

solutionType

enum (SolutionType)

Required. Immutable. Specifies the solution type that this WidgetConfig can be used for.

allowPublicAccess

boolean

Whether allow no-auth integration with widget. If set true, public access to search or other solutions from widget is allowed without authenication token provided by customer hosted backend server.

allowlistedDomains[]

string

Allowlisted domains that can load this widget.

llmEnabled

boolean

Output only. Whether LLM is enabled in the corresponding data store.

enableResultScore

boolean

Whether to show the result score.

UIComponentField

Facet field that maps to a UI Component.

JSON representation
{
  "field": string,
  "deviceVisibility": [
    enum (DeviceVisibility)
  ],
  "displayTemplate": string
}
Fields
field

string

Required. Registered field name. The format is field.abc.

deviceVisibility[]

enum (DeviceVisibility)

The field visibility on different types of devices.

displayTemplate

string

The template to customize how the field is displayed. An example value would be a string that looks like: "Price: {value}".

DeviceVisibility

The visibility of the field on different type of devices.

Enums
DEVICE_VISIBILITY_UNSPECIFIED Default value when not specified. Server returns INVALID_ARGUMENT if used in requests.
MOBILE The UI component is visible on Mobile devices.
DESKTOP The UI component is visible on Browser-based client.

FacetField

Facet fields that store the mapping of fields to end user widget appearance.

JSON representation
{
  "field": string,
  "displayName": string
}
Fields
field

string

Required. Registered field name. The format is field.abc.

displayName

string

Optional. The field name that end users will see.

DataStoreType

The type of the widget's parent data store.

Enums
DATA_STORE_TYPE_UNSPECIFIED Unspecified data store type.
STRUCTURED The parent data store contains a search engine for structured data.
UNSTRUCTURED The parent data store contains a search engine for unstructured data.

SolutionType

The type of solution.

Enums
SOLUTION_TYPE_UNSPECIFIED Default value.
SOLUTION_TYPE_RECOMMENDATION Used for Recommendations AI.
SOLUTION_TYPE_CHAT Used for use cases related to the Generative AI agent.