Method: legacyPlaybooks.legacyAiUpdate

Full name: projects.locations.instances.legacyPlaybooks.legacyAiUpdate

Updates playbook using AI based on the provided user prompt.

HTTP request


Path parameters

Parameters
instance

string

Required. The instance to update the playbook for. Format: projects/{project}/locations/{location}/instances/{instance}

Request body

The request body contains data with the following structure:

JSON representation
{
  "prompt": string,
  "playbook": {
    object (ApiWorkflowDefinitionDataModel)
  },
  "hashedUserId": string
}
Fields
prompt

string

Required. The user prompt to generate the playbook.

playbook

object (ApiWorkflowDefinitionDataModel)

Optional. The edited playbook.

hashedUserId

string

Optional. A hashed identifier of the user initiating the playbook generation request.

Response body

LegacyPlaybookAiUpdateResponse is a response for editing a playbook with Gemini.

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

JSON representation
{
  "instance": string,
  "changeRequests": [
    {
      object (ChangeRequest)
    }
  ],
  "playbook": {
    object (ApiWorkflowDefinitionDataModel)
  },
  "correlationId": string,
  "metadata": {
    object (PlaybooksAiServiceGenerationResponseMetadata)
  }
}
Fields
instance

string

Required. The instance to generate the playbook for. Format: projects/{project}/locations/{location}/instances/{instance}

changeRequests[]

object (ChangeRequest)

Required. The list of change requests.

playbook

object (ApiWorkflowDefinitionDataModel)

Optional. The edited playbook.

correlationId

string

Optional. The correlation id of the request.

metadata

object (PlaybooksAiServiceGenerationResponseMetadata)

Optional. Metadata for the response.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

ChangeRequest

Represents a change request.

JSON representation
{
  "type": string,
  "changeId": string,
  "involvedSteps": {
    object (InvolvedSteps)
  },
  "step": {
    object (ApiWorkflowStepDataModel)
  },
  "trigger": {
    object (ApiWorkflowTriggerDataModel)
  }
}
Fields
type

string

Required. The type of the change request.

changeId

string

Required. The unique identifier of the change request.

involvedSteps

object (InvolvedSteps)

Required. The list of involved steps.

step

object (ApiWorkflowStepDataModel)

Optional. The step of the playbook.

trigger

object (ApiWorkflowTriggerDataModel)

Optional. The trigger of the playbook.

InvolvedSteps

Represents the involved steps in a change request.

JSON representation
{
  "afterStepInstance": string,
  "conditionBranchIndex": string,
  "affectedStepInstanceName": string
}
Fields
afterStepInstance

string

Optional. The step's instance name that we should put our new step after

conditionBranchIndex

string

Optional. If step instance that is the parent of this step is a flow step, which condition index to put it on

affectedStepInstanceName

string

Optional. The affected step instance name, IE the replaced / changed instance name. This depends on the action that is happenning