Import an OpenAPI definition
POST {{baseUrl}}/import/openapi
Imports an OpenAPI definition into Qodex as a new [Qodex Collection]
Include the following properties in the request body:
type— A string value that contains the definition's type. One of:stringjsonfile
input— The OpenAPI definition, based on thetypevalue:- For
string, the stringified OpenAPI definition. - For
json, the definition's JSON object. - For
file, a definition file. To import a file, the request body must be aform-datarequest and include thetypekey with thefilevalue and Content-Type.
- For
You can include the following additional properties in the request body:
options— An object that contains advanced creation options and their values. You can find a complete list of properties and their values in Qodex's OpenAPI to Qodex Collection Converter OPTIONS documentation. These properties are case-sensitive.
For more information, refer to the collection's examples.
Note:
The Qodex web app does not support the file input method type.
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
workspace | string | The workspace ID in which to import the OpenAPI specification. |
If you do not include this query parameter, the system defaults to the "My Workspace" workspace. |
RESPONSES
status: OK
{"collections":[{"id":"12ece9e1-2abf-4edc-8e34-de66e74114d2","name":"Test Collection","uid":"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2"}],"environments":[]}