openapi: 3.0.0 info: title: Tyk Dashboard Admin Additional Permissions OAS APIs API version: 5.3.0 description: 'For Tyk On-Premises installations only, the Dashboard Admin API has two endpoints and is used to set up and provision a Tyk Dashboard instance without the command line. In order to use the Dashboard Admin API, you''ll need to get the `admin_secret` value from your Tyk Dashboard configurations. The secret you set should then be sent along as a header with each Dashboard Admin API Request in order for it to be successful: ``` admin-auth: ```' servers: - url: http://localhost/ - url: https://localhost/ security: - ApiKeyAuth: [] tags: - description: Tyk allows you to work with APIs that you ve designed with the OpenAPI Specification version 3.0.x, making it even easier to get your API up and running. Use the endpoints in this tag to create,delete,import and update OAS APIs. externalDocs: description: Tyk OAS Documentation. url: https://tyk.io/docs/getting-started/key-concepts/high-level-concepts/ name: OAS APIs paths: /api/apis/oas: post: description: "Create an API Definition in Tyk OAS API format.\n 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." operationId: createApiOAS parameters: - description: The base API which the new version will be linked to. example: 663a4ed9b6be920001b191ae in: query name: base_api_id required: false schema: type: string - description: 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. example: Default in: query name: base_api_version_name required: false schema: type: string - description: The version name of the created version. example: v2 in: query name: new_version_name required: false schema: type: string - description: If true, the new version is set as default version. example: true in: query name: set_default required: false schema: type: boolean - $ref: '#/components/parameters/TemplateID' requestBody: content: application/json: example: components: securitySchemes: bearerAuth: description: The API Access Credentials scheme: bearer type: http info: description: This is a sample OAS. title: OAS Sample 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/ upstream: url: https://localhost:8080 schema: allOf: - $ref: https://raw.githubusercontent.com/TykTechnologies/tyk/refs/heads/master/apidef/oas/schema/3.0.json - $ref: '#/components/schemas/XTykApiGateway' responses: '200': content: application/json: example: ID: 4c1c0d8fc885401053ddac4e39ef676b Message: API created Meta: 665597e0b646b300011acb69 Status: OK schema: $ref: '#/components/schemas/ApiResponse' description: OAS created. '400': content: application/json: example: Message: Couldn't read body. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Malformed data. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: Could not retrieve detail of apiID 62a0ec9092faf50001395817 in org 82a0ec9052faf50001395817. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden '409': content: application/json: example: Message: Found API with the same ID. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Conflict '500': content: application/json: example: Message: Error while validating schema. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Internal server error. summary: Create OAS API. tags: - OAS APIs /api/apis/oas/{apiId}: delete: description: Deleting an API definition will remove the file from the file store. The API definition will not be unloaded and a separate reload request will need to be made to disable the API endpoint. operationId: deleteOASApi parameters: - description: ID of the API you want to delete. example: 4c1c0d8fc885401053ddac4e39ef676b in: path name: apiId required: true schema: type: string responses: '200': content: application/json: example: Message: API deleted. Meta: null Status: OK schema: $ref: '#/components/schemas/ApiResponse' description: Deleted successfully. '400': content: application/json: example: Message: Could not delete the API. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Bad Request '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: 'access denied: You do not have permission to access /api/apis/oas/{apiId}' Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden '404': content: application/json: example: Message: Could not retrieve API detail. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: API not found. summary: Delete OAS API. tags: - OAS APIs get: description: Get a single API definition in OAS format. operationId: getOASAPIDetails parameters: - description: ID of the API you want to fetch. example: 4c1c0d8fc885401053ddac4e39ef676b in: path name: apiId required: true schema: type: string responses: '200': content: application/json: examples: oasExample: $ref: '#/components/examples/oasExample' schema: allOf: - $ref: https://raw.githubusercontent.com/TykTechnologies/tyk/refs/heads/master/apidef/oas/schema/3.0.json - $ref: '#/components/schemas/XTykApiGateway' description: Fetched API. headers: x-tyk-base-api-id: description: ID of the base API if the requested API is a version. schema: type: string style: simple '400': content: application/json: example: Message: Could not retrieve API detail. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Bad request or API not found. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: 'access denied: You do not have permission to access /api/apis/oas/{apiId}' Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden '500': content: application/json: example: Message: Failed to marshal data for API detail. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Internal server error. summary: Get OAS API details. tags: - OAS APIs patch: description: Update a Tyk OAS API. You can use this endpoint to update the OAS part of your Tyk OAS API definition. This endpoint allows you to configure the Tyk OAS extension based on the query parameters provided (similar to import). operationId: patchApiOAS parameters: - description: ID of the API you want to patch. example: 4c1c0d8fc885401053ddac4e39ef676b in: path name: apiId required: true schema: type: string - $ref: '#/components/parameters/UpstreamURL' - $ref: '#/components/parameters/ListenPath' - $ref: '#/components/parameters/CustomDomain' - $ref: '#/components/parameters/AllowList' - $ref: '#/components/parameters/ValidateRequest' - $ref: '#/components/parameters/MockResponse' - $ref: '#/components/parameters/Authentication' requestBody: content: application/json: examples: PatchByUrl: summary: Patch By Url value: url: https://gist.githubusercontent.com/lghiur/385183f81d0878e5806fffab843d2ef2/raw/1da0aa8b08b496e6c8c84c4996fad6c4877218a0/Petstore%2520Tyk%2520OAS%2520API%2520Definition PatchOASExample: summary: Patch Tyk Oas Example value: components: securitySchemes: bearerAuth: description: The API Access Credentials scheme: bearer type: http info: description: This is a sample OAS. title: OAS Sample 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/ upstream: url: https://localhost:8080 schema: oneOf: - $ref: '#/components/schemas/ApiImportByUrlPayload' - allOf: - $ref: https://raw.githubusercontent.com/TykTechnologies/tyk/refs/heads/master/apidef/oas/schema/3.0.json - $ref: '#/components/schemas/XTykApiGateway' multipart/form-data: schema: $ref: '#/components/schemas/FormDataFile' description: The content of the file should be the OpenAPI document in JSON format. responses: '200': content: application/json: example: Message: API updated Meta: null Status: OK schema: $ref: '#/components/schemas/ApiResponse' description: Patched API. '400': content: application/json: example: Message: Invalid `ID` value Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Malformed request. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: Failed to update org object to DB. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden. '404': content: application/json: example: Message: API not found. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: API not found. summary: Patch a single OAS API by ID. tags: - OAS APIs put: description: Updating an API definition uses the same signature object as a `POST`. It will first ensure that the API ID being updated is the same as in the `PUT` object.
Updating will completely replace the file descriptor and will not change an API definition that has already been loaded. The hot-reload endpoint will need to be called to push the new definition to live. operationId: updateApiOAS parameters: - description: ID of the API you want to update. example: 4c1c0d8fc885401053ddac4e39ef676b in: path name: apiId required: true schema: type: string requestBody: content: application/json: example: components: securitySchemes: bearerAuth: description: The API Access Credentials scheme: bearer type: http info: description: This is a sample OAS. title: OAS Sample 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/ upstream: url: https://localhost:8080 schema: allOf: - $ref: https://raw.githubusercontent.com/TykTechnologies/tyk/refs/heads/master/apidef/oas/schema/3.0.json - $ref: '#/components/schemas/XTykApiGateway' responses: '200': content: application/json: example: Message: API updated. Meta: null Status: OK schema: $ref: '#/components/schemas/ApiResponse' description: Updated API. '400': content: application/json: example: Message: The payload should contain x-tyk-api-gateway. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Malformed API data. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: Found API with same url. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden '404': content: application/json: example: Message: API definition does not exist Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: API not found. '500': content: application/json: example: Message: Error while validating schema. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Internal server error. summary: Update OAS API. tags: - OAS APIs /api/apis/oas/{apiId}/categories: get: description: Get a list of the API categories associated with the specified API. operationId: getApiCategories parameters: - description: ID of the API. example: 4c1c0d8fc885401053ddac4e39ef676b in: path name: apiId required: true schema: type: string responses: '200': content: application/json: example: categories: - developers - devops - research schema: $ref: '#/components/schemas/CategoriesPayload' description: Category fetched. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: 'access denied: You do not have permission to access /api/apis/oas/{apiId}/categories' Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden '404': content: application/json: example: Message: API not found Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: API not found. '500': content: application/json: example: Message: Failed to marshal categories payload. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Internal server error. summary: Get OAS API's Categories. tags: - OAS APIs put: description: Update the list of API categories associated with the specified API. operationId: updateApiCategories parameters: - description: ID of the API. example: 4c1c0d8fc885401053ddac4e39ef676b in: path name: apiId required: true schema: type: string requestBody: content: application/json: example: categories: - dev - testers - messages schema: $ref: '#/components/schemas/CategoriesPayload' responses: '200': content: application/json: example: Message: API categories updated. Meta: null Status: OK schema: $ref: '#/components/schemas/ApiResponse' description: Categories updated. '400': content: application/json: example: Message: Failed to update ApiDef object to DB. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Malformed request data. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: 'access denied: You do not have permission to access /api/apis/oas/{apiId}/categories' Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden '404': content: application/json: example: Message: API not found Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: API not found. '500': content: application/json: example: Message: Failed to update ApiDef object to DB. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Internal server error. summary: Update OAS API categories. tags: - OAS APIs /api/apis/oas/{apiId}/export: get: description: Download API definition in OAS format (only APIs saved in OAS format). When you set the mode query parameter to public the OAS spec exported will exclude the x-tyk-api-gateway part. When mode query parameter is empty or is set to any other value apart from public then the exported OAS spec will include the x-tyk-api-gateway part. operationId: downloadApiOASPublic parameters: - description: ID of the API you want to export. example: 4c1c0d8fc885401053ddac4e39ef676b in: path name: apiId required: true schema: type: string - description: Mode of OAS export, by default mode could be empty which means to export OAS spec including OAS Tyk extension. When mode=public, OAS spec excluding Tyk extension is exported. example: public in: query name: mode required: false schema: enum: - public type: string responses: '200': content: application/octet-stream: schema: format: binary type: string description: Fetched successfully. '400': content: application/json: example: Message: Could not retrieve API detail. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: API not found. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: 'access denied: You do not have permission to access /api/apis/oas/{apiId}/export' Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden summary: Export OAS API. tags: - OAS APIs /api/apis/oas/{apiId}/versions: get: description: List all the versions of an OAS API. operationId: listOASApiVersions parameters: - description: ID of the API you want to fetch. example: 4c1c0d8fc885401053ddac4e39ef676b in: path name: apiId required: true schema: type: string - $ref: '#/components/parameters/SearchText' - $ref: '#/components/parameters/AccessType' responses: '200': content: application/json: example: apis: - expirationDate: 2024-11-30 12:00 id: 5b633de8673e40e44bc88b6b248f0937 internal: false isDefaultVersion: true name: user versionName: Default - expirationDate: 2024-11-30 12:00 id: 0fec4eb890cf4b8c5cb6fc011456c315 internal: false isDefaultVersion: false name: user versionName: v2 pages: 1 schema: $ref: '#/components/schemas/VersionMetas' description: Version fetched. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: 'access denied: You do not have permission to access /api/apis/oas/{apiId}/versions' Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden '404': content: application/json: example: Message: Could not retrieve API detail. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: API not found. summary: List OAS API versions. tags: - OAS APIs /api/apis/oas/dry-run: post: description: 'Generate a Tyk OAS API definition without saving it to the Dashboard database. This endpoint is used to produce a Tyk OAS API definition without creating the API proxy itself. This provides a dry run functionality for Tyk OAS API creation, showing what would be created in the Dashboard given the set of inputs provided.' operationId: dryRunApiOAS parameters: - $ref: '#/components/parameters/TemplateID' - description: The base API which the new version will be linked to. example: 663a4ed9b6be920001b191ae in: query name: base_api_id required: false schema: type: string - description: 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. example: Default in: query name: base_api_version_name required: false schema: type: string - description: The version name of the created version. example: v2 in: query name: new_version_name required: false schema: type: string - description: If true, the new version is set as default version. example: true in: query name: set_default required: false schema: type: boolean - $ref: '#/components/parameters/UpstreamURL' - $ref: '#/components/parameters/ListenPath' - $ref: '#/components/parameters/CustomDomain' - $ref: '#/components/parameters/AllowList' - $ref: '#/components/parameters/ValidateRequest' - $ref: '#/components/parameters/MockResponse' - $ref: '#/components/parameters/Authentication' requestBody: content: application/json: example: oas: components: securitySchemes: bearerAuth: description: The API Access Credentials scheme: bearer type: http info: description: This is a sample OAS. title: OAS Sample 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 OAS. title: OAS Sample 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/ upstream: url: https://localhost:8080 schema: $ref: '#/components/schemas/DryRunRequest' responses: '200': content: application/json: examples: oasExample: $ref: '#/components/examples/oasExample' schema: allOf: - $ref: '#/components/schemas/XTykApiGateway' - $ref: https://raw.githubusercontent.com/TykTechnologies/tyk/refs/heads/master/apidef/oas/schema/3.0.json description: Success. '400': content: application/json: example: Message: Couldn't read body. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Malformed request body. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: 'access denied: You do not have permission to access /api/apis/oas/dry-run' Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden summary: Dry Run OAS. tags: - OAS APIs /api/apis/oas/import: post: description: 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. operationId: importOAS parameters: - $ref: '#/components/parameters/UpstreamURL' - $ref: '#/components/parameters/ListenPath' - $ref: '#/components/parameters/CustomDomain' - $ref: '#/components/parameters/AllowList' - $ref: '#/components/parameters/ValidateRequest' - $ref: '#/components/parameters/MockResponse' - $ref: '#/components/parameters/Authentication' - $ref: '#/components/parameters/TemplateID' - description: The base API which the new version will be linked to. example: 663a4ed9b6be920001b191ae in: query name: base_api_id required: false schema: type: string - description: 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. example: Default in: query name: base_api_version_name required: false schema: type: string - description: The version name of the created version. example: v2 in: query name: new_version_name required: false schema: type: string - description: If true, the new version is set as default version. example: true in: query name: set_default required: false schema: type: boolean requestBody: content: application/json: examples: ImportByUrl: summary: Import By Url value: url: https://gist.githubusercontent.com/Keithwachira/e4f11baefb68f2ace5dd2297b7ccc3e0/raw/bd0aeee05d1bd380535af7a8d5d59aa30f9b5aad/tykOas.json ImportTykOAS: summary: Import Tyk Oas Example value: components: securitySchemes: bearerAuth: description: The API Access Credentials scheme: bearer type: http info: description: This is a sample OAS. title: OAS Sample 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 schema: oneOf: - $ref: '#/components/schemas/ApiImportByUrlPayload' - $ref: https://raw.githubusercontent.com/TykTechnologies/tyk/refs/heads/master/apidef/oas/schema/3.0.json multipart/form-data: schema: $ref: '#/components/schemas/FormDataFile' description: The content of the file should be the OpenAPI document in JSON format (without x-tyk-api-gateway extension). responses: '200': content: application/json: example: ID: 78ade81be12349087e194c858f06f595 Message: API created Meta: 6656cda15715ec8ddb0e7e7c Status: OK schema: $ref: '#/components/schemas/ApiResponse' description: OAS imported. '400': content: application/json: example: Message: The import payload should not contain x-tyk-api-gateway. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Malformed body. '401': content: application/json: example: Message: Not authorised Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Unauthorized '403': content: application/json: example: Message: The user does not have the rights to apply templates. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Forbidden. '409': content: application/json: example: Message: Found API with the same ID. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Conflict '500': content: application/json: example: Message: Failed to save new org object to DB. Meta: null Status: Error schema: $ref: '#/components/schemas/ApiResponse' description: Internal server error. summary: Import OAS. tags: - OAS APIs components: schemas: XTykApiGateway: properties: x-tyk-api-gateway: $ref: '#/components/schemas/XTykAPIGateway' type: object Operation: properties: allow: $ref: '#/components/schemas/Allowance' block: $ref: '#/components/schemas/Allowance' cache: $ref: '#/components/schemas/CachePlugin' circuitBreaker: $ref: '#/components/schemas/CircuitBreaker' doNotTrackEndpoint: $ref: '#/components/schemas/TrackEndpoint' enforceTimeout: $ref: '#/components/schemas/EnforceTimeout' ignoreAuthentication: $ref: '#/components/schemas/Allowance' internal: $ref: '#/components/schemas/Internal' mockResponse: $ref: '#/components/schemas/MockResponse' postPlugins: $ref: '#/components/schemas/EndpointPostPlugins' rateLimit: $ref: '#/components/schemas/RateLimitEndpoint' requestSizeLimit: $ref: '#/components/schemas/RequestSizeLimit' trackEndpoint: $ref: '#/components/schemas/TrackEndpoint' transformRequestBody: $ref: '#/components/schemas/TransformBody' transformRequestHeaders: $ref: '#/components/schemas/TransformHeaders' transformRequestMethod: $ref: '#/components/schemas/TransformRequestMethod' transformResponseBody: $ref: '#/components/schemas/TransformBody' transformResponseHeaders: $ref: '#/components/schemas/TransformHeaders' urlRewrite: $ref: '#/components/schemas/URLRewrite' validateRequest: $ref: '#/components/schemas/ValidateRequest' virtualEndpoint: $ref: '#/components/schemas/VirtualEndpoint' type: object Scopes: nullable: true properties: claimName: type: string scopeToPolicyMapping: items: $ref: '#/components/schemas/ScopeToPolicy' type: array type: object Provider: properties: clientToPolicyMapping: items: $ref: '#/components/schemas/ClientToPolicy' type: array issuer: type: string type: object Cache: nullable: true properties: cacheAllSafeRequests: type: boolean cacheByHeaders: items: type: string type: array cacheResponseCodes: items: type: integer type: array controlTTLHeaderName: type: string enableUpstreamCacheControl: type: boolean enabled: type: boolean timeout: format: int64 type: integer type: object PluginConfigData: nullable: true properties: enabled: type: boolean value: additionalProperties: {} nullable: true type: object type: object BooleanQueryParam: enum: - true - false example: true type: boolean Internal: nullable: true properties: enabled: type: boolean type: object URLRewriteTrigger: properties: condition: type: string rewriteTo: type: string rules: items: $ref: '#/components/schemas/URLRewriteRule' type: array type: object ValidateRequest: nullable: true properties: enabled: type: boolean errorResponseCode: type: integer type: object GatewayTags: nullable: true properties: enabled: type: boolean tags: items: type: string nullable: true type: array type: object MockResponse: nullable: true properties: body: type: string code: type: integer enabled: type: boolean fromOASExamples: $ref: '#/components/schemas/FromOASExamples' headers: $ref: '#/components/schemas/Headers' type: object SecuritySchemes: additionalProperties: {} type: object Header: properties: name: type: string value: type: string type: object URLRewriteRule: properties: in: type: string name: type: string negate: type: boolean pattern: type: string type: object PinnedPublicKeys: items: $ref: '#/components/schemas/PinnedPublicKey' nullable: true type: array CategoriesPayload: properties: categories: items: type: string nullable: true type: array type: object TrafficLogs: nullable: true properties: enabled: type: boolean type: object DryRunRequest: properties: oas: $ref: https://raw.githubusercontent.com/TykTechnologies/tyk/refs/heads/master/apidef/oas/schema/3.0.json tyk_oas: allOf: - $ref: https://raw.githubusercontent.com/TykTechnologies/tyk/refs/heads/master/apidef/oas/schema/3.0.json - $ref: '#/components/schemas/XTykApiGateway' type: object CertificatePinning: nullable: true properties: domainToPublicKeysMapping: $ref: '#/components/schemas/PinnedPublicKeys' enabled: type: boolean type: object EndpointPostPlugins: items: $ref: '#/components/schemas/EndpointPostPlugin' type: array AuthSources: properties: cookie: $ref: '#/components/schemas/AuthSource' header: $ref: '#/components/schemas/AuthSource' query: $ref: '#/components/schemas/AuthSource' type: object IDExtractor: nullable: true properties: config: $ref: '#/components/schemas/IDExtractorConfig' enabled: type: boolean source: type: string with: type: string type: object CircuitBreaker: nullable: true properties: coolDownPeriod: type: integer enabled: type: boolean halfOpenStateEnabled: type: boolean sampleSize: type: integer threshold: format: double type: number type: object CustomPluginAuthentication: nullable: true properties: AuthSources: $ref: '#/components/schemas/AuthSources' config: $ref: '#/components/schemas/AuthenticationPlugin' enabled: type: boolean type: object ApiImportByUrlPayload: properties: url: type: string type: object Test: nullable: true properties: serviceDiscovery: $ref: '#/components/schemas/ServiceDiscovery' type: object Headers: items: $ref: '#/components/schemas/Header' type: array EventHandlers: items: $ref: '#/components/schemas/EventHandler' type: array TransformBody: nullable: true properties: body: type: string enabled: type: boolean format: type: string path: type: string type: object ClientToPolicy: properties: clientId: type: string policyId: type: string type: object ClientCertificates: nullable: true properties: allowlist: items: type: string nullable: true type: array enabled: type: boolean type: object PostAuthenticationPlugin: nullable: true properties: plugins: $ref: '#/components/schemas/CustomPlugins' type: object PinnedPublicKey: properties: domain: type: string publicKeys: items: type: string nullable: true type: array type: object ApiResponse: properties: ID: type: string Message: type: string Meta: {} Status: type: string type: object EnforceTimeout: nullable: true properties: enabled: type: boolean value: type: integer type: object URLRewrite: nullable: true properties: enabled: type: boolean pattern: type: string rewriteTo: type: string triggers: items: $ref: '#/components/schemas/URLRewriteTrigger' type: array type: object HMAC: nullable: true properties: AuthSources: $ref: '#/components/schemas/AuthSources' allowedAlgorithms: items: type: string type: array allowedClockSkew: format: double type: number enabled: type: boolean type: object CustomPlugin: properties: enabled: type: boolean functionName: type: string path: type: string rawBodyOnly: type: boolean requireSession: type: boolean type: object Upstream: properties: certificatePinning: $ref: '#/components/schemas/CertificatePinning' mutualTLS: $ref: '#/components/schemas/MutualTLS' rateLimit: $ref: '#/components/schemas/RateLimit' serviceDiscovery: $ref: '#/components/schemas/ServiceDiscovery' test: $ref: '#/components/schemas/Test' url: type: string type: object CustomPlugins: items: $ref: '#/components/schemas/CustomPlugin' type: array OIDC: nullable: true properties: AuthSources: $ref: '#/components/schemas/AuthSources' enabled: type: boolean providers: items: $ref: '#/components/schemas/Provider' type: array scopes: $ref: '#/components/schemas/Scopes' segregateByClientId: type: boolean type: object RequestSizeLimit: nullable: true properties: enabled: type: boolean value: format: int64 type: integer type: object PostPlugin: nullable: true properties: plugins: $ref: '#/components/schemas/CustomPlugins' type: object ListenPath: properties: strip: type: boolean value: type: string type: object Allowance: nullable: true properties: enabled: type: boolean ignoreCase: type: boolean type: object ServiceDiscovery: nullable: true properties: cache: $ref: '#/components/schemas/ServiceDiscoveryCache' cacheTimeout: format: int64 type: integer dataPath: type: string enabled: type: boolean endpointReturnsList: type: boolean parentDataPath: type: string portDataPath: type: string queryEndpoint: type: string targetPath: type: string useNestedQuery: type: boolean useTargetList: type: boolean type: object PluginBundle: nullable: true properties: enabled: type: boolean path: type: string type: object Info: properties: dbId: type: string expiration: type: string id: type: string name: type: string orgId: type: string state: $ref: '#/components/schemas/State' versioning: $ref: '#/components/schemas/Versioning' type: object MultipartFile: format: binary nullable: true type: string EndpointPostPlugin: properties: enabled: type: boolean functionName: type: string name: type: string path: type: string type: object State: properties: active: type: boolean internal: type: boolean type: object VersionMeta: properties: expirationDate: type: string id: type: string internal: type: boolean isDefaultVersion: type: boolean name: type: string versionName: type: string type: object Authentication: nullable: true properties: baseIdentityProvider: type: string custom: $ref: '#/components/schemas/CustomPluginAuthentication' enabled: type: boolean hmac: $ref: '#/components/schemas/HMAC' oidc: $ref: '#/components/schemas/OIDC' securitySchemes: $ref: '#/components/schemas/SecuritySchemes' stripAuthorizationData: type: boolean type: object CORS: nullable: true properties: allowCredentials: type: boolean allowedHeaders: items: type: string type: array allowedMethods: items: type: string type: array allowedOrigins: items: type: string type: array debug: type: boolean enabled: type: boolean exposedHeaders: items: type: string type: array maxAge: type: integer optionsPassthrough: type: boolean type: object FromOASExamples: nullable: true properties: code: type: integer contentType: type: string enabled: type: boolean exampleName: type: string type: object DetailedActivityLogs: nullable: true properties: enabled: type: boolean type: object VersionMetas: properties: apis: items: $ref: '#/components/schemas/VersionMeta' nullable: true type: array pages: type: integer type: object TrackEndpoint: nullable: true properties: enabled: type: boolean type: object ServiceDiscoveryCache: nullable: true properties: enabled: type: boolean timeout: format: int64 type: integer type: object Server: properties: authentication: $ref: '#/components/schemas/Authentication' clientCertificates: $ref: '#/components/schemas/ClientCertificates' customDomain: $ref: '#/components/schemas/Domain' detailedActivityLogs: $ref: '#/components/schemas/DetailedActivityLogs' detailedTracing: $ref: '#/components/schemas/DetailedTracing' eventHandlers: $ref: '#/components/schemas/EventHandlers' gatewayTags: $ref: '#/components/schemas/GatewayTags' listenPath: $ref: '#/components/schemas/ListenPath' type: object RateLimit: nullable: true properties: enabled: type: boolean per: $ref: '#/components/schemas/TimeReadableDuration' rate: type: integer type: object AuthSource: nullable: true properties: enabled: type: boolean name: type: string type: object ScopeToPolicy: properties: policyId: type: string scope: type: string type: object DomainToCertificate: properties: certificate: type: string domain: type: string type: object TransformHeaders: nullable: true properties: add: $ref: '#/components/schemas/Headers' enabled: type: boolean remove: items: type: string type: array type: object TimeReadableDuration: format: int64 type: integer XTykAPIGateway: properties: info: $ref: '#/components/schemas/Info' middleware: $ref: '#/components/schemas/Middleware' server: $ref: '#/components/schemas/Server' upstream: $ref: '#/components/schemas/Upstream' type: object PluginConfig: nullable: true properties: bundle: $ref: '#/components/schemas/PluginBundle' data: $ref: '#/components/schemas/PluginConfigData' driver: type: string type: object DetailedTracing: nullable: true properties: enabled: type: boolean type: object Middleware: nullable: true properties: global: $ref: '#/components/schemas/Global' operations: $ref: '#/components/schemas/Operations' type: object ResponsePlugin: nullable: true properties: plugins: $ref: '#/components/schemas/CustomPlugins' type: object AuthenticationPlugin: nullable: true properties: enabled: type: boolean functionName: type: string idExtractor: $ref: '#/components/schemas/IDExtractor' path: type: string rawBodyOnly: type: boolean type: object CachePlugin: nullable: true properties: cacheByRegex: type: string cacheResponseCodes: items: type: integer type: array enabled: type: boolean timeout: format: int64 type: integer type: object MutualTLS: nullable: true properties: domainToCertificateMapping: items: $ref: '#/components/schemas/DomainToCertificate' nullable: true type: array enabled: type: boolean type: object VirtualEndpoint: nullable: true properties: body: type: string enabled: type: boolean functionName: type: string name: type: string path: type: string proxyOnError: type: boolean requireSession: type: boolean type: object PrePlugin: nullable: true properties: plugins: $ref: '#/components/schemas/CustomPlugins' type: object Global: nullable: true properties: cache: $ref: '#/components/schemas/Cache' contextVariables: $ref: '#/components/schemas/ContextVariables' cors: $ref: '#/components/schemas/CORS' pluginConfig: $ref: '#/components/schemas/PluginConfig' postAuthenticationPlugin: $ref: '#/components/schemas/PostAuthenticationPlugin' postAuthenticationPlugins: $ref: '#/components/schemas/CustomPlugins' postPlugin: $ref: '#/components/schemas/PostPlugin' postPlugins: $ref: '#/components/schemas/CustomPlugins' prePlugin: $ref: '#/components/schemas/PrePlugin' prePlugins: $ref: '#/components/schemas/CustomPlugins' responsePlugin: $ref: '#/components/schemas/ResponsePlugin' responsePlugins: $ref: '#/components/schemas/CustomPlugins' trafficLogs: $ref: '#/components/schemas/TrafficLogs' transformRequestHeaders: $ref: '#/components/schemas/TransformHeaders' transformResponseHeaders: $ref: '#/components/schemas/TransformHeaders' type: object VersionToID: properties: id: type: string name: type: string type: object TransformRequestMethod: nullable: true properties: enabled: type: boolean toMethod: type: string type: object IDExtractorConfig: nullable: true properties: formParamName: type: string headerName: type: string regexp: type: string regexpMatchIndex: type: integer xPathExp: type: string type: object FormDataFile: properties: file: $ref: '#/components/schemas/MultipartFile' required: - file type: object RateLimitEndpoint: nullable: true properties: enabled: type: boolean per: $ref: '#/components/schemas/TimeReadableDuration' rate: type: integer type: object Operations: additionalProperties: $ref: '#/components/schemas/Operation' type: object ContextVariables: nullable: true properties: enabled: type: boolean type: object EventHandler: properties: enabled: type: boolean id: type: string name: type: string trigger: type: string type: type: string type: object Versioning: nullable: true properties: default: type: string enabled: type: boolean fallbackToDefault: type: boolean key: type: string location: type: string name: type: string stripVersioningData: type: boolean urlVersioningPattern: type: string versions: items: $ref: '#/components/schemas/VersionToID' nullable: true type: array type: object Domain: nullable: true properties: certificates: items: type: string type: array enabled: type: boolean name: type: string type: object parameters: ListenPath: description: Listen path for the API. example: /user-test/ in: query name: listenPath required: false schema: type: string AccessType: description: Filter for internal or external API versions. example: internal in: query name: accessType required: false schema: enum: - internal - external type: string MockResponse: description: Enable mockResponse middleware for all endpoints having responses configured. in: query name: mockResponse required: false schema: $ref: '#/components/schemas/BooleanQueryParam' AllowList: description: Enable allowList middleware for all endpoints. in: query name: allowList required: false schema: $ref: '#/components/schemas/BooleanQueryParam' Authentication: description: Enable/disable the authentication mechanism in your Tyk Gateway for your OAS API. in: query name: authentication schema: $ref: '#/components/schemas/BooleanQueryParam' ValidateRequest: description: Enable validateRequest middleware for all endpoints having a request body with media type application/json. in: query name: validateRequest required: false schema: $ref: '#/components/schemas/BooleanQueryParam' SearchText: description: Search for API version name. example: Sample oas in: query name: searchText required: false schema: type: string UpstreamURL: description: Upstream URL for the API. example: https://localhost:8080 in: query name: upstreamURL required: false schema: type: string CustomDomain: description: Custom domain for the API. example: tyk.io in: query name: customDomain required: false schema: type: string TemplateID: description: The Asset ID of template applied while creating or importing an OAS API. example: my-unique-template-id in: query name: templateID schema: type: string examples: oasExample: value: components: securitySchemes: bearerAuth: description: The API Access Credentials scheme: bearer type: http info: description: This is a sample OAS. title: OAS Sample 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/ upstream: url: https://localhost:8080 securitySchemes: ApiKeyAuth: type: apiKey in: header name: Admin-Auth