Source: https://databento.com/docs/api-historical/batch/batch-list-files



### Historical.batch.list\_files

List files for a batch job.

This will include all data files and [support files](https://databento.com/docs/portal/download-center.md#support-files).

Related: [Download center]($PLATFORM_HOSTNAME/portal/download-center).

#### API method

```python
Historical.batch.list_files(
    job_id: str,
) -> list[dict[str, Any]]
```

#### Parameters

| Parameter | Type | Required | Description |
| `job_id` | str | required | The batch job identifier. |

#### Returns

`list[dict[str, Any]]`

The file details for the batch job.

| Field | Type | Description |
| `filename` | str | The file name. |
| `size` | int | The size of the file in bytes. |
| `hash` | str | The SHA256 hash of the file. |
| `urls` | dict | A map of download protocol to URL. |

#### Example usage

```python
import databento as db

client = db.Historical("$YOUR_API_KEY")

files = client.batch.list_files(job_id="GLBX-20220610-5DEFXVTMSM")
print(files)
```
#### Example response

```plaintext
[
    {
        "filename": "metadata.json",
        "size": 1102,
        "hash": "sha256:0168d53e1705b69b1d6407f10bb3ab48aac492fa0f68f863cc9b092931cc67a7",
        "urls": {
            "https": "https://api.databento.com/v0/batch/download/46PCMCVF/GLBX-20230203-WF9WJYSCDU/metadata.json",
            "ftp": "ftp://ftp.databento.com/46PCMCVF/GLBX-20230203-WF9WJYSCDU/metadata.json",
        }
    },
    {
        "filename": "glbx-mdp3-20220610.mbo.csv.zst",
        "size": 21832,
        "hash": "sha256:1218930af153b4953632216044ef87607afa467fc7ab7fbb1f031fceacf9d52a",
        "urls": {
            "https": "https://api.databento.com/v0/batch/download/46PCMCVF/GLBX-20230203-WF9WJYSCDU/glbx-mdp3-20220610.mbo.csv.zst",
            "ftp": "ftp://ftp.databento.com/46PCMCVF/GLBX-20230203-WF9WJYSCDU/glbx-mdp3-20220610.mbo.csv.zst",
        }
    }
]
```
