Skip to Content
Endpoints

Milestones

How to manage the milestones of a project using the public API

The milestones endpoints allow you to list, create, rename, archive and delete the milestones of a project. Milestones group test runs and test plans across different versions or phases of your project. Write operations can be performed by users with role test runner or with higher privileges.

List Milestones

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

/paginated endpoints are transitional. In API v1, the base paths will return paginated responses and the /paginated suffix will be removed.

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

ParameterTypeDescriptionDefaultExample
archivedbooleanFilter milestones by archived state.No filterarchived=true
offsetnumberNumber of items to skip.0offset=10
limitnumberMaximum number of items to return. Accepted range: 0–1,000.100limit=20
sortFieldstringField to sort by: title, created_at, updated_at or archived_at.created_atsortField=title
sortOrderstringSort direction for sortField: asc or desc.ascsortOrder=asc

Response

Status: 200 OK

{
  total: number                  // Number of matching milestones across all pages
  offset: number                 // Offset applied to this response
  limit: number                  // Limit applied to this response
  data: Array<{                  // Milestones in this page
    id: number                   //   Milestone ID
    title: string                //   Title of the milestone
    createdAt: datetime          //   Creation time
    updatedAt: datetime          //   Last update time
    archivedAt: datetime | null  //   Archive time, null if not archived
    archivedBy: number | null    //   ID of the user who archived the milestone
  }>
}

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

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/paginated?archived=false"

Example Response

{
  "total": 2,
  "offset": 0,
  "limit": 100,
  "data": [
    {
      "id": 1,
      "title": "Version 0.9",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-01T00:00:00.000Z",
      "archivedAt": null,
      "archivedBy": 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",
      "archivedBy": 1
    }
  ]
}

List Milestones (Deprecated)

Deprecated

This endpoint is deprecated. Use List Milestones (GET /api/public/v0/project/{project_id}/milestone/paginated) instead.

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

ParameterTypeDescriptionDefaultExample
archivedbooleanFilter milestones by archived state.No filterarchived=true

Response

Status: 200 OK

{
  milestones: Array<{            // Array of milestone objects
    id: number                   //   Milestone ID
    title: string                //   Title of the milestone
    createdAt: datetime          //   Creation time
    updatedAt: datetime          //   Last update time
    archivedAt: datetime | null  //   Archive time, null if not archived
  }>
}

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"
    }
  ]
}

Get Milestone

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

Returns one milestone.

Response

Status: 200 OK

{
  id: number                   // Milestone ID
  title: string                // Title of the milestone
  createdAt: datetime          // Creation time
  updatedAt: datetime          // Last update time
  archivedAt: datetime | null  // Archive time, null if not archived
  archivedBy: number | null    // ID of the user who archived the milestone
}

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.

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  // Title of the milestone (max 255 characters)
}

Response

Status: 201 Created

{
  id: number  // ID of the 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
409Duplicate milestone title exists in the project

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

Update Milestone

PATCH/api/public/v0/project/{project_id}/milestone/{milestone_id}

Updates a milestone. Fields left out keep their current values.

Request Body

{
  title?: string  // New title (1–255 characters), unique in the project
}

Response

Status: 200 OK

The updated milestone, in the shape Get Milestone returns.

Errors

Status CodeDescription
409A milestone with the same title exists

Archive Milestone

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

Archives a milestone and closes every open test plan and test run in it.

Response

Status: 200 OK

{
  ...Milestone         // The archived milestone, in the shape Get Milestone returns
  closedPlans: number  // Number of open test plans archiving closed
  closedRuns: number   // Number of open test runs outside test plans archiving closed
}

Errors

Status CodeDescription
409The milestone is already archived

Unarchive Milestone

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

Unarchives a milestone. The test plans and test runs that archiving closed stay closed; reopen them one by one. Reopening a test plan or run in an archived milestone also unarchives the milestone.

Response

Status: 200 OK

The milestone, in the shape Get Milestone returns.

Errors

Status CodeDescription
409The milestone is not archived

Delete Milestone

DELETE/api/public/v0/project/{project_id}/milestone/{milestone_id}

Deletes a milestone with every test plan and test run in it. They go to the trash as one entry, which restores them together. Links back from their Jira or Linear issues are removed.

Response

Status: 200 OK

{
  message: string
}