Skip to main content

experiments

Creates, updates, deletes, gets or lists an experiments resource.

Overview

Nameexperiments
TypeResource
Idgoogle.dialogflow.experiments

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe name of the experiment. Format: projects//locations//agents//environments//experiments/.
createTimestring (google-datetime)Creation time of this experiment.
definitionobjectThe definition of the experiment. (id: GoogleCloudDialogflowCxV3ExperimentDefinition)
descriptionstringThe human-readable description of the experiment.
displayNamestringRequired. The human-readable name of the experiment (unique in an environment). Limit of 64 characters.
endTimestring (google-datetime)End time of this experiment.
experimentLengthstring (google-duration)Maximum number of days to run the experiment/rollout. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days.
lastUpdateTimestring (google-datetime)Last update time of this experiment.
resultobjectInference result of the experiment. (id: GoogleCloudDialogflowCxV3ExperimentResult)
rolloutConfigobjectThe configuration for auto rollout. If set, there should be exactly two variants in the experiment (control variant being the default version of the flow), the traffic allocation for the non-control variant will gradually increase to 100% when conditions are met, and eventually replace the control variant to become the default version of the flow. (id: GoogleCloudDialogflowCxV3RolloutConfig)
rolloutFailureReasonstringThe reason why rollout has failed. Should only be set when state is ROLLOUT_FAILED.
rolloutStateobjectState of the auto rollout process. (id: GoogleCloudDialogflowCxV3RolloutState)
startTimestring (google-datetime)Start time of this experiment.
statestringThe current state of the experiment. Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or RUNNING->DONE.
variantsHistoryarrayThe history of updates to the experiment variants.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_environments_experiments_getselectprojectsId, locationsId, agentsId, environmentsId, experimentsIdRetrieves the specified Experiment.
projects_locations_agents_environments_experiments_listselectprojectsId, locationsId, agentsId, environmentsIdpageSize, pageTokenReturns the list of all experiments in the specified Environment.
projects_locations_agents_environments_experiments_createinsertprojectsId, locationsId, agentsId, environmentsIdCreates an Experiment in the specified Environment.
projects_locations_agents_environments_experiments_patchupdateprojectsId, locationsId, agentsId, environmentsId, experimentsIdupdateMaskUpdates the specified Experiment.
projects_locations_agents_environments_experiments_deletedeleteprojectsId, locationsId, agentsId, environmentsId, experimentsIdDeletes the specified Experiment.
projects_locations_agents_environments_experiments_startexecprojectsId, locationsId, agentsId, environmentsId, experimentsIdStarts the specified Experiment. This rpc only changes the state of experiment from PENDING to RUNNING.
projects_locations_agents_environments_experiments_stopexecprojectsId, locationsId, agentsId, environmentsId, experimentsIdStops the specified Experiment. This rpc only changes the state of experiment from RUNNING to DONE.

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
environmentsIdstring
experimentsIdstring
locationsIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the specified Experiment.

SELECT
name,
createTime,
definition,
description,
displayName,
endTime,
experimentLength,
lastUpdateTime,
result,
rolloutConfig,
rolloutFailureReason,
rolloutState,
startTime,
state,
variantsHistory
FROM google.dialogflow.experiments
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND experimentsId = '{{ experimentsId }}' -- required;

INSERT examples

Creates an Experiment in the specified Environment.

INSERT INTO google.dialogflow.experiments (
data__name,
data__displayName,
data__description,
data__state,
data__definition,
data__rolloutConfig,
data__rolloutState,
data__rolloutFailureReason,
data__result,
data__createTime,
data__startTime,
data__endTime,
data__lastUpdateTime,
data__experimentLength,
data__variantsHistory,
projectsId,
locationsId,
agentsId,
environmentsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ state }}',
'{{ definition }}',
'{{ rolloutConfig }}',
'{{ rolloutState }}',
'{{ rolloutFailureReason }}',
'{{ result }}',
'{{ createTime }}',
'{{ startTime }}',
'{{ endTime }}',
'{{ lastUpdateTime }}',
'{{ experimentLength }}',
'{{ variantsHistory }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ environmentsId }}'
RETURNING
name,
createTime,
definition,
description,
displayName,
endTime,
experimentLength,
lastUpdateTime,
result,
rolloutConfig,
rolloutFailureReason,
rolloutState,
startTime,
state,
variantsHistory
;

UPDATE examples

Updates the specified Experiment.

UPDATE google.dialogflow.experiments
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__state = '{{ state }}',
data__definition = '{{ definition }}',
data__rolloutConfig = '{{ rolloutConfig }}',
data__rolloutState = '{{ rolloutState }}',
data__rolloutFailureReason = '{{ rolloutFailureReason }}',
data__result = '{{ result }}',
data__createTime = '{{ createTime }}',
data__startTime = '{{ startTime }}',
data__endTime = '{{ endTime }}',
data__lastUpdateTime = '{{ lastUpdateTime }}',
data__experimentLength = '{{ experimentLength }}',
data__variantsHistory = '{{ variantsHistory }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND experimentsId = '{{ experimentsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
definition,
description,
displayName,
endTime,
experimentLength,
lastUpdateTime,
result,
rolloutConfig,
rolloutFailureReason,
rolloutState,
startTime,
state,
variantsHistory;

DELETE examples

Deletes the specified Experiment.

DELETE FROM google.dialogflow.experiments
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND experimentsId = '{{ experimentsId }}' --required;

Lifecycle Methods

Starts the specified Experiment. This rpc only changes the state of experiment from PENDING to RUNNING.

EXEC google.dialogflow.experiments.projects_locations_agents_environments_experiments_start 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@environmentsId='{{ environmentsId }}' --required,
@experimentsId='{{ experimentsId }}' --required;