- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- ImportOption
- FlowImportStrategy
- ImportStrategy
- Try it!
Imports the specified flow to the specified agent from a binary file.
This method is a long-running operation. The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
:ImportFlowResponse
Note: You should always train a flow prior to sending it queries. See the training documentation.
HTTP request
POST https://{endpoint}/v3/{parent=projects/*/locations/*/agents/*}/flows:import
Where {endpoint}
is one of the supported service endpoints.
The URLs use gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The agent to import the flow into. Format: Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "importOption": enum ( |
Fields | |
---|---|
import |
Flow import mode. If not specified, |
flow |
Optional. Specifies the import strategy used when resolving resource conflicts. |
Union field flow . Required. The flow to import. flow can be only one of the following: |
|
flow |
The Google Cloud Storage URI to import flow from. The format of this URI must be 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 Dialogflow access control. |
flow |
Uncompressed raw byte content for flow. 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.
ImportOption
Import option.
Enums | |
---|---|
IMPORT_OPTION_UNSPECIFIED |
Unspecified. Treated as KEEP . |
KEEP |
Always respect settings in exported flow content. It may cause a import failure if some settings (e.g. custom NLU) are not supported in the agent to import into. |
FALLBACK |
Fallback to default settings if some settings are not supported in the agent to import into. E.g. Standard NLU will be used if custom NLU is not available. |
FlowImportStrategy
The flow import strategy used for resource conflict resolution associated with an ImportFlowRequest
.
JSON representation |
---|
{
"globalImportStrategy": enum ( |
Fields | |
---|---|
global |
Optional. Import strategy for resource conflict resolution, applied globally throughout the flow. It will be applied for all display name conflicts in the imported content. If not specified, 'CREATE_NEW' is assumed. |
ImportStrategy
Import strategies for the conflict resolution of resources (i.e. intents, entities, and webhooks) with identical display names during import operations.
Enums | |
---|---|
IMPORT_STRATEGY_UNSPECIFIED |
Unspecified. Treated as 'CREATE_NEW'. |
IMPORT_STRATEGY_CREATE_NEW |
Create a new resource with a numeric suffix appended to the end of the existing display name. |
IMPORT_STRATEGY_REPLACE |
Replace existing resource with incoming resource in the content to be imported. |
IMPORT_STRATEGY_KEEP |
Keep existing resource and discard incoming resource in the content to be imported. |
IMPORT_STRATEGY_MERGE |
Combine existing and incoming resources when a conflict is encountered. |
IMPORT_STRATEGY_THROW_ERROR |
Throw error if a conflict is encountered. |