Querying Information About Microservices
Function
This API is used to query information about microservices that meet filter criteria.
Constraints
None
URI
GET /v4/{project_id}/registry/microservices
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Unique ID of a tenant sub-project. Length: 1–64 characters. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| x-domain-name | Yes | String | Tenant account name. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| services | Array of MicroService objects | Microservice list. |
| Parameter | Type | Description |
|---|---|---|
| serviceId | String | Microservice ID, which must be unique. Length: 1–64 characters. Regular expression: ^.*$ |
| environment | String | Service stage. Value: development, testing, acceptance, or production. Only when the value is development, testing, or acceptance, you can add new schemas or modify existing schemas in batches. Default value: development. |
| appId | String | Application ID, which must be unique. Length: 1–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. Length: 1–128 characters. Regular expression: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9_-.][a-zA-Z0-9]$ |
| version | String | Microservice version. Length: 1–64 characters. Regular expression: ^[0-9]$|^[0-9]+(.[0-9]+)$ |
| description | String | Microservice description. Length: 0–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 Schema objects | 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 (default) or DOWN. Enumeration values:
|
| timestamp | String | Microservice registration time. |
| modTimestamp | String | Latest modification time (UTC). |
| framework | Framework object | Development framework information. |
| paths | Array of ServicePath objects | Service route information. |
| Parameter | Type | Description |
|---|---|---|
| schemaId | String | Microservice schema ID. The value must be 1 to 160 bytes long. Only digits, letters, underscores (_), hyphens (-), and periods (.) are allowed. |
| schema | String | Microservice schema content. The value must be 1 to 2048 bytes long. Any characters are allowed. |
| summary | String | Microservice schema summary. The value contains a maximum of 128 bytes. Only digits and letters are allowed. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Microservice development framework. Default value: UNKNOWN. |
| version | String | Microservice development framework version. |
| Parameter | Type | Description |
|---|---|---|
| Path | String | Route address. |
| Property | Object | Extended attribute. You can customize a key and value. The value contains at least 1 byte. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code. |
| errorMessage | String | Error information. |
| detail | String | Location details. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code. |
| errorMessage | String | Error information. |
| detail | String | Location details. |
Example Requests
GET https://{endpoint}/v4/{project_id}/registry/microservices Example Responses
Status code: 200
OK
"{\n \"services\": [\n {\n \"serviceId\": \"string\",\n \"environment\": \"string\",\n \"appId\": \"string\",\n \"serviceName\": \"string\",\n \"version\": \"string\",\n \"description\": \"string\",\n \"level\": \"string\",\n \"registerBy\": \"string\",\n \"schemas\": [\n {\n \"schemaId\": \"string\",\n \"schema\": \"string\",\n \"summary\": \"string\"\n }\n ],\n \"status\": \"UP\",\n \"timestamp\": \"string\",\n \"modTimestamp\": \"string\",\n \"framework\": {\n \"name\": \"string\",\n \"version\": \"string\"\n },\n \"paths\": [\n {\n \"Path\": \"string\"\n }\n ]\n }\n ]\n}" Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
Last Article: Deleting Definition and Related Information About a Microservice
Next Article: Creating Static Information for a Microservice
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.