import OAS
POST {{baseUrl}}/api/apis/oas/import?upstreamURL=<string>&listenPath=<string>&customDomain=<string>&allowList=true&validateRequest=true&mockResponse=true&authentication=true&templateID=<string>
For use with an existing OpenAPI document that you want to expose via your Tyk Gateway. Create a new Tyk OAS API from an OpenAPI document in JSON format (without x-tyk-api-gateway extension). The payload can contain either a fully fledged OpenAPI document or a URL pointing to an OpenAPI document.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
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 | |
validateRequest | boolean | Enable validateRequest middleware for all endpoints having a request body with media type application/json | |
mockResponse | boolean | Enable mockResponse middleware for all endpoints having responses configured. | |
authentication | boolean | Enable/disable the authentication mechanism in your Tyk Gateway for your OAS API | |
templateID | string | The asset ID of template to apply while importing an OAS API. |
Request Body
{"url"=>"<uri>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"action":"\u003cstring\u003e","key":"\u003cstring\u003e","key_hash":"\u003cstring\u003e","status":"\u003cstring\u003e"}