Developer API - DataGalaxy (2.40.0)

Overview

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.

Base URL

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.

Response Status Codes

Status CodeDescriptionNotes
200OKThe request was successful
400Bad RequestIncoming request contains parameters that might not be valid
401UnauthorizedThe supplied credentials, if any, are not sufficient to access the resource
404Not FoundThe requested resource is not found
429Too Many RequestsToo many requests have been (Rate limiting)
500Server ErrorThe server could not return the representation due to an internal server error
501Not ImplementedThe requested operation is not supported (e.g. supports GET but not POST etc.)

Rate Limits

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.

MethodRateNote
Rate limiting28800 requests / hourWhen exceeded, your IP will be blocked for 15 minutes.
Throttling8 requests / secondWhen exceeded, each request will be delayed by 500ms.
Payload size100 MBWhen exceeded, request will be rejected.

Query parameters

Boolean query parameters only accept the values true and false.

Pagination

All routes returning lists share the same pagination format. These routes take two optional parameters as query strings: limit and page.

QueryStringDefinition
limitInteger ranging from 1 to 5000. It sets the maximum amount of objects per page. Default value is 20.
pageInteger starting at 1. It determines the page returned by the request. Default value is 1.

The response payload contains 5 properties:

PropertyDefinition
pagesTotal number of pages.
totalNumber of objects returned.
total_sumSum of all existing objects.
next_pageURL of the next page. Value will be null if there is none.
resultsList of objects.

Authentication

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>"
ℹ️ Note Use your Personal Access Token or integration token directly as a bearer token. The deprecated /credentials endpoint returns the token used to call it and does not need to be called.

Personal Access Tokens

A Personal Access Token (PAT) belongs to your user account. It has the same access rights and uses the same license as your account.

Generate it in the DataGalaxy web application, from Profile management > Profile > Security.

Integration tokens

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.

  1. 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.
  2. DataGalaxy creates a technical user with a Steward license for the token.
  3. 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.

Token expiration

Personal Access Tokens and integration tokens are valid for one year at most. The exp claim gives the expiration time of a token. Regenerate the token in the DataGalaxy web application before it expires.

Token claims reference

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.

NameDescription
dg_client_idClient UUID
dg_user_idUser UUID
iatTimestamp that indicates the time at which the token was issued
expTimestamp that indicates the time at which the token will be expired
jtiUnique identifier of the token
issURL of the DataGalaxy server that issued the token. It ends with the client UUID.
audAudience of the token. Always dg-tokens.
azpAuthorized party the token was issued to. Always dg-tokens.
typToken type. Always Bearer.
subDataGalaxy authentication account ID. This is not the user UUID: use dg_user_id instead.
sidDataGalaxy session ID
acrAuthentication context class reference
scopeSpace-separated list of granted scopes, for instance dg_platform email offline_access openid profile
allowed-originsWeb origins allowed to use the token
realm_accessDataGalaxy roles granted to the token, in a roles array
nameUser full name
given_nameUser given name
family_nameUser family name
emailEmail of the technical account the token belongs to. This is not the user's email address.
email_verifiedWhether DataGalaxy considers email verified
preferred_usernameUsername of the technical account the token belongs to

Guides

Exporting a Dictionary module

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:

  1. List the sources with GET /v2/sources?versionId={versionId}&includeAttributes=true&limit=5000. Follow next_page until it is null.
  2. For each source, list its direct children with GET /v2/containers and GET /v2/structures. Use the same query parameters, and add parentId set to the source's id and maxDepth=0.
  3. For each container, repeat step 2 with the container's id as parentId.
  4. For each structure, list its direct children with GET /v2/structures and GET /v2/fields, with the structure's id as parentId and maxDepth=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.

Changelog

The DataGalaxy Developer API is updated frequently with new features, improvements and fixes.

All these changes will be documented in our .

Documentation layout

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.
Overview
License
DataGalaxy©
Servers
/