Tyk

Tyk Analytics API

The Tyk Dashboard provides a full set of analytics functions and graphs that you can use to segment and view your API traffic and activity.

Operations 2

GET /api/activity/keys/{keyHash}/{startDay}/{startMonth}/{startYear}/{EndDay}/{EndMonth}/{EndYear} Analytics of API Key. #
GET /api/activity/oauthid/{OAuthClientID}/{startDay}/{startMonth}/{startYear}/{EndDay}/{EndMonth}/{EndYear} Analytics of Oauth Client ID. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tyk-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tyk-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@tyk.io
    name: Tyk Technologies
    url: https://tyk.io/contact
  description: '

    ## <a name="introduction"></a> Introduction


    The Tyk Dashboard API offers granular, programmatic access to a centralised database of resources that your Tyk nodes can pull from. This API has a dynamic user administrative structure which means the secret key that is used to communicate with your Tyk nodes can be kept secret and access to the wider management functions can be handled on a user-by-user and organisation-by-organisation basis.


    A common question around using a database-backed configuration is how to programmatically add API definitions to your Tyk nodes, the Dashboard API allows much more fine-grained, secure and multi-user access to your Tyk cluster, and should be used to manage a database-backed Tyk node.


    The Tyk Dashboard API works seamlessly with the Tyk Dashboard (and the two come bundled together).


    ## <a name="security-hierarchy"></a> Security Hierarchy


    The Dashboard API provides a more structured security layer to managing Tyk nodes.


    ### Organisations, APIs and Users


    With the Dashboard API and a database-backed Tyk setup, (and to an extent with file-based API setups - if diligence is used in naming and creating definitions), the following security model is applied to the management of Upstream APIs:


    * **Organisations**: All APIs are *owned* by an organisation, this is designated by the ''OrgID'' parameter in the API Definition.

    * **Users**: All users created in the Dashboard belong to an organisation (unless an exception is made for super-administrative access).

    * **APIs**: All APIs belong to an Organisation and only Users that belong to that organisation can see the analytics for those APIs and manage their configurations.

    * **API Keys**: API Keys are designated by organisation, this means an API key that has full access rights will not be allowed to access the APIs of another organisation on the same system, but can have full access to all APIs within the organisation.

    * **Access Rights**: Access rights are stored with the key, this enables a key to give access to multiple APIs, this is defined by the session object in the core Tyk API.


    In order to use the Dashboard API, you''ll need to get the ''Tyk Dashboard API Access Credentials'' secret from your user profile on the Dashboard UI.


    The secret you set should then be sent along as a header with each Dashboard API Request in order for it to be successful:



    authorization: <your-secret>

    '
  license:
    name: Mozilla Public License Version 2.0
    url: https://github.com/TykTechnologies/tyk/blob/master/LICENSE.md
  title: Tyk Dashboard Analytics API
  version: 5.7.1
servers:
- url: https://{tenant}
  variables:
    tenant:
      default: localhost:8080
      description: Your dashboard host
security:
- bearerAuth: []
tags:
- description: The Tyk Dashboard provides a full set of analytics functions and graphs that you can use to segment and view your API traffic and activity.
  externalDocs:
    description: Traffic Analytics.
    url: https://tyk.io/docs/tyk-dashboard-analytics/
  name: Analytics
paths:
  /api/activity/keys/{keyHash}/{startDay}/{startMonth}/{startYear}/{EndDay}/{EndMonth}/{EndYear}:
    get:
      description: It returns analytics of the endpoints of all APIs called a key between start and end date.
      operationId: getAnalyticsOfApiKey
      parameters:
      - description: Day to start querying the analytics from.
        example: '15'
        in: path
        name: startDay
        required: true
        schema:
          type: string
      - description: Month to start querying the analytics from.
        example: '1'
        in: path
        name: startMonth
        required: true
        schema:
          type: string
      - description: Year to start querying the analytics from.
        example: '2024'
        in: path
        name: startYear
        required: true
        schema:
          type: string
      - description: End date of analytics to query.
        example: '20'
        in: path
        name: EndDay
        required: true
        schema:
          type: string
      - description: End month of analytics to query.
        example: '6'
        in: path
        name: EndMonth
        required: true
        schema:
          type: string
      - description: End year of analytics to query.
        example: '2025'
        in: path
        name: EndYear
        required: true
        schema:
          type: string
      - description: Hash of your API key.
        in: path
        name: keyHash
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                aggregateAnalytics:
                  $ref: '#/components/examples/aggregateAnalytics'
              schema:
                $ref: '#/components/schemas/AggregateAnalyticsData'
          description: Returns analytics of all endpoints called using the given key between the given time range.
        '400':
          content:
            application/json:
              example:
                Message: Key could not be decoded.
                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: User does not have access to the API with ID.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '500':
          content:
            application/json:
              example:
                Message: Failed to fetch analytics.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: Analytics of API Key.
      tags:
      - Analytics
  /api/activity/oauthid/{OAuthClientID}/{startDay}/{startMonth}/{startYear}/{EndDay}/{EndMonth}/{EndYear}:
    get:
      description: Returns activity of all endpoints which used the given OAuth client between the given time range.
      operationId: getAnalyticsOfOauthClientId
      parameters:
      - description: Day to start querying the analytics from.
        example: '15'
        in: path
        name: startDay
        required: true
        schema:
          type: string
      - description: Month to start querying the analytics from.
        example: '1'
        in: path
        name: startMonth
        required: true
        schema:
          type: string
      - description: Year to start querying the analytics from.
        example: '2024'
        in: path
        name: startYear
        required: true
        schema:
          type: string
      - description: End date of analytics to query.
        example: '20'
        in: path
        name: EndDay
        required: true
        schema:
          type: string
      - description: End month of analytics to query.
        example: '6'
        in: path
        name: EndMonth
        required: true
        schema:
          type: string
      - description: End year of analytics to query.
        example: '2025'
        in: path
        name: EndYear
        required: true
        schema:
          type: string
      - description: OAuthClientID
        in: path
        name: OAuthClientID
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                aggregateAnalytics:
                  $ref: '#/components/examples/aggregateAnalytics'
              schema:
                $ref: '#/components/schemas/AggregateAnalyticsData'
          description: Fetched analytics successfully.
        '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: User does not have access to the API with ID.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '500':
          content:
            application/json:
              example:
                Message: Failed to fetch analytics.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: Analytics of Oauth Client ID.
      tags:
      - Analytics
components:
  schemas:
    ResultId:
      properties:
        alias:
          type: string
        api_id:
          example: 7364617cc7d345d9755d182635dfd46d
          type: string
        api_name:
          example: OAS http
          type: string
        code:
          type: integer
        day:
          example: 12
          type: integer
        hour:
          example: 0
          type: integer
        iso_country:
          type: string
        key:
          type: string
        month:
          example: 6
          type: integer
        path:
          type: string
        queries:
          additionalProperties:
            type: integer
          type: object
        url:
          type: string
        year:
          example: 2024
          type: integer
      type: object
    AggregateAnalyticsData:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ResultUnit'
          type:
          - array
          - 'null'
        pages:
          type: integer
      type: object
    ApiResponse:
      properties:
        ID:
          type: string
        Message:
          type: string
        Meta: {}
        Status:
          type: string
      type: object
    ResultUnit:
      properties:
        error:
          example: 4
          type: integer
        hits:
          example: 26
          type: integer
        id:
          $ref: '#/components/schemas/ResultId'
        last_hit:
          example: '2024-06-19T06:33:30Z'
          format: date-time
          type: string
        latency:
          example: 0
          format: double
          type: number
        max_latency:
          example: 0
          format: int64
          type: integer
        max_upstream_latency:
          example: 0
          format: int64
          type: integer
        min_latency:
          example: 0
          format: int64
          type: integer
        min_upstream_latency:
          example: 0
          format: int64
          type: integer
        request_time:
          example: 190.2
          format: double
          type: number
        success:
          example: 22
          type: integer
        upstream_latency:
          example: 0
          format: double
          type: number
      type: object
  examples:
    aggregateAnalytics:
      value:
        data:
        - error: 4
          hits: 31
          id:
            alias: ''
            api_id: 41351a6a94094da05f75146a695a16f6
            api_name: Keyless
            code: 404
            day: 0
            hour: 0
            iso_country: ''
            key: ''
            month: 0
            path: /anything
            url: ''
            year: 0
          last_hit: '2024-06-19T07:11:39Z'
          latency: 0
          max_latency: 0
          max_upstream_latency: 0
          min_latency: 0
          min_upstream_latency: 0
          request_time: 174.5
          success: 27
          upstream_latency: 0
        pages: 1
  securitySchemes:
    bearerAuth:
      description: The Tyk Dashboard API Access Credentials
      scheme: bearer
      type: http