Querying the Unique Service or Schema ID of a Microservice
Function
This API is used to query the unique service or schema ID of a microservice based on filter criteria.
URI
GET /v4/{project_id}/registry/existence
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Unique ID of a tenant sub-project. Length: 1–64 characters. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Resource type. Value: microservice or schema. |
| env | No | String | Microservice environment. Value: development, testing, acceptance, or production. Default: development |
| appId | Yes | String | When the resource type is set to microservice, the unique application ID needs to be transferred. Length: 1–160 characters. Regular expression: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9_-.][a-zA-Z0-9]$ |
| serviceName | Yes | String | When the resource type is set to microservice, the microservice name needs to be transferred. Length: 1–128 characters. Regular expression: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9_-.][a-zA-Z0-9]$ |
| version | Yes | String | When the resource type is set to microservice, the microservice version needs to be transferred. Length: 1–64 characters. Regular expression: ^[0-9]$|^[0-9]+(.[0-9]+)$ |
| service_id | Yes | String | When the resource type is set to schema, the unique microservice ID needs to be transferred. Length: 1–64 characters. Regular expression: ^.*$ |
| schema_id | Yes | String | When the resource type is set to schema, the unique schema ID needs to be transferred. Length: 1–160 characters. Regular expression: ^[a-zA-Z0-9]{1,160}$|^[a-zA-Z0-9][a-zA-Z0-9_-.]{0,158}[a-zA-Z0-9]$ |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| x-domain-name | Yes | String | Tenant account name. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| X-Schema-Summary | String | Schema summary. |
| Parameter | Type | Description |
|---|---|---|
| serviceId | String | When a service is queried, a service ID is returned. |
| schemaId | String | When a schema is queried, a schema ID is returned. |
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/existence Example Responses
Status code: 200
OK (The service or schema ID is returned.)
"{\n \"serviceId\": \"string\",\n \"schemaId\": \"string\"\n}" Status Codes
| Status Code | Description |
|---|---|
| 200 | OK (The service or schema ID is returned.) |
| 400 | Bad Request |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
Last Article: Modifying Extended Attribute Information About a Microservice
Next Article: Schema
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.