Milestones
How to list milestones in a project using the public API
The milestones endpoint allows you to retrieve all milestones associated with a project. Milestones help organize and track test runs across different versions or phases of your project.
List Project Milestones
Returns a list of all milestones in the project. This endpoint is particularly useful when you need milestone IDs for creating or cloning test runs.
Path Parameters
project_id: The project identifier (can be either the project code or UUID)
Query Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
archived | bool | Fetch only archived/non-archived milestones | archived=true |
Response
Status: 200 OK
{
milestones: Array<{
// Array of milestone objects
id: number // Unique identifier for the milestone
title: string // Name of the milestone
createdAt: string // Creation timestamp in ISO 8601 format
updatedAt: string // Last update timestamp in ISO 8601 format
archivedAt: string | null // Timestamp when the milestone was archived in ISO 8601 format
}>
}Example Request
Fetch all milestones
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/milestoneFetch only non-archived milestones
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/milestone?archived=falseExample Response
{
"milestones": [
{
"id": 1,
"title": "Version 0.9",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"archivedAt": null
},
{
"id": 2,
"title": "Version 1.0",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"archivedAt": "2024-02-01T00:00:00.000Z"
}
]
}Error Responses
| Status Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions or suspended tenant |
| 404 | Project not found |
| 500 | Internal server error during milestone listing |
Create Milestone
Creates a new milestone in the project. Milestones help organize test runs by version or project phase.
Authentication
Requires an API key with at least Test Runner role permissions. See Authentication for more details.
Path Parameters
project_id: The project identifier (can be either the project code or UUID)
Request Body
{
title: string // Required: Name of the milestone (max 255 chars)
}Response
Status: 201 Created
{
id: number // The ID of the newly created milestone
}Example Request
Using cURL
curl \
-X POST \
-H "Authorization: ApiKey your.api.key.here" \
-H "Content-Type: application/json" \
-d '{
"title": "Version 2.0"
}' \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/milestoneRequest Body (JSON)
{
"title": "Version 2.0"
}Minimal Request Example
{
"title": "Quick Fix Release"
}Example Response
{
"id": 42
}Validation Rules
- Title: Required, must be unique within the project, maximum 255 characters
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid request body or validation error |
| 401 | Invalid or missing API key |
| 403 | Duplicate milestone title exists in the project |
| 404 | Project not found |
| 500 | Internal server error during milestone creation |
After creating a milestone, you can use its ID when creating test runs to associate them with this specific project version or phase.