Tyk Dashboard API v5.4

Number of APIs: 63

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 programatically 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).

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 an 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>

  1. api-portal-policies-search - Search List of Policies GET {{baseUrl}}/api/portal/policies/search?q=<string>

  2. api-users-{USER_ID}-actions-key-reset - Reset current Dashboard session for specified user PUT {{baseUrl}}/api/users/:USER_ID/actions/key/reset

  3. api-portal-policies-{id} - Get a single Policy by ID GET {{baseUrl}}/api/portal/policies/:id

  4. api-portal-policies-{id} - Update Policy Definition PUT {{baseUrl}}/api/portal/policies/:id

  5. api-users-{USER_ID}-actions-key-reset - Delete User DELETE {{baseUrl}}/api/users/:USER_ID/actions/key/reset

  6. api-users-{USER_ID} - Get User GET {{baseUrl}}/api/users/:USER_ID

  7. api-portal-policies - Get List of Policies GET {{baseUrl}}/api/portal/policies/

  8. api-users-{USER_ID} - Update User PUT {{baseUrl}}/api/users/:USER_ID

  9. api-portal-policies - Create Policy Definition POST {{baseUrl}}/api/portal/policies/

  10. api-apis-oas-{apiID} - list Api OAS GET {{baseUrl}}/api/apis/oas/:apiID?mode=<string>