gRPC API

Mix.api provides a protocol buffer (.proto) file, appconfig.proto, which defines the application configuration endpoints.

Once you have transformed the proto files into functions and classes in your programming language using gRPC tools, you can call these endpoints.

For more information, consult the gRPC  and protocol buffer  documentation.

AppConfigs

Application Configuration Service API

Name Request Type Response Type Description
ListAppConfigs ListAppConfigsRequest ListAppConfigsResponse Returns the list of application configurations that correspond to a set of parameters.
DownloadAppConfigArtifacts DownloadAppConfig ArtifactsRequest DownloadAppConfig ArtifactsResponse stream Downloads artifacts.

ListAppConfigsRequest

Request object used by the ListAppConfigs method. It returns the list of application configurations that correspond to a set of parameters. You must pass all of the query parameters.

Field Type Description
namespace string Namespace; for example, jane.smith@company.com.
region_name string Name of the region; for example, Azure East US.
environment_name string Name of the environment; for example, Sandbox.
app_id string ID of the application; for example, NMDPTRIAL_jane_smith_company_com_20191234T1456456374914.

Sample request

{
  "namespace": "jane.smith@company.com",
  "regionName": "Azure East US",
  "environmentName": "Sandbox",
  "appId": "NMDPTRIAL_jane_smith_company_com_20191015S175341374912"
}

ListAppConfigsResponse

Response object used by the ListAppConfigs method. It contains one of more AppConfig objects.

Field Type Description
app_configs AppConfig Repeated. List of corresponding application configurations.

Sample response

  Sample appconfig response  

AppConfig

Object containing a single application configuration.

Field Type Description
app_id string ID of the application.
tag string Context tag associated with this application configuration.
models Model Repeated. List of Mix.asr, Mix.nlu, and Mix.dialog resources available for this app config.
update_time google.protobuf.Timestamp  Time the application configuration was last updated.

DownloadAppConfigArtifactsRequest

Request object used by the DownloadAppConfigArtifacts method. It downloads the artifacts that correspond to a set of parameters. You must pass all of the query parameters.

Field Type Description
namespace string Namespace; for example, jane.smith@company.com.
region_name string Name of the region; for example, Azure East US.
environment_name string Name of the environment; for example, Sandbox.
app_id string ID of the application; for example, NMDPTRIAL_jane_smith_company_com_20191234T1456456374914.
tag string Context tag associated with the application configuration; for example, coffee_app.
language string Language code for the resource; for example, eng-USA.
model_type ModelType Type of resource to download.

Sample request

{
  "namespace": "jane.smith@company.com",
  "regionName": "Azure East US",
  "environmentName": "Sandbox",
  "appId": "NMDPTRIAL_jane_smith_company_com_20191015S175341374912",
  "tag": "CoffeeAppVariable",
  "language": "eng-USA",
  "modelType": "ASR"
}

DownloadAppConfigArtifactsResponse

Object containing the artifact requested.

Field Type Description
chunk bytes Stream of artifact data.

Model

Object specifying a Mix.asr, Mix.nlu, or Mix.dialog resource.

Field Type Description
type ModelType Type of resource.
language string Language code for the resource.
nuance_datapack_version string Nuance Data Pack (NDP) version.
qnlp_datapack_version string Quick NLP/NLU data pack version.
update_time google.protobuf.Timestamp  Time the application configuration was last updated.

ModelType

Type of resource.

Name Number Description
UNDEFINED 0 Undefined.
ASR 1 Mix.asr DLM.
NLU 2 Mix.nlu model.
DIALOG 3 Mix.dialog application.

Scalar Value Types

The data types in the proto files are mapped to equivalent types in the generated client stub files.

Scalar data types
Proto Notes C++ Java Python
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers. If your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers. If your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These encode negative numbers more efficiently than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These encode negative numbers more efficiently than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str