Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Cloud Transformation
Well-Architected Framework
Cloud Adoption Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ ModelArts/ API Reference/ Service Management/ Obtaining Service Update Logs

Obtaining Service Update Logs

Updated on 2025-03-14 GMT+08:00

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

Table 1 Path Parameters

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

Table 2 Query Parameters

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

Table 3 Request header 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

Table 4 Response body parameters

Parameter

Type

Description

service_name

String

Service name

service_id

String

Service ID

logs

Array of Log objects

Service update records

Table 5 Log

Parameter

Type

Description

update_time

Number

Update time, in milliseconds calculated from 1970.1.1 0:0:0 UTC.

result

String

Update result. Options:

  • SUCCESS

  • FAIL

  • RUNNING

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

Table 6 ServiceLogConfig

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.

Table 7 CustomSpec

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.

Table 8 ModelAdditionalProperties

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.

Table 9 LogVolume

Parameter

Type

Description

host_path

String

Log path to be mapped on the host

mount_path

String

Path to the logs in the container

Table 10 PersistentVolumes

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.

Table 11 UpdateResult

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:

  • deploy

  • delete

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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback