Tyk

Tyk Tyk API

The Tyk API from Tyk — 3 operation(s) for tyk.

OpenAPI Specification

tyk-tyk-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Dashboard Admin Additional Permissions Tyk 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: <your-secret>

    ```'
servers:
- url: http://localhost/
- url: https://localhost/
security:
- ApiKeyAuth: []
tags:
- name: Tyk
paths:
  /tyk/apis:
    get:
      description: List APIs from Tyk Gateway
      operationId: listApis
      responses:
        '200':
          content:
            application/json:
              example:
              - api_id: b84fe1a04e5648927971c0557971565c
                auth:
                  auth_header_name: authorization
                definition:
                  key: version
                  location: header
                name: Tyk Test API
                org_id: 664a14650619d40001f1f00f
                proxy:
                  listen_path: /tyk-api-test/
                  strip_listen_path: true
                  target_url: https://httpbin.org
                use_oauth2: true
                version_data:
                  not_versioned: true
                  versions:
                    Default:
                      name: Default
              schema:
                items:
                  $ref: '#/components/schemas/APIDefinition'
                type: array
          description: List of API definitions.
        '403':
          content:
            application/json:
              example:
                message: Attempted administrative access with invalid or missing key!
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Forbidden
      summary: Tyk Get List of Apis
      tags:
      - Tyk
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      description: Create API. A single Tyk node can have its API Definitions queried, deleted and updated remotely. This functionality enables you to remotely update your Tyk definitions without having to manage the files manually.
      operationId: createApi
      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
      requestBody:
        content:
          application/json:
            example:
              api_id: b84fe1a04e5648927971c0557971565c
              auth:
                auth_header_name: authorization
              definition:
                key: version
                location: header
              name: Tyk Test API
              org_id: 664a14650619d40001f1f00f
              proxy:
                listen_path: /tyk-api-test/
                strip_listen_path: true
                target_url: https://httpbin.org
              use_oauth2: true
              version_data:
                not_versioned: true
                versions:
                  Default:
                    name: Default
            schema:
              $ref: '#/components/schemas/APIDefinition'
      responses:
        '200':
          content:
            application/json:
              example:
                action: added
                key: b84fe1a04e5648927971c0557971565c
                status: ok
              schema:
                $ref: '#/components/schemas/ApiModifyKeySuccess'
          description: API created.
        '400':
          content:
            application/json:
              example:
                message: Request malformed
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Bad Request
        '403':
          content:
            application/json:
              example:
                message: Attempted administrative access with invalid or missing key!
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Forbidden
        '500':
          content:
            application/json:
              example:
                message: file object creation failed, write error
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Internal server error.
      summary: Tyk Creat an Api
      tags:
      - Tyk
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /tyk/apis/{apiID}:
    delete:
      description: Deleting an API definition will remove the file from the file store, the API definition will NOT be unloaded, a separate reload request will need to be made to disable the API endpoint.
      operationId: deleteApi
      parameters:
      - description: The API ID.
        example: 1bd5c61b0e694082902cf15ddcc9e6a7
        in: path
        name: apiID
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                action: deleted
                key: 1bd5c61b0e694082902cf15ddcc9e6a7
                status: ok
              schema:
                $ref: '#/components/schemas/ApiModifyKeySuccess'
          description: API deleted.
        '403':
          content:
            application/json:
              example:
                message: Attempted administrative access with invalid or missing key!
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                message: API not found
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: API not found.
        '500':
          content:
            application/json:
              example:
                message: Delete failed
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Internal server error.
      summary: Tyk Deleting an Api Definition With Id.
      tags:
      - Tyk
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      description: Get API definition from Tyk Gateway.
      operationId: getApi
      parameters:
      - description: The API ID.
        example: keyless
        in: path
        name: apiID
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                api_id: b84fe1a04e5648927971c0557971565c
                auth:
                  auth_header_name: authorization
                definition:
                  key: version
                  location: header
                name: Tyk Test API
                org_id: 664a14650619d40001f1f00f
                proxy:
                  listen_path: /tyk-api-test/
                  strip_listen_path: true
                  target_url: https://httpbin.org
                use_oauth2: true
                version_data:
                  not_versioned: true
                  versions:
                    Default:
                      name: Default
              schema:
                $ref: '#/components/schemas/APIDefinition'
          description: API definition.
          headers:
            x-tyk-base-api-id:
              description: ID of the base API if the requested API is a version.
              schema:
                type: string
              style: simple
        '403':
          content:
            application/json:
              example:
                message: Attempted administrative access with invalid or missing key!
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                message: API not found.
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: API not found.
      summary: Tyk Get Api Definition With It's Id.
      tags:
      - Tyk
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      description: 'Updating an API definition uses the same signature and object as a `POST`, however it will first ensure that the API ID that is being updated is the same as the one in the object being `PUT`.


        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: updateApi
      parameters:
      - description: The API ID.
        example: 1bd5c61b0e694082902cf15ddcc9e6a7
        in: path
        name: apiID
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            example:
              api_id: b84fe1a04e5648927971c0557971565c
              auth:
                auth_header_name: authorization
              definition:
                key: version
                location: header
              name: Update the API name sample
              org_id: 664a14650619d40001f1f00f
              proxy:
                listen_path: /update-listen-path
                strip_listen_path: true
                target_url: https://tyk.io/api
              use_oauth2: true
              version_data:
                not_versioned: true
                versions:
                  Default:
                    name: Default
            schema:
              $ref: '#/components/schemas/APIDefinition'
      responses:
        '200':
          content:
            application/json:
              example:
                action: modified
                key: 1bd5c61b0e694082902cf15ddcc9e6a7
                status: ok
              schema:
                $ref: '#/components/schemas/ApiModifyKeySuccess'
          description: API updated.
        '400':
          content:
            application/json:
              example:
                message: Request malformed
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Bad Request
        '403':
          content:
            application/json:
              example:
                message: Attempted administrative access with invalid or missing key!
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                message: API not found
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: API not found.
        '500':
          content:
            application/json:
              example:
                message: File object creation failed, write error.
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Internal server error.
      summary: Tyk Updating an Api Definition With Its Id.
      tags:
      - Tyk
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /tyk/apis/{apiID}/versions:
    get:
      description: Listing versions of an API.
      operationId: listApiVersions
      parameters:
      - description: The API ID.
        example: keyless
        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: ''
                  id: keyless
                  internal: false
                  isDefaultVersion: false
                  name: Tyk Test Keyless API
                  versionName: ''
                - expirationDate: ''
                  id: 1f20d5d2731d47ac9c79fddf826eda00
                  internal: false
                  isDefaultVersion: true
                  name: Version three Api
                  versionName: v2
                status: success
              schema:
                $ref: '#/components/schemas/VersionMetas'
          description: API version metas.
        '403':
          content:
            application/json:
              example:
                message: Attempted administrative access with invalid or missing key!
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                message: API not found
                status: error
              schema:
                $ref: '#/components/schemas/ApiStatusMessage'
          description: API not found.
      summary: Tyk Listing Versions of an Api.
      tags:
      - Tyk
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    GraphQLProxyConfig:
      properties:
        auth_headers:
          additionalProperties:
            type: string
          nullable: true
          type: object
          example: example_value
        features:
          $ref: '#/components/schemas/GraphQLProxyFeaturesConfig'
        request_headers:
          additionalProperties:
            type: string
          nullable: true
          type: object
          example: example_value
        request_headers_rewrite:
          additionalProperties:
            $ref: '#/components/schemas/RequestHeadersRewriteConfig'
          nullable: true
          type: object
          example: example_value
        subscription_type:
          type: string
          example: example_value
        use_response_extensions:
          $ref: '#/components/schemas/GraphQLResponseExtensions'
      type: object
    MiddlewareDefinition:
      properties:
        disabled:
          type: boolean
          example: true
        name:
          example: PreMiddlewareFunction
          type: string
        path:
          type: string
          example: example_value
        raw_body_only:
          example: false
          type: boolean
        require_session:
          example: false
          type: boolean
      type: object
    TransformJQMeta:
      properties:
        filter:
          type: string
          example: example_value
        method:
          type: string
          example: example_value
        path:
          type: string
          example: example_value
      type: object
    ServiceDiscoveryConfiguration:
      properties:
        cache_disabled:
          type: boolean
          example: true
        cache_timeout:
          type: integer
          example: 10
        data_path:
          type: string
          example: example_value
        endpoint_returns_list:
          type: boolean
          example: true
        parent_data_path:
          type: string
          example: example_value
        port_data_path:
          type: string
          example: example_value
        query_endpoint:
          type: string
          example: example_value
        target_path:
          type: string
          example: example_value
        use_discovery_service:
          type: boolean
          example: true
        use_nested_query:
          type: boolean
          example: true
        use_target_list:
          type: boolean
          example: true
      type: object
    GlobalRateLimit:
      properties:
        disabled:
          type: boolean
          example: true
        per:
          type: number
          example: 42.5
        rate:
          type: number
          example: 42.5
      type: object
    UptimeTests:
      properties:
        check_list:
          items:
            $ref: '#/components/schemas/HostCheckObject'
          nullable: true
          type: array
          example: []
        config:
          $ref: '#/components/schemas/UptimeTestsConfig'
      type: object
    HostCheckObject:
      properties:
        body:
          type: string
          example: example_value
        commands:
          items:
            $ref: '#/components/schemas/CheckCommand'
          nullable: true
          type: array
          example: []
        enable_proxy_protocol:
          type: boolean
          example: true
        headers:
          additionalProperties:
            type: string
          nullable: true
          type: object
          example: example_value
        method:
          type: string
          example: example_value
        protocol:
          type: string
          example: example_value
        timeout:
          type: integer
          example: 10
        url:
          type: string
          example: https://www.example.com
      type: object
    Provider:
      properties:
        introspection:
          $ref: '#/components/schemas/Introspection'
        jwt:
          $ref: '#/components/schemas/JWTValidation'
      type: object
    Scopes:
      properties:
        jwt:
          $ref: '#/components/schemas/ScopeClaim'
        oidc:
          $ref: '#/components/schemas/ScopeClaim'
      type: object
    SessionProviderMeta:
      properties:
        meta:
          additionalProperties: {}
          nullable: true
          type: object
          example: example_value
        name:
          type: string
          example: Example Title
        storage_engine:
          type: string
          example: example_value
      type: object
    VersionDefinition:
      properties:
        default:
          type: string
          example: example_value
        enabled:
          type: boolean
          example: true
        fallback_to_default:
          type: boolean
          example: true
        key:
          example: x-api-version
          type: string
        location:
          example: header
          type: string
        name:
          type: string
          example: Example Title
        strip_path:
          type: boolean
          example: true
        strip_versioning_data:
          type: boolean
          example: true
        url_versioning_pattern:
          type: string
          example: https://www.example.com
        versions:
          additionalProperties:
            type: string
          nullable: true
          type: object
          example: example_value
      type: object
    RequestSigningMeta:
      properties:
        algorithm:
          type: string
          example: example_value
        certificate_id:
          type: string
          example: '500123'
        header_list:
          items:
            type: string
          nullable: true
          type: array
          example: []
        is_enabled:
          type: boolean
          example: true
        key_id:
          type: string
          example: '500123'
        secret:
          type: string
          example: example_value
        signature_header:
          type: string
          example: example_value
      type: object
    ApiModifyKeySuccess:
      properties:
        action:
          example: modified
          type: string
        key:
          example: b13d928b9972bd18
          type: string
        key_hash:
          type: string
          example: example_value
        status:
          example: ok
          type: string
      type: object
    GraphQLConfig:
      properties:
        enabled:
          type: boolean
          example: true
        engine:
          $ref: '#/components/schemas/GraphQLEngineConfig'
        execution_mode:
          enum:
          - proxyOnly
          - executionEngine
          - subgraph
          - supergraph
          type: string
          example: proxyOnly
        introspection:
          $ref: '#/components/schemas/GraphQLIntrospectionConfig'
        last_schema_update:
          format: date-time
          nullable: true
          type: string
          example: '2026-01-15T10:30:00Z'
        playground:
          $ref: '#/components/schemas/GraphQLPlayground'
        proxy:
          $ref: '#/components/schemas/GraphQLProxyConfig'
        schema:
          type: string
          example: example_value
        subgraph:
          $ref: '#/components/schemas/GraphQLSubgraphConfig'
        supergraph:
          $ref: '#/components/schemas/GraphQLSupergraphConfig'
        type_field_configurations:
          items:
            $ref: '#/components/schemas/DatasourceTypeFieldConfiguration'
          nullable: true
          type: array
          example: []
        version:
          enum:
          - ''''
          - '1'
          - '2'
          type: string
          example: ''''
      type: object
    EndPointMeta:
      properties:
        disabled:
          type: boolean
          example: true
        ignore_case:
          type: boolean
          example: true
        method:
          type: string
          example: example_value
        method_actions:
          additionalProperties:
            $ref: '#/components/schemas/EndpointMethodMeta'
          type: object
          example: example_value
        path:
          type: string
          example: example_value
      type: object
    CheckCommand:
      properties:
        message:
          type: string
          example: example_value
        name:
          type: string
          example: Example Title
      type: object
    GraphQLFieldConfig:
      properties:
        disable_default_mapping:
          type: boolean
          example: true
        field_name:
          type: string
          example: example_value
        path:
          items:
            type: string
          nullable: true
          type: array
          example: []
        type_name:
          type: string
          example: example_value
      type: object
    CacheOptions:
      properties:
        cache_all_safe_requests:
          example: false
          type: boolean
        cache_by_headers:
          items:
            type: string
          nullable: true
          type: array
          example: []
        cache_control_ttl_header:
          type: string
          example: example_value
        cache_response_codes:
          items:
            type: integer
          nullable: true
          type: array
          example: []
        cache_timeout:
          example: 60
          format: int64
          type: integer
        enable_cache:
          example: true
          type: boolean
        enable_upstream_cache_control:
          example: false
          type: boolean
      type: object
    ApiStatusMessage:
      properties:
        message:
          type: string
          example: example_value
        status:
          type: string
          example: example_value
      type: object
    AuthConfig:
      properties:
        auth_header_name:
          example: Authorization
          type: string
        cookie_name:
          type: string
          example: example_value
        disable_header:
          type: boolean
          example: true
        name:
          type: string
          example: Example Title
        param_name:
          type: string
          example: example_value
        signature:
          $ref: '#/components/schemas/SignatureConfig'
        use_certificate:
          type: boolean
          example: true
        use_cookie:
          type: boolean
          example: true
        use_param:
          type: boolean
          example: true
        validate_signature:
          type: boolean
          example: true
      type: object
    URLRewriteMeta:
      properties:
        disabled:
          type: boolean
          example: true
        match_pattern:
          type: string
          example: example_value
        method:
          type: string
          example: example_value
        path:
          type: string
          example: example_value
        rewrite_to:
          type: string
          example: example_value
        triggers:
          items:
            $ref: '#/components/schemas/RoutingTrigger'
          nullable: true
          type: array
          example: []
      type: object
    DatasourceSourceConfig:
      properties:
        data_source_config:
          example: example_value
        kind:
          type: string
          example: example_value
      type: object
    MiddlewareIdExtractor:
      properties:
        disabled:
          type: boolean
          example: true
        extract_from:
          type: string
          example: example_value
        extract_with:
          type: string
          example: example_value
        extractor_config:
          additionalProperties: {}
          nullable: true
          type: object
          example: example_value
      type: object
    ProxyConfig:
      properties:
        check_host_against_uptime_tests:
          type: boolean
          example: true
        disable_strip_slash:
          type: boolean
          example: true
        enable_load_balancing:
          type: boolean
          example: true
        listen_path:
          example: /relative-path-examples/
          type: string
        preserve_host_header:
          type: boolean
          example: true
        service_discovery:
          $ref: '#/components/schemas/ServiceDiscoveryConfiguration'
        strip_listen_path:
          example: true
          type: boolean
        target_list:
          items:
            type: string
          nullable: true
          type: array
          example: []
        target_url:
          example: https://httpbin.org/
          type: string
        transport:
          properties:
            proxy_url:
              type: string
            ssl_ciphers:
              items:
                type: string
              nullable: true
              type: array
            ssl_force_common_name_check:
              type: boolean
            ssl_insecure_skip_verify:
              type: boolean
            ssl_max_version:
              minimum: 0
              type: integer
            ssl_min_version:
              minimum: 0
              type: integer
          type: object
          example: example_value
      type: object
    RoutingTrigger:
      properties:
        'on':
          enum:
          - all
          - any
          type: string
          example: all
        options:
          $ref: '#/components/schemas/RoutingTriggerOptions'
        rewrite_to:
          type: string
          example: example_value
      type: object
    GoPluginMeta:
      properties:
        disabled:
          type: boolean
          example: true
        func_name:
          type: string
          example: example_value
        method:
          type: string
          example: example_value
        path:
          type: string
          example: example_value
        plugin_path:
          type: string
          example: example_value
      type: object
    UptimeTestsConfig:
      properties:
        expire_utime_after:
          type: integer
          example: 10
        recheck_wait:
          type: integer
          example: 10
        service_discovery:
          $ref: '#/components/schemas/ServiceDiscoveryConfiguration'
      type: object
    SignatureConfig:
      properties:
        algorithm:
          type: string
          example: example_value
        allowed_clock_skew:
          type: integer
          example: 10
        error_code:
          type: integer
          example: 10
        error_message:
          type: string
          example: example_value
        header:
          type: string
          example: example_value
        param_name:
          type: string
          example: example_value
        secret:
          type: string
          example: example_value
        use_param:
          type: boolean
          example: true
      type: object
    CircuitBreakerMeta:
      properties:
        disable_half_open_state:
          type: boolean
          example: true
        disabled:
          type: boolean
          example: true
        method:
          type: string
          example: example_value
        path:
          type: string
          example: example_value
        return_to_service_after:
          type: integer
          example: 10
        samples:
          format: int64
          type: integer
          example: 10
        threshold_percent:
          type: number
          example: 42.5
      type: object
    EndpointMethodMeta:
      properties:
        action:
          enum:
          - no_action
          - reply
          type: string
          example: no_action
        code:
          type: integer
          example: 10
        data:
          type: string
          example: example_value
        headers:
          additionalProperties:
            type: string
          nullable: true
          type: object
          example: example_value
      type: object
    VersionInfo:
      properties:
        expires:
          type: string
          example: example_value
        extended_paths:
          $ref: '#/components/schemas/ExtendedPathsSet'
        global_headers:
          additionalProperties:
            type: string
          nullable: true
          type: object
          example: example_value
        global_headers_disabled:
          type: boolean
          example: true
        global_headers_remove:
          items:
            type: string
          nullable: true
          type: array
          example: []
        global_response_headers:
          additionalProperties:
            type: string
          nullable: true
          type: object
          example: example_value
        global_response_headers_disabled:
          type: boolean
          example: true
        global_response_headers_remove:
          items:
            type: string
          nullable: true
          type: array
          example: []
        global_size_limit:
          format: int64
          type: integer
          example: 10
        ignore_endpoint_case:
          type: boolean
          example: true
        name:
          type: string
          example: Example Title
        override_target:
          type: string
          example: example_value
        paths:
          properties:
            black_list:
              items:
                type: string
              nullable: true
              type: array
            ignored:
              items:
                type: string
              nullable: true
              type: array
            white_list:
              items:
                type: string
              nullable: true
              type: array
          type: object
          example: example_value
        use_extended_paths:
          example: true
          type: boolean
      type: object
    GraphQLSubgraphEntity:
      properties:
        api_id:
          type: string
          example: '500123'
        headers:
          additionalProperties:
            type: string
          nullable: true
          type: object
          example: example_value
        name:
          type: string
 

# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tyk/refs/heads/main/openapi/tyk-tyk-api-openapi.yml