Skip to main content

Milestones

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​

GET/api/public/v0/project/{project_id}/milestone

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​

ParameterTypeDescriptionExample
archivedboolFetch only archived/non-archived milestonesarchived=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/milestone

Fetch 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=false

Example 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 CodeDescription
401Invalid or missing API key
403Insufficient permissions or suspended tenant
404Project not found
500Internal server error during milestone listing

Create Milestone​

POST/api/public/v0/project/{project_id}/milestone

Creates a new milestone in the project. Milestones help organize test runs by version or project phase.

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/milestone

Request 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 CodeDescription
400Invalid request body or validation error
401Invalid or missing API key
403Duplicate milestone title exists in the project
404Project not found
500Internal server error during milestone creation
tip

After creating a milestone, you can use its ID when creating test runs to associate them with this specific project version or phase.