Obtaining Service Update Logs
Function
This API is used to obtain the update logs of a real-time service.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/services/{service_id}/logs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
service_id |
Yes |
String |
Service ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
update_time |
No |
Number |
Update time for filtering. This parameter can be used to obtain the update logs of a real-time service. By default, update logs are not filtered. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
service_name |
String |
Service name |
service_id |
String |
Service ID |
logs |
Array of Log objects |
Service update records |
Parameter |
Type |
Description |
---|---|---|
update_time |
Number |
Update time, in milliseconds calculated from 1970.1.1 0:0:0 UTC. |
result |
String |
Update result. Options:
|
config |
Array of config objects |
Model running configurations |
success_num |
Number |
Number of nodes that are successfully operated. This parameter is returned when infer_type is set to edge. |
failed_num |
Number |
Number of nodes that fail to be operated. This parameter is returned when infer_type is set to edge. |
result_detail |
Array of UpdateResult objects |
Operation result details. This parameter is returned when infer_type is set to edge. |
cluster_id |
String |
ID of a dedicated resource pool |
extend_config |
Array of strings |
Personalized configuration |
Parameter |
Type |
Description |
---|---|---|
model_id |
String |
Common parameter. Model ID, which can be obtained by calling the API for obtaining the AI application list. |
model_name |
String |
Model name |
model_version |
String |
Model version |
weight |
Integer |
Weight of traffic allocated to a model. This parameter is mandatory only when infer_type is set to real-time. The sum of all weights must be equal to 100. If multiple model versions are configured with different traffic weights in a real-time service, ModelArts will continuously access the prediction API of the service and forward prediction requests to the model instances of the corresponding versions based on the weights. |
specification |
String |
Resource flavor. This parameter is returned when infer_type is set to real-time or edge. |
custom_spec |
CustomSpec object |
Custom resource specifications |
envs |
Map<String,String> |
Environment variable key-value pair required for running a model |
cluster_id |
String |
ID of a dedicated resource pool |
instance_count |
Integer |
Number of instances where a model is deployed. This parameter is returned when infer_type is set to real-time. |
Parameter |
Type |
Description |
---|---|---|
gpu_p4 |
Float |
Number of GPUs, which can be a decimal. The value cannot be smaller than 0, with the third decimal place is rounded off. This parameter is optional and is not used by default. |
memory |
Integer |
Memory in MB, which must be an integer |
cpu |
Float |
Number of CPU cores, which can be a decimal. The value cannot be smaller than 0.01, with the third decimal place is rounded off. |
ascend_a310 |
Integer |
Number of Ascend chips. This parameter is optional and is not used by default. Either this parameter or gpu is configured. |
Parameter |
Type |
Description |
---|---|---|
result |
Boolean |
Operation result. true indicates that the operation is successful, and false indicates that the operation failed. |
node_name |
String |
Name of an edge node |
operation |
String |
Operation. Options:
|
node_id |
String |
Edge node ID You can obtain the value after creating an edge node on IEF. |
Example Requests
GET https://{endpoint}/v1/{project_id}/services/{service_id}/logs
Example Responses
Status code: 200
Service update logs
{ "service_name" : "mnist", "service_id" : "195c1f2d-136d-40af-a0f3-db5717d2634a", "logs" : [ { "result" : "SUCCESS", "update_time" : 1574770228888, "config" : [ { "model_version" : "0.0.1", "specification" : "modelarts.vm.cpu.2u", "model_name" : "minst", "weight" : 100, "model_id" : "0e07b41b-173e-42db-8c16-8e1b44cc0d44", "instance_count" : 1 } ] } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Service update logs |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot