Querying the Service Details
Function
This API is used to query the inference service details.
URI
GET /v1/{project_id}/infer-services/{service_id}
Table 1 describes the URI parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which is used for resource isolation. For details about how to obtain the project ID, see Obtaining a Project ID. |
| service_id | Yes | String | Service ID |
Request
N/A
Response
Table 2 describes the response parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| is_success | Yes | Boolean | Whether the request is successful |
| service | Yes | Object | Details of the returned service. For details, see Table 3. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| service_id | Yes | String | Service ID |
| service_name | Yes | String | Service name |
| description | No | String | Service description |
| infer_type | Yes | String | Service type. The value real-time indicates the real-time service. |
| status | Yes | String | Service status. The value can be deploying, running, stopped, or concerning. |
| is_shared | Yes | Boolean | Whether a service is shared |
| access_address | Yes | String | URL of an inference API |
| invocation_times | Yes | String | Total service invoking times |
| failed_times | Yes | String | Total failed service invoking times |
| publish_time | Yes | Long | Time when a service is launched |
| flows | Yes | List | Service flow |
| update_time | Yes | Long | Time when a service is updated |
Example
- Example of a successful response
{ "is_success": true, "service": { "project_id": "64d9185d3de546a7a9457fb4bb885bcb", "service_id": "84746641-9af3-4fa6-b6ed-850e1f63416c", "service_name": "res-model-vpc2", "description": "test cusom image", "infer_type": "real-time", "is_shared": false, "access_address": "https://8f7abc92ae1347e99d5f90d170ea2799.apigw.southchina.huaweicloud.com/v1/infers/84746641-9af3-4fa6-b6ed-850e1f63416c", "invocation_times": "0", "failed_times": "0", "flows": [ { "name": "flow_2", "flow_id": "cb8180177f5d4f29a6c75386c8e38090", "ratio": 0, "rules": [ { "candidate_uuid": "d87b308e4d3c4e1ea8f0f1756fb8c11e", "candidate": { "job_id": "acd1e21d19084d8c8c4631c3b6fe2910", "job_name": "Recall--A01", "operating_time": 1547863270717, "candidate_desc": "[ItemCF Recommendation] User-item list candidate sets generated by the ItemCF algorithm" "task_type": "Retrieval strategy", "strategy_type": "recall", "algo_type": "ItemCF", "candidate_uuid": "d87b308e4d3c4e1ea8f0f1756fb8c11e", "job_status": "SUCCEEDED", "projectId": "b09d59c4e8724078a5e8efa65049e78f", "batch_id": "0584b2a3-5425-41c7-8780-5607a95821d2" }, "rule_ratio": 100, "priority": "1" } ], "config": { "model_id": "2d34985d-54e8-456e-9418-ef359e529d89", "model": { "model_id": "2d34985d-54e8-456e-9418-ef359e529d89", "project_id": "b09d59c4e8724078a5e8efa65049e78f", "model_name": "infer-service", "model_version": "1.0.9", "image_name": "res-modelarts", "image_version": "3.0.0", "model_type": "Image", "description": "RES infer model", "create_time": 1547866391668 }, "weight": 100, "specification": "c2.m8.g0", "instance_count": 1, "envs": { "ONLINE_CONFIG": "<Path for storing the online configuration files>" } } } ], "publish_time": 1547866687137, "update_time": 1547866687137 } } - Example of a failed response
{ "is_success": false, "error_code": "res.2301", "error_msg": "Failed to resolve the token from the request." }
Status Code
For details about status codes, see Status Codes.
Last Article: Querying the Service Lists
Next Article: Subscribing to Services
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.