---
title: "Export BRZ"
section: "API Reference"
route: /apiexportbrz
account: {accountId}
bruce_api: https://{accountId}.api.nextspace.host
guardian_api: https://guardian.nextspace.host
---
# Export BRZ

You can mimic the export to BRZ functionality you see in Navigator by making your own export process for assemblies.

You'll need to know a `RootEntity.ID` value.

## Export

We recommend running at most two export jobs at a time.

### Export BRZ

```http
POST https://{accountId}.api.nextspace.host/export
```

**Requires:**

- Account ID: Account ID must be specified in the subdomain of the request url.
- Power user auth token: A token for an active power user session on the account, sent as "Authorization: Bearer <token>".

| Parameter | In | Required | Description |
| --- | --- | --- | --- |
| `{accountId}` | path | yes | The account id of the account to perform the request on. |

**Request body**

```typescript
interface IPostBody {
    "Type": "BRZ";
    "RootEntity.ID": string;
}
```

**Example request body**

```json
{
    "Type": "BRZ",
    "RootEntity.ID": "abc"
}
```

**Response**

```typescript
interface IResponse {
    "PendingActionID": number;
}
```

**Javascript example**

```javascript
const url = "https://{accountId}.api.nextspace.host/export";
const method = "post";
const token = "your-token";
const body = {
    "Type": "BRZ",
    "RootEntity.ID": "abc"
};

async function doRequest(type, url, body, token) {
    const headers = {
        "Authorization": `Bearer ${token}`,
        "Content-Type": "application/json"
    };
    const options = {
        method: type,
        headers: headers,
        body: body ? JSON.stringify(body) : null
    };
    const res = await fetch(url, options);
    const json = await res.json();
    return json;
}

doRequest(method, url, body, token).then((res) => {
    console.log(res);
}).catch((err) => {
    console.error(err);
});
```

When the Pending Action is marked as completed, here is the result to expect:

```typescript
interface IResult {
    // ID of the generated temp file.
    // To create a download URL, use your API base url with "/tempfile/{ID}" as the path.
    "TempFile.ID": string;
}
```

---

Urls on this page are resolved for account `{accountId}`.
Site index: https://docs.nextspace.host/llms.txt · whole site in one file: https://docs.nextspace.host/llms-full.txt
Human-readable version of this page: https://docs.nextspace.host/apiexportbrz
