Querying a Microservice Schema
Function
This API is used to query a microservice schema based on the service ID and schema ID.
URI
GET /v4/{project_id}/registry/microservices/{serviceId}/schemas/{schemaId}
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Fixed value: default. |
serviceId |
String |
Yes |
Microservice ID, which must be unique. The value must be 1 to 64 characters long. Regular expression: ^.*$ |
schemaId |
String |
Yes |
Schema ID. |
Request
None
Example
Example request
GET /v4/default/registry/microservices/e0f0da073f2c91e8979a89ff2d7c69t6/schemas/com.test.TestService
Example response
{"schema": "---\nswagger: \"2.0\"\ninfo:\n version: \"1.0.0\"\n title: \"swagger definition for com.service.provider.controller.ProviderImpl\"\n x-java-interface: \"cse.gen.springmvc.provider.provider.ProviderImplIntf\"\nbasePath: \"/provider\"\nconsumes:\n- \"application/json\"\nproduces:\n- \"application/json\"\npaths:\n /helloworld:\n get:\n operationId: \"helloworld\"\n produces:\n - \"application/json\"\n parameters:\n - name: \"name\"\n in: \"query\"\n required: true\n type: \"string\"\n responses:\n 200:\n description: \"response of 200\"\n schema:\n type: \"string\"\n"}
Status Code
See Status Codes.
Error Code
See CSE Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot