Skip to main content
Version: 1.0.0

Getting Started with the D.Hub API

Use the D.Hub API to read and manage resources such as collections, datasets, pipelines, ontologies, and agents.

Prepare a request

  1. Append /api/v1 to your D.Hub deployment URL and assign it to the DHUB_API_URL environment variable. For example: export DHUB_API_URL="https://dhub.example.com/api/v1"
  2. Prepare the Bearer token for API requests. See API authentication for token issuance and storage guidance.
  3. Add Authorization: Bearer $DHUB_TOKEN to the request headers.

Send your first request

The following request returns information about the user authenticated by the current token.

curl --fail-with-body \
-H "Authorization: Bearer $DHUB_TOKEN" \
"$DHUB_API_URL/auth/me"

If the response is 401, verify that the token is present and has not expired. If the response is 403, verify that the token has the permission required for the request. Use the API categories in the left sidebar to find request and response formats for each resource.

Authentication

Security scheme type:

http

HTTP authentication scheme:

bearer