Skip to content

Welcome to the DagsHub API Docs

  • Click here to jump to the API documentation

Use this API to automate, integrate and create new things with DagsHub.

You can experiment with the API right from here using the "Try it out" button under each endpoint. Create a repository for expirmentation and make sure to authorize for endpoints that require that.

Having trouble? Something doesn't work properly? Please get help on our discord or open an issue.

Authentication

To use the 'Try it out' button, just sign in to the website. No need to use the 'Authorize' button.

Access Token

You can find your access token here. To make API requests, use the token with Basic Authentication, along with your username.

Client Library

You can find auto-generated client libraries for various languages here: https://github.com/DagsHub/api-clients. They're supposed to work, but haven't been fully tested yet. If you find problems, please open an issue on GitHub.

Direct Data Access

Read more about how to use this API as part of the DagsHub client to let you stream your data from, and upload it to, any DagsHub project.

Integrations

TL;DR: We offer full support for the MLflow & Label Studio APIs for projects hosted on DagsHub!

MLflow

Check out the MLflow documentation for the complete API documentation. In short, to use the MLflow Rest API with DagsHub, treat the mlflow remote address (https://dagshub.com/<user-name>/<repository-name>.mlflow) as the base url for all the API endpoints.

For example, to list experiments from the DagsHub repository nirbarazida/CheXNet, you can run:

curl https://dagshub.com/nirbarazida/CheXNet.mlflow/api/2.0/mlflow/experiments/list

Label Studio

Check out the Label Studio documentation for the complete API documentation. Use the DagsHub repository address with the addition of /annotations/de as the base url for all the API endpoints.

Info

Instead of using Authorization: Token as specified in the Label Studio documentation, use Authorization: Bearer.

For example, to list your annotation projects in the DagsHub repository nirbarazida/CheXNet, you can run:

curl -X GET https://dagshub.com/nirbarazida/CheXNet/annotations/de/api/projects -H 'Authorization: Bearer <your_dagshub_token>'

Important Note

Label Studio workspaces shut down when not in use. This means, your requests may initially fail but after 2-3 minutes the workspace will wake up and the API will work again. If you need an always-running workspace, please contact us through our plans page and we'll be happy to help.

API Reference