Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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
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
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
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
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
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
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
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ ServiceStage/ API Reference/ ServiceComb APIs/ Microservice/ Querying Information About a Microservice

Querying Information About a Microservice

Updated on 2024-12-16 GMT+08:00

Function

This API is used to query the definition information about a microservice based on service_id.

Restrictions

None

URI

GET /v4/{project_id}/registry/microservices/{service_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

  • For a professional microservice engine, enter the tenant project ID. The value contains 1 to 64 characters. See Obtaining a Project ID. You can also enter the fixed value default.
  • For an exclusive microservice engine, enter the fixed value default.

service_id

Yes

String

Microservice ID, which must be unique. The value contains 1 to 64 characters. Regular expression: ^.*$. See Querying Information About All Microservices.

Request

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

Authorization

No

String

This parameter is mandatory if security authentication is enabled for an exclusive microservice engine. Otherwise, this parameter is not required.

The token of an exclusive microservice engine with security authentication enabled is in the following format:

Authorization:Bearer {Token}

For details about how to obtain the token, see Obtaining the User Token of an Exclusive Microservice Engine.

Response

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

service

MicroService object

Microservice information.

Table 4 MicroService

Parameter

Type

Description

serviceId

String

Microservice ID, which must be unique. The value contains 1 to 64 characters. Regular expression: ^.*$

environment

String

Microservice environment. Value: development, testing, acceptance, or production.

appId

String

Application ID, which must be unique. The value contains 1 to 160 characters. Regular expression: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9_-.][a-zA-Z0-9]$

serviceName

String

Microservice name, which must be unique in an application. The value contains 1 to 128 characters. Regular expression: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9_-.][a-zA-Z0-9]$

version

String

Microservice version. The value contains 1 to 64 characters. Regular expression: ^[0-9]$|^[0-9]+(.[0-9]+)$

description

String

Microservice description. The value contains a maximum of 256 characters.

level

String

Microservice level. Value: FRONT, MIDDLE, or BACK.

registerBy

String

Microservice registration mode. Value: SDK, PLATFORM, SIDECAR, or UNKNOWN.

schemas

Array of strings

Microservice schema content. The value must be 1 to 160 bytes long. Only digits, letters, underscores (_), hyphens (-), and periods (.) are allowed. An array contains a maximum of 100 schemas.

status

String

Microservice status. Value: UP or DOWN. Default value: UP.

Value:

  • UP
  • DOWN

timestamp

String

Microservice registration time.

modTimestamp

String

Latest modification time (UTC).

framework

Framework object

Development framework.

paths

Array of ServicePath objects

Service path.

Table 5 Framework

Parameter

Type

Description

name

String

Microservice development framework. Default value: UNKNOWN.

version

String

Version of the microservice development framework.

Table 6 ServicePath

Parameter

Type

Description

Path

String

Route address.

Property

Object

Extended attribute. You can customize a key and value. The value must be at least 1 byte long.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Error message.

detail

String

Location details.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Error message.

detail

String

Location details.

Example Request

Query details about the microservice whose ID is 819706e21b7173306797d19922ce4231441c17c5.

GET https://{endpoint}/v4/{project_id}/registry/microservices/819706e21b7173306797d19922ce4231441c17c5

Example Response

Status code: 200

Successfully queried.

{
    "service": {
        "serviceId": "819706e21b7173306797d19922ce4231441c17c5",
        "appId": "default",
        "serviceName": "SERVICECENTER",
        "version": "2.4.8",
        "level": "BACK",
        "schemas": [
            "servicecenter.grpc.api.ServiceCtrl",
            "servicecenter.grpc.api.ServiceInstanceCtrl"
        ],
        "status": "UP",
        "timestamp": "1616426688",
        "modTimestamp": "1616426688",
        "environment": "development"
    }
}

Status Code

Status Code

Description

200

OK

400

Bad Request

500

Internal Server Error

Error Code

See ServiceComb Error Codes.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback