Querying All Schema Information About a Microservice
Function
This API is used to query all schema information (including schema_id and summary) about a microservice.
URI
GET /v4/{project_id}/registry/microservices/{service_id}/schemas
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Unique ID of a tenant sub-project. Length: 1–64 characters. |
| service_id | Yes | String | Microservice ID, which must be unique. Length: 1–64 characters. Regular expression: ^.*$ |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| withSchema | No | Integer | Whether to display schema. 0: Only schema_id and summary are displayed. 1: schema_id, summary, and schema are displayed. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| x-domain-name | Yes | String | Tenant account name. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| schemas | Array of Schema objects | Schema list. |
| 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. |
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 /v4/{project_id}/registry/microservices/{service_id}/schemas Example Responses
Status code: 200
OK
"{\n \"schemas\": [\n {\n \"schemaId\": \"string\",\n \"schema\": \"string\",\n \"summary\": \"string\"\n }\n ]\n}" Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
Last Article: Modifying a Microservice Schema
Next Article: Microservice Instance
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.