Import external API specification
POST https://api.getpostman.com/import/{{importType}}
This endpoint allows you to import external API specifications into Qodex.
Currently, this endpoint only supports the OpenAPI specification, for which the importType will be openapi.
On a successful import, the response will be an array with each element contaning id, name and uid of entities created.
Supported types:
- string
- json
- file
The input parameter should be defined based on the type.
To import a file, request body must be form-data with
typeparam set tofile.
Note: Refer to examples for different scenarios.
Requires API Key as
X-Api-Keyrequest header.
Request Body
{"type"=>"json", "input"=>{"openapi"=>"3.0.0", "info"=>{"version"=>"1.0.0", "title"=>"Swagger Petstore", "license"=>{"name"=>"MIT"}}, "servers"=>[{"url"=>"http://petstore.swagger.io/v1"}], "paths"=>{"/pets"=>{"get"=>{"summary"=>"List all pets", "operationId"=>"listPets", "parameters"=>[{"name"=>"limit", "in"=>"query", "description"=>"limit", "required"=>false, "schema"=>{"type"=>"integer", "format"=>"int32"}}], "responses"=>{"default"=>{"description"=>"unexpected error", "content"=>{"application/json"=>{"schema"=>{"$ref"=>"#/components/schemas/Error"}}}}}}}}, "components"=>{"schemas"=>{"Error"=>{"required"=>["code", "message"], "properties"=>{"code"=>{"type"=>"integer", "format"=>"int32"}, "message"=>{"type"=>"string"}}}}}}}
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
x-api-key | string | ||
Content-Type | string |
RESPONSES
status: OK
{"collections":[{"id":"c74f2169-0c59-49f6-b04f-fdec4aba3db3","name":"demo","uid":"2282-c74f2169-0c59-49f6-b04f-fdec4aba3db3"},{"id":"49b08197-6b3d-4957-88d3-dbba0e3ee6a0","name":"demo","uid":"2282-49b08197-6b3d-4957-88d3-dbba0e3ee6a0"}]}