Help Center> ServiceStage> API Reference> CSE API> Schema> Querying All Schema Information About a Microservice

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

Table 1 Path parameters

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: ^.*$

Table 2 Query parameters

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

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

x-domain-name

Yes

String

Tenant account name.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

schemas

Array of Schema objects

Schema list.

Table 5 Schema

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

Table 6 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Error information.

detail

String

Location details.

Status code: 500

Table 7 Response body parameters

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.