---
title: Zoznam reportov
project: OpenReports
version: 1.0
section: reference
language: sk
license: MIT
url: https://totaljs.es/docs/sk/openreports/1-0/reference/api-list-reports/
updated: 2026-11-19T07:46:46.798Z
---

# Zoznam reportov

> GET /reports/ vráti reporty s ich poliami a dynamickými filtrami.

Vráti každý report s jeho poliami, dynamickými filtrami a nastaveniami grafu. Najprv [zapni API](../../guides/enable-api/).

## Požiadavka

```bash
curl -H "x-token: YOUR_TOKEN" http://localhost:8000/reports/
```

Token môžeš poslať aj ako `?token=YOUR_TOKEN`.

## Odpoveď

```json
[
	{
		"id": "JapOn71ca61f",
		"name": "Orders by country and period",
		"category": "",
		"filter": [
			{ "id": "xfu9n6e", "type": "=", "value": "{Country}", "name": "Country", "datatype": "string" },
			{ "id": "xg41zyw", "type": "between", "value": "{From}; {To}", "name": "Created", "datatype": "date" }
		],
		"fields": [
			{ "id": "xa0wfry", "name": "Customer", "datatype": "string" },
			{ "id": "total", "name": "Total", "datatype": "number" }
		],
		"chart": false
	},
	{
		"id": "JapNSY1c161f",
		"name": "Sales by product",
		"category": "Sales",
		"filter": [],
		"fields": [
			{ "id": "x1twuy9b", "name": "Product", "datatype": "string" },
			{ "id": "total", "type": "sum", "name": "Total", "datatype": "number" }
		],
		"chart": true,
		"x": "x1twuy9b",
		"y": "total",
		"series": ""
	}
]
```

| Kľúč | Význam |
|---|---|
| `id` | ID reportu. Použi ho na [načítanie reportu](../api-load-report/). |
| `name`, `category` | Ako vo formulári reportu. |
| `fields` | Polia reportu: `id`, `name`, `datatype` (typ v pohľade) a `type` (operácia, ak nejaká je). |
| `filter` | Len [dynamické filtre](../../guides/dynamic-filters/), ktorých hodnoty posielaš pri načítaní reportu. |
| `chart` | `true`, ak má report [nastavenia grafu](../../guides/chart-settings/). Potom `x`, `y` a `series` obsahujú ID zvolených polí. |

Po vytvorení alebo zmene pohľadu reštartuj OpenReports, aby tento zoznam ukazoval polia a filtre reportov, ktoré ho používajú.
