Skip to main content

versions

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

Overview

Nameversions
TypeResource
Idgoogle.dialogflow.versions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringFormat: projects//locations//agents//flows//versions/. Version ID is a self-increasing number generated by Dialogflow upon version creation.
createTimestring (google-datetime)Output only. Create time of the version.
descriptionstringThe description of the version. The maximum length is 500 characters. If exceeded, the request is rejected.
displayNamestringRequired. The human-readable name of the version. Limit of 64 characters.
nluSettingsobjectOutput only. The NLU settings of the flow at version creation. (id: GoogleCloudDialogflowCxV3NluSettings)
statestringOutput only. The state of this version. This field is read-only and cannot be set by create and update methods.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_flows_versions_getselectprojectsId, locationsId, agentsId, flowsId, versionsIdRetrieves the specified Version.
projects_locations_agents_playbooks_versions_getselectprojectsId, locationsId, agentsId, playbooksId, versionsIdRetrieves the specified version of the Playbook.
projects_locations_agents_tools_versions_getselectprojectsId, locationsId, agentsId, toolsId, versionsIdRetrieves the specified version of the Tool.
projects_locations_agents_flows_versions_listselectprojectsId, locationsId, agentsId, flowsIdpageSize, pageTokenReturns the list of all versions in the specified Flow.
projects_locations_agents_playbooks_versions_listselectprojectsId, locationsId, agentsId, playbooksIdpageSize, pageTokenLists versions for the specified Playbook.
projects_locations_agents_tools_versions_listselectprojectsId, locationsId, agentsId, toolsIdpageSize, pageTokenList versions of the specified Tool.
projects_locations_agents_flows_versions_createinsertprojectsId, locationsId, agentsId, flowsIdCreates 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_playbooks_versions_createinsertprojectsId, locationsId, agentsId, playbooksIdCreates a version for the specified Playbook.
projects_locations_agents_tools_versions_createinsertprojectsId, locationsId, agentsId, toolsIdCreates a version for the specified Tool.
projects_locations_agents_flows_versions_patchupdateprojectsId, locationsId, agentsId, flowsId, versionsIdupdateMaskUpdates the specified Version.
projects_locations_agents_flows_versions_deletedeleteprojectsId, locationsId, agentsId, flowsId, versionsIdDeletes the specified Version.
projects_locations_agents_playbooks_versions_deletedeleteprojectsId, locationsId, agentsId, playbooksId, versionsIdDeletes the specified version of the Playbook.
projects_locations_agents_tools_versions_deletedeleteprojectsId, locationsId, agentsId, toolsId, versionsIdforceDeletes the specified version of the Tool.
projects_locations_agents_flows_versions_loadexecprojectsId, locationsId, agentsId, flowsId, 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
projects_locations_agents_flows_versions_compare_versionsexecprojectsId, locationsId, agentsId, flowsId, versionsIdCompares the specified base version with target version.
projects_locations_agents_playbooks_versions_restoreexecprojectsId, locationsId, agentsId, playbooksId, versionsIdRetrieves the specified version of the Playbook and stores it as the current playbook draft, returning the playbook with resources updated.
projects_locations_agents_tools_versions_restoreexecprojectsId, locationsId, agentsId, toolsId, versionsIdRetrieves the specified version of the Tool and stores it as the current tool draft, returning the tool with resources updated.

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.

NameDatatypeDescription
agentsIdstring
flowsIdstring
locationsIdstring
playbooksIdstring
projectsIdstring
toolsIdstring
versionsIdstring
forceboolean
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the specified Version.

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

INSERT examples

Creates 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

INSERT INTO google.dialogflow.versions (
data__name,
data__displayName,
data__description,
projectsId,
locationsId,
agentsId,
flowsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ flowsId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the specified Version.

UPDATE google.dialogflow.versions
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND flowsId = '{{ flowsId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
description,
displayName,
nluSettings,
state;

DELETE examples

Deletes the specified Version.

DELETE FROM google.dialogflow.versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND flowsId = '{{ flowsId }}' --required
AND versionsId = '{{ versionsId }}' --required;

Lifecycle Methods

Loads 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

EXEC google.dialogflow.versions.projects_locations_agents_flows_versions_load 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@flowsId='{{ flowsId }}' --required,
@versionsId='{{ versionsId }}' --required
@@json=
'{
"allowOverrideAgentResources": {{ allowOverrideAgentResources }}
}';