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
- Append
/api/v1to your D.Hub deployment URL and assign it to theDHUB_API_URLenvironment variable. For example:export DHUB_API_URL="https://dhub.example.com/api/v1" - Prepare the Bearer token for API requests. See API authentication for token issuance and storage guidance.
- Add
Authorization: Bearer $DHUB_TOKENto 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
- HTTP: Bearer authentication
Security scheme type: | http |
|---|---|
HTTP authentication scheme: | bearer |