Skip to main content

versions

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

Overview

Nameversions
TypeResource
Idgoogle.dialogflow.versions

Fields

NameDatatypeDescription
namestringFormat: projects//locations//agents//flows//versions/. Version ID is a self-increasing number generated by Dialogflow upon version creation.
descriptionstringThe description of the version. The maximum length is 500 characters. If exceeded, the request is rejected.
createTimestringOutput only. Create time of the version.
displayNamestringRequired. The human-readable name of the version. Limit of 64 characters.
nluSettingsobjectSettings related to NLU.
statestringOutput only. The state of this version. This field is read-only and cannot be set by create and update methods.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_agents_flows_versions_getSELECTagentsId, flowsId, locationsId, projectsId, versionsIdRetrieves the specified Version.
projects_locations_agents_flows_versions_listSELECTagentsId, flowsId, locationsId, projectsIdReturns the list of all versions in the specified Flow.
projects_locations_agents_flows_versions_createINSERTagentsId, flowsId, locationsId, projectsIdCreates a Version in the specified Flow. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: CreateVersionOperationMetadata - response: Version
projects_locations_agents_flows_versions_deleteDELETEagentsId, flowsId, locationsId, projectsId, versionsIdDeletes the specified Version.
projects_locations_agents_flows_versions_patchUPDATEagentsId, flowsId, locationsId, projectsId, versionsIdUpdates the specified Version.
projects_locations_agents_flows_versions_compare_versionsEXECagentsId, flowsId, locationsId, projectsId, versionsIdCompares the specified base version with target version.
projects_locations_agents_flows_versions_loadEXECagentsId, flowsId, locationsId, projectsId, versionsIdLoads resources in the specified version to the draft flow. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: An empty Struct message - response: An Empty message

SELECT examples

Returns the list of all versions in the specified Flow.

SELECT
name,
description,
createTime,
displayName,
nluSettings,
state
FROM google.dialogflow.versions
WHERE agentsId = '{{ agentsId }}'
AND flowsId = '{{ flowsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new versions resource.

/*+ create */
INSERT INTO google.dialogflow.versions (
agentsId,
flowsId,
locationsId,
projectsId,
name,
displayName,
description
)
SELECT
'{{ agentsId }}',
'{{ flowsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}'
;

UPDATE example

Updates a versions resource.

/*+ update */
UPDATE google.dialogflow.versions
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}'
WHERE
agentsId = '{{ agentsId }}'
AND flowsId = '{{ flowsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND versionsId = '{{ versionsId }}';

DELETE example

Deletes the specified versions resource.

/*+ delete */
DELETE FROM google.dialogflow.versions
WHERE agentsId = '{{ agentsId }}'
AND flowsId = '{{ flowsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND versionsId = '{{ versionsId }}';