Get Schema

GET {{baseUrl}}

This request uses the Qodex API to retrieve the schema of the API with API ID apiId, version ID apiVersionId, and schema ID schemaId.

The response contains an array with the API schema. This request also sets the environment variable schemaContent to be the API schema, as well as format to the format of the API Schema.

Note that this request requires the Qodex API Key as x-api-key in the request header.

This request also uses the variable baseSchema as part of the request URL to retrieve the schema. The baseSchema allows the switching of this request from a regular GET request (which would use https://api.getQodex.com) to an example generated through the Mock Server (which would use the Mock Server URL).

HEADERS

KeyDatatypeRequiredDescription
X-Api-Keystring
x-mock-response-namestring

RESPONSES

status: OK

{"schema":{"createdBy":"00000000","updatedBy":"00000000","id":"{{schemaId}}","type":"openapi3","language":"json","apiVersion":"{{apiVersionId}}","createdAt":"0000-00-00T00:00:00.000Z","updatedAt":"0000-00-00T00:00:00.000Z","schema":{"sampleSchema":"schemaName"}}}