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
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:
- head to the DataGalaxy Web Application and login into your account
- go to the Administration page and navigate to the Integration section
- create your new token by clicking the Create button
Don't forget to copy your token by clicking the "Copy" button
Manage your token privileges
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:
- go to your workspace
- click on the Settings button
- navigate to the Access tab
- find your token using the Select User search bar
- grant it "Admin" or "Access" privileges using the Select Space Right dropdown
- Nice job ! Your token can now access your metamodel 🎉
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 🚀