import OAS

POST {{baseUrl}}/tyk/apis/oas/import?upstreamURL=<string>&listenPath=<string>&customDomain=<string>&apiID=<string>&allowList=true&mockResponse=true&validateRequest=true&authentication=true

Create a new OAS format API, without x-tyk-gateway. For use with an existing OAS API that you want to expose via your Tyk Gateway. (New)

Request Params

KeyDatatypeRequiredDescription
upstreamURLstringUpstream URL for the API
listenPathstringListen path for the API
customDomainstringCustom domain for the API
apiIDstringID of the API
allowListbooleanEnable allowList middleware for all endpoints
mockResponsebooleanEnable mockResponse middleware for all endpoints having responses configured.
validateRequestbooleanEnable validateRequest middleware for all endpoints having a request body with media type application/json
authenticationbooleanEnable or disable authentication in your Tyk Gateway as per your OAS document.

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;}