sessions
Creates, updates, deletes, gets or lists a sessions
resource.
Overview
Name | sessions |
Type | Resource |
Id | google.discoveryengine.sessions |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/* |
endTime | string | Output only. The time the session finished. |
startTime | string | Output only. The time the session started. |
state | string | The state of the session. |
turns | array | Turns. |
userPseudoId | string | A unique identifier for tracking users. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_collections_data_stores_sessions_get | SELECT | collectionsId, dataStoresId, locationsId, projectsId, sessionsId | Gets a Session. |
projects_locations_collections_data_stores_sessions_list | SELECT | collectionsId, dataStoresId, locationsId, projectsId | Lists all Sessions by their parent DataStore. |
projects_locations_collections_engines_sessions_get | SELECT | collectionsId, enginesId, locationsId, projectsId, sessionsId | Gets a Session. |
projects_locations_collections_engines_sessions_list | SELECT | collectionsId, enginesId, locationsId, projectsId | Lists all Sessions by their parent DataStore. |
projects_locations_data_stores_sessions_get | SELECT | dataStoresId, locationsId, projectsId, sessionsId | Gets a Session. |
projects_locations_data_stores_sessions_list | SELECT | dataStoresId, locationsId, projectsId | Lists all Sessions by their parent DataStore. |
projects_locations_collections_data_stores_sessions_create | INSERT | collectionsId, dataStoresId, locationsId, projectsId | Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. |
projects_locations_collections_engines_sessions_create | INSERT | collectionsId, enginesId, locationsId, projectsId | Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. |
projects_locations_data_stores_sessions_create | INSERT | dataStoresId, locationsId, projectsId | Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. |
projects_locations_collections_data_stores_sessions_delete | DELETE | collectionsId, dataStoresId, locationsId, projectsId, sessionsId | Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned. |
projects_locations_collections_engines_sessions_delete | DELETE | collectionsId, enginesId, locationsId, projectsId, sessionsId | Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned. |
projects_locations_data_stores_sessions_delete | DELETE | dataStoresId, locationsId, projectsId, sessionsId | Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned. |
projects_locations_collections_data_stores_sessions_patch | UPDATE | collectionsId, dataStoresId, locationsId, projectsId, sessionsId | Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned. |
projects_locations_collections_engines_sessions_patch | UPDATE | collectionsId, enginesId, locationsId, projectsId, sessionsId | Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned. |
projects_locations_data_stores_sessions_patch | UPDATE | dataStoresId, locationsId, projectsId, sessionsId | Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned. |
SELECT
examples
Lists all Sessions by their parent DataStore.
SELECT
name,
endTime,
startTime,
state,
turns,
userPseudoId
FROM google.discoveryengine.sessions
WHERE dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new sessions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.discoveryengine.sessions (
dataStoresId,
locationsId,
projectsId,
name,
state,
userPseudoId,
turns
)
SELECT
'{{ dataStoresId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ state }}',
'{{ userPseudoId }}',
'{{ turns }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: state
value: string
- name: userPseudoId
value: string
- name: turns
value:
- - name: query
value:
- name: text
value: string
- name: queryId
value: string
- name: answer
value: string
- name: startTime
value: string
- name: endTime
value: string
UPDATE
example
Updates a sessions
resource.
/*+ update */
UPDATE google.discoveryengine.sessions
SET
name = '{{ name }}',
state = '{{ state }}',
userPseudoId = '{{ userPseudoId }}',
turns = '{{ turns }}'
WHERE
dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sessionsId = '{{ sessionsId }}';
DELETE
example
Deletes the specified sessions
resource.
/*+ delete */
DELETE FROM google.discoveryengine.sessions
WHERE dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sessionsId = '{{ sessionsId }}';