Skip to main content

Authentication

Overview

In this quick guide, you will learn the following :

  • how authentication works with DataGalaxy's API
  • how to obtain and use your authentication token
  • how to manage its access rights

How does authentication work ?

Our API relies on Bearer Authentication. Every request you make must contain an Authorization header with an access token:

Authorization: Bearer {token}

This token will then be analyzed by our system to determine if it is allowed to perform the requested action.

How to obtain your token

Requirements

This step requires "Client Admin" privileges to be performed. Contact your DataGalaxy administrator if you don't have the required privilege.

This step is simple:

  1. head to the DataGalaxy Web Application and login into your account
  2. go to the Administration page and navigate to the Integration section
  3. create your new token by clicking the Create button
tip

Don't forget to copy your token by clicking the "Copy" button

token-creation-high.gif

Manage your token privileges

Requirements

This step requires "Workspace Admin" privileges to be performed. Contact your DataGalaxy administrator if you don't have the required privilege.

You now have a fresh token, but it does not yes have access to your metamodel.

To give your token access to your metamodel, follow these steps:

  1. go to your workspace
  2. click on the Settings button
  3. navigate to the Access tab
  4. find your token using the Select User search bar
  5. grant it "Admin" or "Access" privileges using the Select Space Right dropdown
  6. Nice job ! Your token can now access your metamodel 🎉

token-privileges-granted

How to use your token

Using your token to authenticate your requests is simple.

When sending a request, set the Authorization header's value with Bearer {token}.

Here is how a request to fetch your users would look like using cURL:

curl -L -X GET 'https://yourapi.datagalaxy.com/v2/users' -H 'Authorization: Bearer {token}'

What's next ?

You are now the proud owner of a DataGalaxy accessToken.
Our next article will guide you through your first requests using Postman 🚀