create Api OAS

POST {{baseUrl}}/api/apis/oas?base_api_id=<string>&base_api_version_name=<string>&new_version_name=<string>&set_default=<boolean>

Create an API Definition in Tyk OAS API format. Note that the response includes the newly created Tyk OAS API Definition containing the unique identifier for the API ( id). You can provide a value for id in the request body, otherwise Tyk will automatically generate a value.

Request Params

KeyDatatypeRequiredDescription
base_api_idstringThe base API which the new version will be linked to.
base_api_version_namestringThe version name of the base API while creating the first version. This doesn't have to be sent for the next versions but if it is set, it will override base API version name.
new_version_namestringThe version name of the created version.
set_defaultstringIf true, the new version is set as default version.

Request Body

{"value"=>"reference https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json not found in the OpenAPI spec"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;action&quot;:&quot;\u003cstring\u003e&quot;,&quot;key&quot;:&quot;\u003cstring\u003e&quot;,&quot;key_hash&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;}