POST
/
api
/
apis
/
oas
/
import
curl --request POST \
--url https://{tenant}/api/apis/oas/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://gist.githubusercontent.com/yurisasuke/e4f11baefb68f2ace5dd2297b7ccc3e0/raw/bb476fa4d4a48874b26d9df9bf62094d1a07f040/tykOas.json"
}'
{
  "ID": "78ade81be12349087e194c858f06f595",
  "Message": "API created",
  "Meta": "6656cda15715ec8ddb0e7e7c",
  "Status": "OK"
}

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Headers

Content-Type
enum<string>

Content type of the imported document. If Content-Type header is empty, it's assumed that Content-Type is application/json.

Available options:
application/json,
application/x-yaml

Query Parameters

upstreamURL
string

Upstream URL for the API.

listenPath
string

Listen path for the API.

customDomain
string

Custom domain for the API.

allowList
boolean

Enable allowList middleware for all endpoints.

Example:

true

validateRequest
boolean

Enable validateRequest middleware for all endpoints having a request body with media type application/json.

Example:

true

mockResponse
boolean

Enable mockResponse middleware for all endpoints having responses configured.

Example:

true

authentication
boolean

Enable/disable the authentication mechanism in your Tyk Gateway for your OAS API.

Example:

true

templateID
string

The Asset ID of template applied while creating or importing an OAS API.

base_api_id
string

The base API which the new version will be linked to.

base_api_version_name
string

The 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_name
string

The version name of the created version.

set_default
boolean

If true, the new version is set as default version.

Body

The content of the file should be the OpenAPI document in JSON or YAML format (without x-tyk-api-gateway extension).

url
string

Response

OAS imported.

ID
string
Message
string
Meta
any
Status
string