How to use the API¶
Dune exposes a REST API that the Portal and the PowerShell module are built on. You can use it directly to automate provisioning, operations, and decommissioning of infrastructure.
Tip
For many use cases, the PowerShell module is the easier option — it takes care of login and simplifies fetching data immensely compared to calling the REST API directly.
Protocol¶
The API is served over HTTPS and uses JSON for both request and response payloads. Send Content-Type: application/json on requests that include a body.
Base path¶
API endpoints are served under the https://duneframework.com/api/* path.
Check out the available endpoints in the API reference for a given operation with exact path description.
Tenant header¶
Every request must identify the tenant it applies to via the X-Tenant header:
- A request without this header is rejected with
400 Bad Request.
Authentication¶
Requests must be authenticated. See Authentication for details.
Rate limiting¶
The API enforces rate limits to keep the platform responsive for all tenants. If you exceed the limit, a request is rejected with 429 Too Many Requests. Where applicable, a Retry-After header indicates how many seconds to wait before retrying.
Tip
Design integrations to back off and retry on 429 responses rather than retrying immediately.
API reference¶
Api references are served under /gen/* path.
Core¶
Most of the dune endpoints are documented here (e.g. Deployments, ResourceGroups, Resources, Jobs and many more)
- Core API Reference Metadata — machine-readable metadata for every service operation (routes, request/response types).
- Core API Reference UI — an interactive UI to explore and try out service operations. Make sure you are signed-in through the Portal.
Note
When using the API Reference UI, make sure you are signed in through the Portal as it only shows protected enpoints to signed-in users.