- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- ChangeRequest
- InvolvedSteps
- Try it!
Full name: projects.locations.instances.legacyPlaybooks.legacyAiUpdate
Updates playbook using AI based on the provided user prompt.
HTTP request
Path parameters
Parameters | |
---|---|
instance |
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 ( |
Fields | |
---|---|
prompt |
Required. The user prompt to generate the playbook. |
playbook |
Optional. The edited playbook. |
hashedUserId |
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 ( |
Fields | |
---|---|
instance |
Required. The instance to generate the playbook for. Format: projects/{project}/locations/{location}/instances/{instance} |
changeRequests[] |
Required. The list of change requests. |
playbook |
Optional. The edited playbook. |
correlationId |
Optional. The correlation id of the request. |
metadata |
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 ( |
Fields | |
---|---|
type |
Required. The type of the change request. |
changeId |
Required. The unique identifier of the change request. |
involvedSteps |
Required. The list of involved steps. |
step |
Optional. The step of the playbook. |
trigger |
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 |
Optional. The step's instance name that we should put our new step after |
conditionBranchIndex |
Optional. If step instance that is the parent of this step is a flow step, which condition index to put it on |
affectedStepInstanceName |
Optional. The affected step instance name, IE the replaced / changed instance name. This depends on the action that is happenning |