Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Any endpoint that needs an API key can answer:
- `403` with `"error": "API_KEY_SCOPE"`: the key's access doesn't cover this endpoint, such as a key limited to **Device sessions only** calling `GET /uploads/list`.
- `503` with the message "Could not validate the API key right now": the API couldn't check your key. Retry. It doesn't mean the key is invalid.

The [JUnit report](results.md#download-junit-report) and [HTML report](results.md#download-html-report) downloads answer an error with a `message` only.
The [JUnit report](results.md#download-junit-report) and [HTML report](results.md#download-html-report) downloads, and the [bundle manifests](results.md#download-zips-through-the-cdn), answer an error with a `message` only.

Three endpoints report client errors differently: [`GET /results/:uploadId`](results.md#get-results), [`GET /flows`](flows.md#get-flow-summaries) and [`GET /flows/runs`](flows.md#get-runs-for-a-flow) respond with HTTP `200` and report the error in the body instead:

Expand Down
103 changes: 103 additions & 0 deletions api/results.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ curl https://api.devicecloud.dev/results/7e12345f-eb12-12ec-a30b-bb1234f1d12a/re

## Download HTML report

::: warning
This endpoint is deprecated. We're targeting its removal on **1 March 2027**, subject to change based on usage, and its responses carry `Deprecation` and `Sunset` headers. Use [Download ZIPs through the CDN](#download-zips-through-the-cdn) instead: `report-bundle` gives the same ZIP.
:::

Returns a ZIP containing the HTML report together with the screenshots, videos and logs of every test in an upload (the latest attempt of each). An upload with no results in your team answers HTTP `404`.

```
Expand All @@ -153,6 +157,10 @@ curl https://api.devicecloud.dev/results/7e12345f-eb12-12ec-a30b-bb1234f1d12a/ht

## Download artifacts

::: warning
This endpoint is deprecated. We're targeting its removal on **1 March 2027**, subject to change based on usage, and its responses carry `Deprecation` and `Sunset` headers. Use [Download ZIPs through the CDN](#download-zips-through-the-cdn) instead: `artifacts-bundle` gives the same ZIP and takes the same `results` and `resultId` filters.
:::

Returns a zip file containing logs, screenshots, and videos. Filter to all results or failing only. Each test's files sit in a folder named after its result ID (`<resultId>/logs/`, `<resultId>/screenshots/`, `<resultId>/videos/`), and a merged JUnit `report.xml` covering the whole upload is added at the root — see [Artifact Archive Structure](../artifacts/artifacts.md#artifact-archive-structure).

```
Expand Down Expand Up @@ -185,3 +193,98 @@ curl -X POST https://api.devicecloud.dev/results/7e12345f-eb12-12ec-a30b-bb1234f
-d '{"results": "ALL", "resultId": 4446290}' \
-o artifacts.zip
```

---

## Download ZIPs through the CDN

Gets the artifacts ZIP or the HTML report ZIP from DeviceCloud's CDN, which builds it. It takes two requests: one to the API for a signed manifest, then one to the CDN with that manifest, which answers with the ZIP. The ZIPs have the same layout as the [HTML report](#download-html-report) and [artifacts](#download-artifacts) downloads, which they replace (see [Artifact Archive Structure](../artifacts/artifacts.md#artifact-archive-structure)). The `dcd` CLI downloads them this way: the CDN builds and serves the ZIP, so a large download doesn't have to pass through the API.

### 1. Get a manifest

```
GET /results/:uploadId/artifacts-bundle
GET /results/:uploadId/report-bundle
```

`artifacts-bundle` is for the artifacts ZIP and `report-bundle` for the HTML report ZIP. `artifacts-bundle` takes the same filters as [Download artifacts](#download-artifacts), as query parameters:

| Parameter | Values | Description |
|-----------|--------|-------------|
| `results` | `FAILED`, `ALL` | Which test artifacts to include. Leave it out for `ALL`. |
| `resultId` | A result ID (optional) | Only the files of the flow run this result belongs to: its first attempt and every retry, on that one device. `report.xml` then covers just that run. A value that isn't a positive whole number is a `400`, and a result that isn't in this upload is a `404`. |

**Response**

```json
{
"bundleUrl": "https://cdn.devicecloud.dev/bundle",
"manifest": "{\"version\":1,\"filename\":\"artifacts-failed.zip\",...}",
"sig": "Vb2y0pQ8xJ3kM1nR5tW7zA9cE4fH6iL0oS2uX8dG1qY",
"filename": "artifacts-failed.zip",
"entryCount": 42
}
```

* `bundleUrl` is where to send the manifest. Use it as given rather than hard-coding it.
* `manifest` and `sig` go to the CDN unchanged. Don't parse `manifest`: its contents may change.
* `filename` is a name you can save the ZIP under.
* `entryCount` is how many stored files the ZIP holds, not counting the generated `report.xml` or `report.html`.

A manifest expires an hour after it's issued, so get a new one for each download.

An upload with no results in your team answers HTTP `404`, with only a `message`. An upload with more than 9,000 files answers HTTP `413` with `message`, `entryCount` and `maxEntries`. To download one, ask `artifacts-bundle` for fewer files at a time, with `resultId` or `results=FAILED`.

### 2. Download the ZIP

Send `manifest` and `sig` as JSON to `bundleUrl`. Don't send your API key: the signature is what authorizes the request.

```
POST <bundleUrl>
```

```json
{ "manifest": "<manifest>", "sig": "<sig>" }
```

The answer is the ZIP, streamed as it's built. If a file can't be fetched partway through, the download ends early and leaves a truncated ZIP, so get a new manifest and try again. An error before the ZIP starts comes as plain text: `401` once the manifest has expired, `403` if `manifest` or `sig` doesn't match what the API issued, `400` for a malformed body, and `502` for a temporary problem on our side (retry).

**Example**

```bash
curl "https://api.devicecloud.dev/results/7e12345f-eb12-12ec-a30b-bb1234f1d12a/artifacts-bundle?results=FAILED" \
-H "x-app-api-key: <key>" \
-o bundle.json

jq '{manifest, sig}' bundle.json | curl -X POST "$(jq -r .bundleUrl bundle.json)" \
-H "Content-Type: application/json" \
--data-binary @- \
-o artifacts.zip
```

The same in Python, with only the standard library:

```python
import json
import shutil
import urllib.request

upload_id = "7e12345f-eb12-12ec-a30b-bb1234f1d12a"
manifest_request = urllib.request.Request(
f"https://api.devicecloud.dev/results/{upload_id}/artifacts-bundle?results=FAILED",
headers={"x-app-api-key": "<key>"},
)
with urllib.request.urlopen(manifest_request) as response:
bundle = json.load(response)

zip_request = urllib.request.Request(
bundle["bundleUrl"],
data=json.dumps({"manifest": bundle["manifest"], "sig": bundle["sig"]}).encode(),
headers={"Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(zip_request) as response, open("artifacts.zip", "wb") as out:
shutil.copyfileobj(response, out)
```

For the HTML report, request `report-bundle` instead of `artifacts-bundle`, with no query parameters.
5 changes: 3 additions & 2 deletions getting-started/deprecations.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
description: "The devices, OS versions, Maestro versions, report formats and runner types DeviceCloud is retiring, when, and what to move to, plus what was removed recently."
description: "The devices, OS versions, Maestro versions, report formats, runner types and API endpoints DeviceCloud is retiring, when, and what to move to, plus what was removed recently."
---

# Deprecations & Removals

Before we remove a device, an OS version, a Maestro version, a report format or a runner type, we mark it as deprecated and set a target date for its removal. This page lists what's deprecated now, and what was removed recently.
Before we remove a device, an OS version, a Maestro version, a report format, a runner type or an API endpoint, we mark it as deprecated and set a target date for its removal. This page lists what's deprecated now, and what was removed recently.

## Upcoming

Expand All @@ -17,6 +17,7 @@ Removal dates are targets, subject to change based on usage.
| Pixel 7 (`pixel-7`) | Android device | 14 December 2026 | `pixel-8` or `pixel-10` (`pixel-6` for API level 33). On Google Play, `pixel-8` keeps API level 34 |
| Maestro 2.2.0 | Maestro version | 14 December 2026 | 2.6.1 or newer |
| Google Play on `cpu1` | Runner type change | 14 December 2026 | Nothing: Google Play runs move to `m1` on their own. Test your app on `m1` first, see [Moving to Apple Silicon](../configuration/google-play-apis.md#moving-to-apple-silicon-m1) |
| `GET /results/:uploadId/html-report` and `POST /results/:uploadId/download` | REST API endpoints | 1 March 2027 | `report-bundle` and `artifacts-bundle`, see [Download ZIPs through the CDN](../api/results.md#download-zips-through-the-cdn). The `dcd` CLI already uses them |

`dcd live` is deprecated too, with no removal date set. Use [`dcd device`](../cli/dcd-device.md) instead.

Expand Down
Loading
Loading