DevStats provides an API for submitting data about deploys. This tutorial focuses on submitting deployment data via the DevStats API to enable more accurate deployment tracking for the Deploy metric and DORA metrics snapshot.
Tip: Integrate the DevStats Deploys API with your CI/CD deployment pipeline to push deploy metrics directly to DevStats.
☑️ Prerequisites
Before getting started, ensure you have:
- An API token to authenticate requests. If you don't have one, follow this guide to create your API token.
- A tool like Postman (UI) or cURL (CLI) to send API requests.
Step 1: Create a New Deploy
To create a new deployment, send a POST request with the following details (API reference):
Fields
- Repository: The full name of the repository using the format
organization/repository. - Deployed At:The deployment date in ISO 8601 format (e.g.,
2024-07-20T15:30:00+00:00).
Request Configuration
- Endpoint:
https://service.devstats.com/api/v1/deploys - Headers:
{ Accept: application/json } - Authorization:
Bearer YOUR_API_TOKEN(Replace this value with your API token)
Here's an example request body for the POST request:
{
"repository": "michielmulders/coding",
"deployed_at": "2024-12-09T15:30:00-03:00"
}
Example Response
You’ll receive a response confirming the deployment creation.

✅ Verify Your Deployment (Check Data Source Settings)
To ensure your deployment is reflected in the Deploy and DORA metrics, confirm that your data source settings are configured correctly. If the deployment doesn't appear in your metrics, you may need to adjust the data source to track deployments via the API.
How to Update Your Data Source to API:
- Navigate to the Settings page in DevStats.

- Select the Advanced tab and locate the Deploys Data Source option. Set this option to "API".
![]()
Once updated, return to the Deploy or DORA metrics dashboard. Your deployment should now appear in the stats.