> OctoPerf load testing - REST API changes between versions 17.0.1 and 17.1.0, and how to update your own integrations.

Source: https://api.octoperf.com/doc/api-changes-17.1/

# REST API changes: 17.0.1 to 17.1.0

This page lists the changes to the OctoPerf REST API between `17.0.1` and
`17.1.0`. It is written for the people who call the API directly - CI/CD
pipelines, custom reporting jobs, in-house dashboards. If you only use the web
interface or the [MCP server](https://api.octoperf.com/doc/mcp/), you have nothing to do: both were
updated with the platform.

If you are upgrading from `17.0.0` or earlier, read
[REST API changes: 17.0.0 to 17.0.1](https://api.octoperf.com/doc/api-changes-17.0.1/) first, then this page.

**No route was renamed and no parameter changed.** One change may require an
update on your side: polling a task result now ends with a `404` when the task
is unknown or expired. Everything else is either additive or a more consistent
behavior.

---

## 1. TL;DR: what changes

| # | Change                                                                                                   | Impact                                        |
|---|----------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| 1 | `GET /tasks/{id}/result` answers `404` for an unknown or expired task, and a result can be read again     | **Update your polling loop**: stop on `404`   |
| 2 | Stopping a test that is no longer running returns it unchanged                                          | The test keeps its final state                |
| 3 | The default workspace is created at login                                                               | A user who never logged in has no workspace   |
| 4 | New `GET /analysis/bench-infos/design-virtual-users/{benchReportId}`                                    | Additive                                      |
| 5 | New `GET /analysis/bench-reports/pdf/zip`                                                               | Additive                                      |
| 6 | `PrintReportTask`: `config` and `type` become optional; its result gains `benchReportId` and `benchResultId` | Additive                                  |
| 7 | `BenchResult` gains `endDate`                                                                           | Additive                                      |
| 8 | `CorrelationTask` gains `correlationRuleIds`                                                            | Additive                                      |
| 9 | `ReportItemMetric.configs` accepts an `AxisReportConfig`                                                | Additive                                      |

---

## 2. `GET /tasks/{id}/result`: `404` and a result that can be read again

Long operations - a JTL import, a PDF export, a correlation - run as tasks: you
submit the task, get its id, then poll its result.

- A task **still running** answers `200` with an empty body, as before.
- A **finished** task answers `200` with its result.
- An **unknown or expired** task id now answers **`404`**, instead of `200` with
  an empty body.
- Reading a result **no longer consumes it**: you can read it again, for example
  after a network error.
- A result is kept **24 hours after the task was submitted**. On-premise, this
  duration is set by the `task.result.ttl-hours` property.

**What to do.** A polling loop that waits for a non-empty body must also stop on
`404`. Otherwise, it waits forever for a task that no longer exists:

```sh
while true; do
  code=$(curl -s -o result.json -w "%{http_code}" \
    -H "Authorization: Bearer ${TOKEN}" \
    "https://api.octoperf.com/tasks/${TASK_ID}/result")
  if [ "$code" = "404" ]; then echo "Unknown or expired task"; exit 1; fi
  if [ -s result.json ]; then break; fi
  sleep 5
done
```

## 3. Stopping a test that is no longer running

Stopping a bench result that is no longer running now returns it unchanged. A
finished test keeps its final state, instead of switching to `ABORTED`.

## 4. Default workspace

Listing the workspaces of a user no longer creates a default workspace when the
user has none. The default workspace is created when the user logs in.

If your integration creates users and lists their workspaces before they ever
logged in, expect an empty list.

## 5. Additive changes

### 5.1 Design Virtual Users of a report

```
GET /analysis/bench-infos/design-virtual-users/{benchReportId}

→ 200 [ { "virtualUserId": "…", "projectId": "…" } ]
```

For each Virtual User root of the report tree, the design Virtual User it was
copied from, and its project. Use it to go from a report back to the Virtual
User to edit.

### 5.2 Download several PDF reports at once

```
GET /analysis/bench-reports/pdf/zip?benchReportIds=<id1>,<id2>

→ 200 a zip of the PDFs already printed for these reports
→ 404 when none of these reports has a printed PDF
```

### 5.3 `PrintReportTask` and its result

- `config` and `type` become optional. Without them, the report's own export
  settings are used.
- `PrintReportTaskResult` gains `benchReportId` and `benchResultId`, so you know
  which report and which test the PDF belongs to.

### 5.4 `BenchResult.endDate`

A bench result gains `endDate`, the date the test ended. Treat it as optional:
it is absent while the test is running.

### 5.5 `CorrelationTask.correlationRuleIds`

A correlation task accepts `correlationRuleIds`, the ids of the correlation
rules to apply. When it is absent, every rule applies, as before.

### 5.6 `AxisReportConfig`

`ReportItemMetric.configs` accepts a new config, the Y axis setting of a curve:

```json
{ "@type": "AxisReportConfig", "scale": "LINEAR", "dedicated": false }
```

- `scale` is `LINEAR` or `LOGARITHMIC`, `LINEAR` when absent.
- `dedicated` puts the curve on an axis of its own, `false` when absent.
- Without this config, the curve stays on the shared axis of its unit, in linear
  scale.

See [Axes](https://api.octoperf.com/doc/analysis/edit-bench-report/metrics-selection/#axes) for what it
does on the chart.

---

## 6. Migration checklist

1. Stop polling `GET /tasks/{id}/result` on `404` (§2).

---

## 7. Related documentation

- [Release Notes](https://api.octoperf.com/doc/release-notes/) - the full list of changes shipped in each version
- [REST API changes: 17.0.0 to 17.0.1](https://api.octoperf.com/doc/api-changes-17.0.1/) - read this first if you are upgrading from `17.0.0` or earlier
- [Rest API](https://api.octoperf.com/doc/runtime/edit-scenario/integrations-automation/ci-cd/rest/) - how to authenticate and start a test from your pipeline
- [MCP Server](https://api.octoperf.com/doc/mcp/) - drive OctoPerf from an AI agent instead of calling the API yourself
- [Upgrading Version](https://api.octoperf.com/doc/on-premise-infra/upgrade/) - upgrading a self-hosted installation
