Skip to Content
Endpoints

Reports

How to list, create, rename and delete the saved reports of a project using the public API

The reports endpoints allow you to list, create, rename and delete the saved reports of a project. A report is computed once, when it's created, and kept: later results don't change it.

The API returns what a report covers, but not its data. Write operations can be performed by users with role user or with higher privileges.

Report Types

TypeName in QA SphereShows
tcaseResultsResultsThe latest result of each test case across the runs
detailedResultsDetailed ResultsThe same, with comments, time taken and linked issues
traceabilityTraceabilityTest cases and their results, grouped by requirement
effortEffortTest cases, time and linked issues per user
tcaseDurationTest Case DurationShortest, longest and average time per test case
tcaseSuccessRateTest Case Success RatePassed results out of all results per test case
runScorecardTest Run ScorecardResult counts per run
automationStabilityAutomation StabilityFlaky and failing automated test cases
automatedVsManualAutomated vs ManualTest cases whose automated and manual results disagree
runComparisonRun ComparisonTwo runs compared test case by test case
tcaseAutomationAutomation CoveragePer folder, test cases marked automated against those with automated results in a period

Report Parameters

Every type but tcaseAutomation covers test runs, given one of three ways: runIds, milestoneIds (the runs of those milestones), or a period (startDate, endDate or both: UTC days, inclusive, compared with the time a run was created). One of them is required, and more than one is an error. runComparison takes exactly two runIds, the baseline and then the run compared with it.

tcaseAutomation covers the project's test cases and takes only a period: startDate, which it requires, and endDate. It counts the automated results of that period; without endDate, up to when the report is created.

Report Object

{
  id: string                          // Report ID
  seq: number                         // Sequence number of the report in the project
  name: string                        // Name of the report
  type: string                        // Report type (see Report Types)
  projectId: string                   // ID of the project
  user: {                             // User who created the report
    id: number                        //   User ID
    email: string                     //   Email address of the user
    name: string                      //   Name of the user
    avatar: string | null             //   Absolute URL of the avatar, null if none; fetching it requires authentication
    role: string                      //   Workspace role (`owner` | `admin` | `user` | `test-runner` | `viewer`)
  }
  createdAt: datetime                 // Creation time; the report's data is from then
  updatedAt: datetime                 // Last update time
  parameters: {                       // What the report was created from: its runs, milestones or period (see Report Parameters), with the titles they had then
    startDate: string | null          //   First UTC day of the period (YYYY-MM-DD), null if none
    endDate: string | null            //   Last UTC day of the period (YYYY-MM-DD), null if none
    milestones: Array<{               //   Milestones of milestoneIds, null if none
      id: number                      //     Milestone ID
      title: string                   //     Title of the milestone
    }> | null
    runs: Array<{                     //   Runs of runIds, null if none
      id: number                      //     Run ID
      title: string                   //     Title of the run
      configuration: {                //     Configuration of the run, null if none
        id: string                    //       Configuration ID
        title: string                 //       Title of the configuration
      } | null
    }> | null
  }
  runs?: Array<{                      // Runs the report covers: its runs, its milestones' runs or the runs created in its period. Absent for `tcaseAutomation` and in List Reports
    id: number                        //   Run ID
    title: string                     //   Title of the run
    configuration: {                  //   Configuration of the run, null if none
      id: string                      //     Configuration ID
      title: string                   //     Title of the configuration
    } | null
  }>
}

List Reports

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

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

Returns the saved reports of the project, newest first.

Path Parameters

  • project_id: The project identifier (can be either the project code or UUID)

Query Parameters

ParameterTypeDescriptionDefaultExample
reportTypesstringOnly reports of these types. Repeat the parameter for multiple values.No filterreportTypes=runScorecard
userIdsnumberOnly reports these users created. Repeat the parameter for multiple values.No filteruserIds=1
createdAfterdatetimeOnly reports created at or after this time.No filtercreatedAfter=2026-10-01T00:00:00Z
createdBeforedatetimeOnly reports created at or before this time.No filtercreatedBefore=2026-11-01T00:00:00Z
offsetnumberNumber of items to skip.0offset=10
limitnumberMaximum number of items to return. Accepted range: 0–1,000.100limit=20
sortFieldstringField to sort by: created_at or type.created_atsortField=type
sortOrderstringSort direction for sortField: asc or desc.descsortOrder=asc

Response

Status: 200 OK

{
  total: number   // Number of matching reports across all pages
  offset: number  // Number of items skipped
  limit: number   // Maximum number of items returned
  data: Report[]  // Reports in this page, without `runs` (see Report Object)
}

Example Request

curl \
  -H "Authorization: ApiKey your.api.key.here" \
  "https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/report/paginated?reportTypes=runScorecard&limit=1"

Example Response

{
  "total": 3,
  "offset": 0,
  "limit": 1,
  "data": [
    {
      "id": "1CTcX4n2N_gTJ3Nm7DjrWFG",
      "seq": 3,
      "name": "Release 2.4 scorecard",
      "type": "runScorecard",
      "projectId": "1CJo8oDjj_vkGo2rQAdzz4F",
      "user": { "id": 1, "email": "jane@example.com", "name": "Jane Doe", "avatar": null, "role": "owner" },
      "createdAt": "2026-10-20T09:12:44.183275Z",
      "updatedAt": "2026-10-20T09:12:44.183275Z",
      "parameters": {
        "startDate": null,
        "endDate": null,
        "milestones": [{ "id": 4, "title": "Release 2.4" }],
        "runs": null
      }
    }
  ]
}

Get Report

GET/api/public/v0/project/{project_id}/report/{report_id}

Returns a report with the runs it covers.

Path Parameters

  • project_id: The project identifier (can be either the project code or UUID)
  • report_id: The report's ID or sequence number

Response

Status: 200 OK

The report (see Report Object).

Example Request

curl \
  -H "Authorization: ApiKey your.api.key.here" \
  https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/report/3

Example Response

{
  "id": "1CTcX4n2N_gTJ3Nm7DjrWFG",
  "seq": 3,
  "name": "Release 2.4 scorecard",
  "type": "runScorecard",
  "projectId": "1CJo8oDjj_vkGo2rQAdzz4F",
  "user": { "id": 1, "email": "jane@example.com", "name": "Jane Doe", "avatar": null, "role": "owner" },
  "createdAt": "2026-10-20T09:12:44.183275Z",
  "updatedAt": "2026-10-20T09:12:44.183275Z",
  "parameters": {
    "startDate": null,
    "endDate": null,
    "milestones": [{ "id": 4, "title": "Release 2.4" }],
    "runs": null
  },
  "runs": [
    { "id": 11, "title": "Regression - Chrome", "configuration": { "id": "1CTZq3uaJ_dV8HqHN3gxQCf", "title": "Chrome" } },
    { "id": 12, "title": "Regression - Firefox", "configuration": null }
  ]
}

Create Report

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

Creates a report from the project's data at this moment.

Path Parameters

  • project_id: The project identifier (can be either the project code or UUID)

Request Body

{
  type: string              // Report type (see Report Types)
  name: string              // Name of the report (1–255 characters)
  runIds?: number[]         // IDs of the runs to cover
  milestoneIds?: number[]   // IDs of the milestones whose runs to cover
  startDate?: string        // Cover runs created on or after this UTC day (YYYY-MM-DD); for `tcaseAutomation`, the first day of the period
  endDate?: string          // Cover runs created on or before this UTC day (YYYY-MM-DD); for `tcaseAutomation`, the last day of the period
}

See Report Parameters for what each type takes.

Response

Status: 201 Created

The report (see Report Object).

Example Request

curl \
  -H "Authorization: ApiKey your.api.key.here" \
  -H "Content-Type: application/json" \
  -d '{"type": "runScorecard", "name": "Release 2.4 scorecard", "milestoneIds": [4]}' \
  https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/report

Error Responses

Status CodeDescription
400The report covers no runs: no parameters were given, or no run matches them
400More than one of runIds, milestoneIds and a period
400startDate after endDate
400runComparison without exactly two different runs; tcaseAutomation without startDate, or with a startDate in the future

Update Report

PATCH/api/public/v0/project/{project_id}/report/{report_id}

Renames a report. What it covers and its data can't change; create another report for that.

Path Parameters

  • project_id: The project identifier (can be either the project code or UUID)
  • report_id: The report's ID or sequence number

Request Body

{
  name: string  // New name of the report (1–255 characters)
}

Response

Status: 200 OK

The updated report (see Report Object).

Delete Reports

POST/api/public/v0/project/{project_id}/report/delete

Deletes reports. When one of them doesn't exist, nothing is deleted.

Deleted reports don't go to the trash and can't be restored.

Path Parameters

  • project_id: The project identifier (can be either the project code or UUID)

Request Body

{
  reportIds: string[]  // IDs or sequence numbers of the reports to delete (1–1,000)
}

Response

Status: 200 OK

{
  message: string  // Confirmation message
}

Example Request

curl \
  -H "Authorization: ApiKey your.api.key.here" \
  -H "Content-Type: application/json" \
  -d '{"reportIds": ["3", "1CTd8wPzM_hKz5Pq9EksXGH"]}' \
  https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/report/delete