Create a schema
POST {{baseUrl}}/apis/{{apiId}}/schemas
Creates a schema for an API. Include the following in the the request body:
- type— A string value that contains the API schema's type. One of:- openapi:3_1
- openapi:3
- openapi:2
- openapi:1
- raml:0_8
- raml:1
- wsdl:1
- wsdl:2
- graphql
- proto:2
- proto:3
- asyncapi:2
 
- files— An array of schema files that contains the following:- path— A string value that contains the schema file's path.
- content— A string value that contains the schema file's stringified contents.
 
Request Body
{"type"=>"{{schemaType}}", "files"=>[{"path"=>"{{filePath1}}", "content"=>"{{content1}}"}, {"path"=>"{{filePath2}}", "content"=>"{{content2}}"}, {"path"=>"{{filePath3}}", "content"=>"{{content3}}"}, {"path"=>"{{filePath4}}", "content"=>"{{content4}}"}]}
HEADERS
| Key | Datatype | Required | Description | 
|---|---|---|---|
| Accept | string | 
RESPONSES
status: Created
{"type":"proto:2","files":[{"path":"index.proto","createdBy":"557089","id":"41a3d7fd-bf9a-4053-b20e-37453962b4d6","createdAt":"2023-03-21T10:10:54.000Z","name":"index.proto","updatedBy":"557089","updatedAt":"2023-03-21T10:10:54.000Z","root":{"enabled":true}}],"createdBy":"557089","createdAt":"2023-03-21T10:10:54.000Z","id":"b4fc1bdc-6587-4f9b-95c9-f768146089b4","updatedBy":"557089","updatedAt":"2023-03-21T10:10:54.000Z"}