OPTIONS and HEAD requests are supported, both of which can use the functions supported by the Flask framework by default.
1 | GET /v2 |
1 | GET /v2/ |
Parameter |
Description |
Data Type |
|---|---|---|
serverName |
Inference service name |
String |
1 | {'errorCode': 0, 'errorMsg': 'Succeeded!', 'isSuccess': true, 'outputs': [{'server_name': 'StreamServer'}]} |
1 | GET /v2/live |
1 | GET /v2/live/ |
Parameter |
Description |
Data Type |
|---|---|---|
isLive |
Indicates whether the inference service is running. |
Boolean |
1 | {'errorCode': 0, 'errorMsg': 'Succeeded!', 'isSuccess': true, 'outputs': [{'isLive': True}]} |
GET /v2/ready
GET /v2/ready/
Parameter |
Description |
Data Type |
|---|---|---|
isReady |
Indicates whether the inference server is ready to accept inference requests. |
Boolean |
GET v2/streams/${STREAM_NAME}/ready
Parameter |
Description |
Data Type |
|---|---|---|
isReady |
Indicates whether a model or stream is ready to accept inference requests. |
Boolean |
1 | {'errorCode': 0, 'errorMsg': 'Succeeded!', 'isSuccess': true, 'outputs': [{'isReady': True}]} |
${MODEL_NAME} and ${STREAM_NAME} must be character strings, which consist of letters, digits, and special characters (+-_).
GET v2/streams/${STREAM_NAME}/config
Parameter |
Description |
Data Type |
|---|---|---|
streamsConfig/modelsConfig |
Inference configuration of a model or stream |
JSON string |
1 | {'errorCode': 0, 'errorMsg': 'Succeeded!', 'isSuccess': true, 'outputs': [{'ModelSample': {'deviceId': 1, 'dynamicBatching': {'dynamicStrategy': 'Nearest', 'preferredBatchSize': [1, 2, 4, 8], 'singleBatchInfer': 0, 'waitingTime': 100}, 'inferType': 'models', 'inputs': [{'dataType': 'UINT8', 'format': 'FORMAT_NHWC', 'id': 0, 'name': 'Placeholder', 'shape': [-1, 224, 224, 3]}], 'name': 'resnet50', 'outputs': [{'dataType': 'FLOAT32', 'format': 'FORMAT_NONE', 'id': 0, 'name': 'fp32_vars/dense/BiasAdd:0', 'shape': [-1, 1001]}], 'timeoutMs': 3000}}]} |
${MODEL_NAME} and ${STREAM_NAME} must be character strings, which consist of letters, digits, and special characters (+-_).