Developer API - DataGalaxy (2.40.0)
The DataGalaxy API gives you access to CRUD actions on your metamodel, users and licenses.
Our API is organized around REST. It accepts and returns JSON-encoded data, and uses standard HTTP response codes, verbs and authentication with access tokens.
To get the full picture of DataGalaxy, please feel free to consult our online documentation.
Have a look at our step-by-step guide for a quick start on how to use our API.
Each DataGalaxy instance has its own API host, usually https://<instance>.api.datagalaxy.com. All operation paths in this documentation are relative to that host, for example https://<instance>.api.datagalaxy.com/v2/workspaces.
To find your API base URL, open the profile menu at the top right of the DataGalaxy web application, then select DataGalaxy API.
| Status Code | Description | Notes |
|---|---|---|
| 200 | OK | The request was successful |
| 400 | Bad Request | Incoming request contains parameters that might not be valid |
| 401 | Unauthorized | The supplied credentials, if any, are not sufficient to access the resource |
| 404 | Not Found | The requested resource is not found |
| 429 | Too Many Requests | Too many requests have been (Rate limiting) |
| 500 | Server Error | The server could not return the representation due to an internal server error |
| 501 | Not Implemented | The requested operation is not supported (e.g. supports GET but not POST etc.) |
The DataGalaxy API has 2 kinds of limitations: rate limiting and throttling.
Pro tip: You can track your rate limiting status with the response header X-RateLimit-Remaining. It will display how many requests you can send until the next reset.
| Method | Rate | Note |
|---|---|---|
| Rate limiting | 28800 requests / hour | When exceeded, your IP will be blocked for 15 minutes. |
| Throttling | 8 requests / second | When exceeded, each request will be delayed by 500ms. |
| Payload size | 100 MB | When exceeded, request will be rejected. |
All routes returning lists share the same pagination format. These routes take two optional parameters as query strings: limit and page.
| QueryString | Definition |
|---|---|
| limit | Integer ranging from 1 to 5000. It sets the maximum amount of objects per page. Default value is 20. |
| page | Integer starting at 1. It determines the page returned by the request. Default value is 1. |
The response payload contains 5 properties:
| Property | Definition |
|---|---|
| pages | Total number of pages. |
| total | Number of objects returned. |
| total_sum | Sum of all existing objects. |
| next_page | URL of the next page. Value will be null if there is none. |
| results | List of objects. |
The DataGalaxy API uses Bearer authentication to authenticate requests. Every request must contain an Authorization header with either a PAT (Personal Access Token) or an integration token.
Here is a quick example on how to use a Bearer authentication using CURL:
curl -X GET "https://<instance>.api.datagalaxy.com/v2/workspaces" \ -H "Authorization: Bearer <token>"
/credentials endpoint returns the token used to
call it and does not need to be called.
An integration token belongs to a technical user instead of a person. Use it for integrations that must keep working regardless of individual user accounts.
- A client space administrator creates the token from Client space administration > Integration > Tokens. Select Admin Access if the integration creates or updates users or licenses.
- DataGalaxy creates a technical user with a Steward license for the token.
- Workspaces are closed by default, so the token cannot access any workspace yet. In each workspace that the integration uses, a workspace administrator opens Settings > Access and creates an access rule. The rule targets the technical user, or a team that contains it, with the Can view or Can edit permission level.
Personal Access Tokens and integration tokens are JSON Web Tokens (JWT) that share the same claims. Use dg_client_id and dg_user_id to identify the DataGalaxy client and user. The other claims are set by DataGalaxy.
| Name | Description |
|---|---|
dg_client_id | Client UUID |
dg_user_id | User UUID |
iat | Timestamp that indicates the time at which the token was issued |
exp | Timestamp that indicates the time at which the token will be expired |
jti | Unique identifier of the token |
iss | URL of the DataGalaxy server that issued the token. It ends with the client UUID. |
aud | Audience of the token. Always dg-tokens. |
azp | Authorized party the token was issued to. Always dg-tokens. |
typ | Token type. Always Bearer. |
sub | DataGalaxy authentication account ID. This is not the user UUID: use dg_user_id instead. |
sid | DataGalaxy session ID |
acr | Authentication context class reference |
scope | Space-separated list of granted scopes, for instance dg_platform email offline_access openid profile |
allowed-origins | Web origins allowed to use the token |
realm_access | DataGalaxy roles granted to the token, in a roles array |
name | User full name |
given_name | User given name |
family_name | User family name |
email | Email of the technical account the token belongs to. This is not the user's email address. |
email_verified | Whether DataGalaxy considers email verified |
preferred_username | Username of the technical account the token belongs to |
The Dictionary module contains sources, containers, structures and fields. Containers can contain other containers, and structures can contain other structures. To export a whole module, walk the object tree one level at a time:
- List the sources with
GET /v2/sources?versionId={versionId}&includeAttributes=true&limit=5000. Follownext_pageuntil it isnull. - For each source, list its direct children with
GET /v2/containersandGET /v2/structures. Use the same query parameters, and addparentIdset to the source'sidandmaxDepth=0. - For each container, repeat step 2 with the container's
idasparentId. - For each structure, list its direct children with
GET /v2/structuresandGET /v2/fields, with the structure'sidasparentIdandmaxDepth=0. Repeat for each child structure.
Every list operation is paginated: follow next_page at each step. Each object's parent property identifies the object that contains it.
The DataGalaxy Developer API is updated frequently with new features, improvements and fixes.
All these changes will be documented in our .
We provide two API documentation layouts:
- Default layout
This layout displays information in a modern way and contains more information about requests parameters - Swagger layout
This is our legacy layout. It's main perk is the "Try it" feature which lets you send requests directly from the documentation.