Create Schema

POST {{url}}/apis/{{apiId}}/versions/{{apiVersionId}}/schemas

This call creates a new schema.

Request body should contain a schema object which should atleast have these properties with string values:

  • type: Allowed types are openapi3, openapi2, openapi1, raml and graphql.
  • language : Allowed languages are json and yaml for OpenAPI and RAML schema types. GraphQL schema type accepts only graphql language.
  • schema: Optional. If passed, must be the content of the schema as a string.

Response contains a schema object with all the details related to the created schema, namely, id, language, type etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.

Request Body

{"schema"=>{"language"=>"yaml", "schema"=>"{}", "type"=>"openapi3"}}

HEADERS

KeyDatatypeRequiredDescription
x-api-keystring
Content-Typestring

RESPONSES

status: OK

{"schema":{"id":"e3b3a0b7-34d5-4fc5-83e0-118bd9e8c822","language":"yaml","apiVersion":"ad810c39-df60-434e-a76f-a2192cd8d81f","type":"openapi3","createdBy":"5665","updateBy":"5665","createdAt":"2019-02-12 19:34:49","updatedAt":"2019-02-12 19:34:49"}}