# Export Run

Launch stage: GA

`GET /api/2.2/jobs/runs/export`

Export and retrieve the job run task.

API scopes: jobs

## Query parameters

- `run_id` (int64, optional)
  The canonical identifier for the run. This field is required.
  Example: `455644833`
- `views_to_export` (string, optional)
  Which views to export (CODE, DASHBOARDS, or ALL). Defaults to CODE.
  Possible values: `CODE`, `DASHBOARDS`, `ALL`
  Default: `CODE`

## Returns

- `views` (array of object, optional)
  The exported content in HTML format (one for every view item). To extract the HTML notebook from the JSON response, download and run this [Python script](https://docs.databricks.com/_static/examples/extract.py).
  - `content` (string, optional)
    Content of the view.
  - `name` (string, optional)
    Name of the view item. In the case of code view, it would be the notebook’s name. In the case of dashboard view, it would be the dashboard’s name.
  - `type` (string, optional)
    Type of the view item.
    Possible values: `NOTEBOOK`, `DASHBOARD`

## Response

```json
{
  "views": [
    {
      "content": "string",
      "name": "string",
      "type": "string"
    }
  ]
}
```

