Help Center> ServiceStage> API Reference (Kuala Lumpur Region)> CSE API> Querying the Unique Service or Schema ID of a Microservice
Updated on 2023-06-26 GMT+08:00

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

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Fixed value: default.

Table 2 Query parameters

Parameter

Type

Mandatory

Description

type

String

Yes

Request type. Options:

  • microservice
  • schema

env

String

No

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

appId

String

Yes

Application ID, which needs to be transferred when the resource type is microservice.

The value must be 1 to 160 characters long.

Regular expression: ^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$

serviceName

String

Yes

Microservice name, which needs to be transferred when the resource type is microservice.

The value must be 1 to 128 characters long.

Regular expression: ^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$

version

String

Yes

Microservice version, which needs to be transferred when the resource type is microservice.

The value must be 1 to 64 characters long.

Regular expression: ^[0-9]*$|^[0-9]+(\.[0-9]+)*$

serviceId

String

Yes

Microservice ID, which needs to be transferred when the resource type is schema.

The value must be 1 to 64 characters long.

Regular expression: ^.*$

schemaId

String

Yes

Schema ID, which needs to be transferred when the resource type is schema. The value must be 1 to 160 characters long.

Regular expression: ^[a-zA-Z0-9]{1,160}$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]{0,158}[a-zA-Z0-9]$

Request

None

Response

Response parameters

Table 3 describes the parameters.

Table 3 Parameters

Parameter

Type

Description

serviceId

String

Unique microservice ID, which is returned when a microservice is queried.

schemaId

String

Unique schema ID, which is returned when a schema is queried.

Example

Example request

GET /v4/default/registry/existence

Example response

{
  "serviceId": "string"
}

Status Code

See Status Codes.

Error Code

See CSE Error Codes.