POST
/
api
/
apis
/
oas
/
dry-run
Dry Run OAS.
curl --request POST \
  --url https://{tenant}/api/apis/oas/dry-run \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "oas": {
    "components": {
      "securitySchemes": {
        "bearerAuth": {
          "description": "The API Access Credentials",
          "scheme": "bearer",
          "type": "http"
        }
      }
    },
    "info": {
      "description": "This is a sample OpenAPI description.",
      "title": "Sample OpenAPI description",
      "version": "1.0.0"
    },
    "openapi": "3.0.3",
    "paths": {
      "/api/sample/users": {
        "get": {
          "operationId": "getUsersOperation",
          "responses": {
            "200": {
              "content": {
                "application/json": {
                  "schema": {
                    "items": {
                      "properties": {
                        "name": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  }
                }
              },
              "description": "fetched users"
            }
          },
          "summary": "Get users",
          "tags": [
            "users"
          ]
        }
      }
    },
    "security": [
      {
        "bearerAuth": []
      }
    ],
    "servers": [
      {
        "url": "https://localhost:8080"
      }
    ]
  },
  "tyk_oas": {
    "components": {
      "securitySchemes": {
        "bearerAuth": {
          "description": "The API Access Credentials",
          "scheme": "bearer",
          "type": "http"
        }
      }
    },
    "info": {
      "description": "This is a sample OpenAPI description.",
      "title": "Sample OpenAPI description",
      "version": "1.0.0"
    },
    "openapi": "3.0.3",
    "paths": {
      "/api/sample/users": {
        "get": {
          "operationId": "getUsersSample",
          "responses": {
            "200": {
              "content": {
                "application/json": {
                  "schema": {
                    "items": {
                      "properties": {
                        "name": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  }
                }
              },
              "description": "fetched users"
            }
          },
          "summary": "Get users",
          "tags": [
            "users"
          ]
        }
      }
    },
    "security": [
      {
        "bearerAuth": []
      }
    ],
    "servers": [
      {
        "url": "https://localhost:8080"
      }
    ],
    "x-tyk-api-gateway": {
      "info": {
        "name": "user",
        "state": {
          "active": true
        }
      },
      "server": {
        "listenPath": {
          "strip": true,
          "value": "/user-test-four/"
        }
      },
      "upstream": {
        "url": "https://localhost:8080"
      }
    }
  }
}'
{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "description": "The API Access Credentials",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "This is a sample OpenAPI description.",
    "title": "Sample OpenAPI description",
    "version": "1.0.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/sample/users": {
      "get": {
        "operationId": "getUsersSample",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "fetched users"
          }
        },
        "summary": "Get users",
        "tags": [
          "users"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://localhost:8080"
    }
  ],
  "x-tyk-api-gateway": {
    "info": {
      "name": "user",
      "state": {
        "active": true
      }
    },
    "server": {
      "listenPath": {
        "strip": true,
        "value": "/user-test-five/"
      }
    },
    "upstream": {
      "url": "https://localhost:8080"
    }
  }
}

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Query Parameters

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.

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

Body

application/json
oas
object
tyk_oas
object

Response

Success.

x-tyk-api-gateway
object