Method: projects.locations.agents.testCases.import

Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test cases and won't overwite any existing ones. The provided ID in the imported test case is neglected.

HTTP request

POST https://dialogflow.googleapis.com/v3beta1/{parent=projects/*/locations/*/agents/*}/testCases:import

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The agent to import test cases to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.

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

  • dialogflow.testcases.import

Request body

The request body contains data with the following structure:

JSON representation
{

  // Union field source can be only one of the following:
  "gcsUri": string,
  "content": string
  // End of list of possible types for union field source.
}
Fields
Union field source. Required. The source to import. source can be only one of the following:
gcsUri

string

The Google Cloud Storage URI to import test cases from. The format of this URI must be gs://<bucket-name>/<object-name>.

content

string (bytes format)

Uncompressed raw byte content for test cases.

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.