Data Hub API

Last update: Edit

1. Introduction

The Data Hub API enables you to explore and discover data sources in Mendix Data Hub and use them to build new apps. You can also set up a registration flow in your deployment pipeline to register new data sources from your applications to the Data Hub Catalog.

2. The Data Hub API

The DataHubAPI is an Open API (formerly Swagger) specification which contains all the APIs for the operations that are currently available which include the following:

  • Registration
  • Search

You can access the API at:

To access the API, authentication and authorization are required. Mendix users must obtain a Personal Access Token (PAT) as described in Generating your Personal Access Token.

For every request that is made to the Data Hub API, you must include the following in the Authorization header:

MxToken <your_token_secret>

Where you insert the PAT in place of the your_token_secret string. This line will ensure that you have access your organization’s Data Hub.

3. Generating your Personal Access Token

Mendix users (with a registered account) can obtain the necessary PAT using the Mendix Warden app by following these steps:

  1. You can access the Warden app at:

  2. When you are prompted, sign-in using your username and password. The Warden Home page is shown:

    Warden Home Screen

  3. To create a new personal access token, click Add to go to the Create a Personal Access Token screen.

  4. Enter a Name for the token. This name will be used when generated tokens are listed on the Warden home screen—that also identifies which tokens are being used.

  5. For the Select scopes that can be used with this token: under Data Hub, check both the mx:datahub:services:read and mx:datahub:services:write:

    create token home

  6. Click Create. The token will be generated and displayed in a pop-up window:

    generated token

  7. Copy the Token secret to your clipboard by clicking the storage icon below the secret.

  8. Click Close to return to the Personal Access Tokens home screen. Your generated token will be listed:

    token list

  9. For each token, Last Used: will show when the token was last used.

  10. You can delete unused tokens by clicking the “bin” icon for the token.