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 ServiceLogConfig 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 parameters Model ID You can obtain the value by calling the API for querying the AI application list. |
model_name |
String |
Model name |
model_version |
String |
Model version |
weight |
Integer |
This parameter is mandatory for the real-time type. Traffic weight allocated to the model. This parameter is mandatory only when infer_type is set to real-time. The sum of multiple weights must be 100. When multiple model versions are configured in a real-time service and different traffic weight ratios are set, ModelArts forwards prediction requests to the corresponding model version instance based on the weight ratio when the prediction API of the service is continuously accessed. |
specification |
String |
Resource specifications. 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 deployed in a model. This parameter is returned when infer_type is set to real-time. |
additional_properties |
Map<String,ModelAdditionalProperties> |
Additional properties for model deployment, facilitating service instance management. |
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 |
---|---|---|
log_volume |
Array of LogVolume objects |
Host directory mounting. This parameter takes effect only if a dedicated resource pool is used. If a public resource pool is used to deploy services, this parameter cannot be configured. Otherwise, an error will occur. |
max_surge |
Float |
The value must be greater than 0. If this parameter is not set, the default value 1 is used. If the value is less than 1, it indicates the percentage of instances to be added during the rolling upgrade. If the value is greater than 1, it indicates the maximum number of instances to be added during the rolling upgrade. |
max_unavailable |
Float |
The value must be greater than 0. If this parameter is not set, the default value 0 is used. If the value is less than 1, it indicates the percentage of instances that can be scaled in during the rolling upgrade. If the value is greater than 1, it indicates the number of instances that can be scaled in during the rolling upgrade. |
termination_grace_period_seconds |
Integer |
Graceful stop period of a container. |
persistent_volumes |
Array of PersistentVolumes objects |
Persistent storage mounting. |
dew_secret |
DewSecret object |
DEW secret. |
Parameter |
Type |
Description |
---|---|---|
host_path |
String |
Log path to be mapped on the host |
mount_path |
String |
Path to the logs in the container |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Volume name. |
mount_path |
String |
Mount path of a volume in the container. Example: /tmp. The container path must not be a system directory, such as / and /var/run. Otherwise, an exception occurs. It is a good practice to mount the container to an empty directory. If the directory is not empty, ensure that there are no files affecting container startup in the directory. Otherwise, such files will be replaced, resulting in failures to start the container and create the workload. |
storage_type |
String |
Mount type: sfs_turbo. |
source_address |
String |
Specifies the mounting source path. The value is the SFS Turbo ID when an EFS file is mounted. |
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