Method: projects.locations.agents.entityTypes.import

Imports the specified entitytypes into the agent.

HTTP request

POST https://{endpoint}/v3/{parent=projects/*/locations/*/agents/*}/entityTypes: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 entity types into. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>.

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

  • dialogflow.entityTypes.create

Request body

The request body contains data with the following structure:

JSON representation
{
  "mergeOption": enum (MergeOption),
  "targetEntityType": string,

  // Union field entity_types can be only one of the following:
  "entityTypesUri": string,
  "entityTypesContent": {
    object (InlineSource)
  }
  // End of list of possible types for union field entity_types.
}
Fields
mergeOption

enum (MergeOption)

Required. Merge option for importing entity types.

targetEntityType

string

Optional. The target entity type to import into. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/entityTypes/<EntityTypeID>. If set, there should be only one entity type included in [entityTypes][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], of which the type should match the type of the target entity type. All entities in the imported entity type will be added to the target entity type.

Union field entity_types. Required. The entity types to import. entity_types can be only one of the following:
entityTypesUri

string

The Google Cloud Storage URI to import entity types 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 Dialogflow access control.

entityTypesContent

object (InlineSource)

Uncompressed byte content of entity types.

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.

MergeOption

Merge option when display name conflicts exist during import.

Enums
MERGE_OPTION_UNSPECIFIED Unspecified. If used, system uses REPORT_CONFLICT as default.
REPLACE Replace the original entity type in the agent with the new entity type when display name conflicts exist.
MERGE Merge the original entity type with the new entity type when display name conflicts exist.
RENAME Create new entity types with new display names to differentiate them from the existing entity types when display name conflicts exist.
REPORT_CONFLICT Report conflict information if display names conflict is detected. Otherwise, import entity types.
KEEP Keep the original entity type and discard the conflicting new entity type when display name conflicts exist.