---
title: "Start an asynchronous catalog export"
method: POST
path: "/exports"
tags: ["Exports"]
---

# Start an asynchronous catalog export

`POST /exports`

## Request

- Base URL: `https://codeatlas.com.br/api/v1`
- URL: `https://codeatlas.com.br/api/v1/exports`
- Auth: OAuth 2 (client credentials, token URL `https://codeatlas.com.br/oauth2/token`, scopes: `api:write`)

Starts a job that renders the service catalog as jsonl, csv or md. Answers 202 with a Location header. Poll the Location URL until status is succeeded, then GET data.download_url. status moves queued, running, succeeded. Jobs and files are kept for 24 hours and are visible only to the OAuth client that created them. Honors Idempotency-Key. Limit: 10 per hour per OAuth client.

## Headers

- `Idempotency-Key` string

## Request body

- ExportRequest
  - `format` 'jsonl' | 'csv' | 'md', required

## Response `202`

The job was accepted.

- ExportResponse
  - `data` object, required
    - `id` string, required
    - `status` 'queued' | 'running' | 'succeeded', required
    - `format` 'jsonl' | 'csv' | 'md', required
    - `download_url` string, uri, nullable, required: Set when status is succeeded.
    - `created_at` string, date-time, required
    - `expires_at` string, date-time, required

## Other responses

- `400`: The request is malformed: invalid query parameter, invalid JSON or invalid Idempotency-Key.
- `401`: Missing, malformed, expired or wrong-audience Bearer token. WWW-Authenticate carries the resource metadata URL.
- `403`: The token lacks the api:write scope.
- `405`: The HTTP method is not supported.
- `413`: The body is larger than 16384 bytes.
- `415`: The body must be application/json.
- `422`: A field failed validation, or the Idempotency-Key was reused with a different body.
- `429`: Rate limit exceeded. Wait Retry-After seconds.
- `default`: Unexpected error. Same shape as every other error.

---

[API](https://skmtc.dev/codeatlas/apis/codeatlas-public-api.md) · [All operations](https://skmtc.dev/codeatlas/apis/codeatlas-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codeatlas/apis/codeatlas-public-api/revisions/fdb5ace63542?raw)
