- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- GcsSource
- BucketObjectType
- TranscriptObjectConfig
- ConversationConfig
- Try it!
Imports conversations and processes them according to the user's configuration.
HTTP request
POST https://{endpoint}/v1alpha1/{parent=projects/*/locations/*}/conversations:ingest
Where {endpoint}
is one of the supported service endpoints.
The URLs use gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The parent resource for new conversations. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "conversationConfig": { object ( |
Fields | |
---|---|
conversationConfig |
Configuration that applies to all conversations. |
redactionConfig |
Optional. DLP settings for transcript redaction. Optional, will default to the config specified in Settings. |
speechConfig |
Optional. Default Speech-to-Text configuration. Optional, will default to the config specified in Settings. |
Union field source . Configuration for an external data store containing objects that will be converted to conversations. source can be only one of the following: |
|
gcsSource |
A cloud storage bucket source. Note that any previously ingested objects from the source will be skipped to avoid duplication. |
Union field object_config . Configuration for converting individual source objects to conversations. object_config can be only one of the following: |
|
transcriptObjectConfig |
Configuration for when |
sampleSize |
Optional. If set, this fields indicates the number of objects to ingest from the Cloud Storage bucket. If empty, the entire bucket will be ingested. Unless they are first deleted, conversations produced through sampling won't be ingested by subsequent ingest requests. |
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent
resource:
contactcenterinsights.conversations.create
For more information, see the IAM documentation.
GcsSource
Configuration for Cloud Storage bucket sources.
JSON representation |
---|
{
"bucketUri": string,
"bucketObjectType": enum ( |
Fields | |
---|---|
bucketUri |
Required. The Cloud Storage bucket containing source objects. |
bucketObjectType |
Optional. Specifies the type of the objects in |
customMetadataKeys[] |
Optional. Custom keys to extract as conversation labels from metadata files in |
metadataBucketUri |
Optional. The Cloud Storage path to the conversation metadata. Note that: [1] Metadata files are expected to be in JSON format. [2] Metadata and source files (transcripts or audio) must be in separate buckets. [3] A source file and its corresponding metadata file must share the same name to be properly ingested, E.g. |
BucketObjectType
Enums | |
---|---|
BUCKET_OBJECT_TYPE_UNSPECIFIED |
The object type is unspecified and will default to TRANSCRIPT . |
TRANSCRIPT |
The object is a transcript. |
AUDIO |
The object is an audio file. |
TranscriptObjectConfig
Configuration for processing transcript objects.
JSON representation |
---|
{
"medium": enum ( |
Fields | |
---|---|
medium |
Required. The medium transcript objects represent. |
ConversationConfig
Configuration that applies to all conversations.
JSON representation |
---|
{ "agentId": string, "agentChannel": integer, "customerChannel": integer } |
Fields | |
---|---|
agentId |
Optional. An opaque, user-specified string representing a human agent who handled all conversations in the import. Note that this will be overridden if per-conversation metadata is provided through the |
agentChannel |
Optional. Indicates which of the channels, 1 or 2, contains the agent. Note that this must be set for conversations to be properly displayed and analyzed. |
customerChannel |
Optional. Indicates which of the channels, 1 or 2, contains the agent. Note that this must be set for conversations to be properly displayed and analyzed. |