> ## Documentation Index
> Fetch the complete documentation index at: https://collabase.ch/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Collabase documentation. Interface labels are quoted in English, as they appear in the product.
> Features marked Enterprise need the Collabase Enterprise Edition licence.

# Import report

> Send a JUnit XML or Playwright JSON report from your pipeline.

Sends one report, or one shard of a report, of a CI build. See [CI imports](https://collabase.ch/docs/test-management/imports.md) for how tests are matched to cases.

> [!NOTE]
>
> The token needs the `tests:write` scope. The body can be gzipped when you send `Content-Encoding: gzip`. It can be up to 20 MB.

## Path parameters

**projectId** `string` *required*

The ID of the test project.

## Query parameters

**buildId** `string` *required*

Names the build. All shards of one build use the same value.

**shard** `number` (default: 1)

The number of this shard.

**shardCount** `number` (default: 1)

How many shards the build has.

**format** `string`

`JUNIT` or `PLAYWRIGHT_JSON`. Detected from the content when omitted.

**cycleId** `string`

The cycle that receives the results. Without it a cycle is created for the build.

**releaseId** `string`

The release the cycle belongs to.

**commit** `string`

The commit the build tested.

## Response

Returns the import with its state and counts. A new shard answers `201`. The same shard with the same content answers `200` with the stored import, so a retry is safe.

```bash cURL theme={"dark"}
curl -X POST "https://your-collabase.ch/api/v1/test-management/projects/tpr_abc123/imports?buildId=4711&shard=1&shardCount=2" \
  -H "Authorization: Bearer cb_xYz123ABCD..." \
  -H "Content-Type: application/xml" \
  --data-binary @results.xml
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.