Method: projects.locations.agents.playbooks.import

Imports the specified playbook to the specified agent from a binary file.

HTTP request

POST https://{endpoint}/v3beta1/{parent=projects/*/locations/*/agents/*}/playbooks:import

Where {endpoint} is one of the supported service endpoints.

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The agent to import the playbook into. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>.

Authorization requires the following IAM permission on the specified resource parent:

  • dialogflow.playbooks.create

Request body

The request body contains data with the following structure:

JSON representation
{
  "importStrategy": {
    object (PlaybookImportStrategy)
  },

  // Union field playbook can be only one of the following:
  "playbookUri": string,
  "playbookContent": string
  // End of list of possible types for union field playbook.
}
Fields
importStrategy

object (PlaybookImportStrategy)

Optional. Specifies the import strategy used when resolving resource conflicts.

Union field playbook. Required. The playbook to import. The Google Cloud Storage URI to import playbook from. The format of this URI must be gs://<bucket-name>/<object-name>.

Dialogflow performs a read operation for the Cloud Storage object on the caller's behalf, so your request authentication must have read permissions for the object. For more information, see playbook can be only one of the following:

playbookUri

string

Dialogflow access control.

playbookContent

string (bytes format)

Uncompressed raw byte content for playbook.

A base64-encoded string.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.

PlaybookImportStrategy

The playbook import strategy used for resource conflict resolution associated with an ImportPlaybookRequest.

JSON representation
{
  "mainPlaybookImportStrategy": enum (ImportStrategy),
  "nestedResourceImportStrategy": enum (ImportStrategy),
  "toolImportStrategy": enum (ImportStrategy)
}
Fields
mainPlaybookImportStrategy

enum (ImportStrategy)

Optional. Specifies the import strategy used when resolving conflicts with the main playbook. If not specified, 'CREATE_NEW' is assumed.

nestedResourceImportStrategy

enum (ImportStrategy)

Optional. Specifies the import strategy used when resolving referenced playbook/flow conflicts. If not specified, 'CREATE_NEW' is assumed.

toolImportStrategy

enum (ImportStrategy)

Optional. Specifies the import strategy used when resolving tool conflicts. If not specified, 'CREATE_NEW' is assumed. This will be applied after the main playbook and nested resource import strategies, meaning if the playbook that references the tool is skipped, the tool will also be skipped.