---
title: Lista komunikacionih sesija
method: GET
weight: 1
section: 'Basics'
---

import {
  EndpointHeader,
  ParamField,
  ParamFields,
  CodeGroup,
  RequestExample,
  ResponseExample,
} from '@/components/api';

<EndpointHeader method="GET" path="/api/v1/seances" />

Vraća listu komunikacionih sesija telemetrijskih modula po stranicama, uz opciono filtriranje po modulu i vremenskom intervalu.

<ParamFields title="Parametri upita">
  <ParamField name="telemetry_id" type="integer">
    Identifikator telemetrijskog modula. Opciono – sužava skup rezultata.
  </ParamField>
  <ParamField name="fp_start" type="string">
    Početak vremenskog intervala u formatu `yyyy-mm-dd`. Opciono.
  </ParamField>
  <ParamField name="fp_end" type="string">
    Kraj vremenskog intervala u formatu `yyyy-mm-dd`. Opciono.
  </ParamField>
  <ParamField name="page" type="integer">
    Broj stranice.
  </ParamField>
</ParamFields>

## Polja odgovora

| Atribut                               | Opis                                                                                |
| ------------------------------------- | ----------------------------------------------------------------------------------- |
| `id`                                  | Identifikator (jedinstveni ključ) komunikacione sesije u sistemu                    |
| `telemetry_id`                        | Identifikator (jedinstveni ključ) telemetrijskog modula u sistemu                   |
| `event_time`                          | Datum i vreme komunikacione sesije u formatu UTC                                    |
| `Evtid`                               | Kod razloga komunikacione sesije                                                    |
| `Trycnt`                              | Broj ponovnih pokušaja                                                              |
| `Tryfl`                               | Kod ponovnog pokušaja                                                               |
| `state`                               | Status komunikacione sesije                                                         |
| `Btm`                                 | Napunjenost telemetrijske baterije                                                  |
| `Rssi`                                | Nivo signala (RSSI)                                                                 |
| `Bsg`                                 | Napunjenost metrološke baterije                                                     |
| `gettime`                             | Zahtev za tačno vreme servera                                                       |
| `next_session_time`                   | Vreme sledeće komunikacione sesije po rasporedu                                     |
| `referenceparameter_seance_status_id` | Identifikator statusa komunikacione sesije u sistemu                                |
| `duration_session`                    | Trajanje komunikacione sesije                                                       |
| `session_traffic`                     | Obim saobraćaja                                                                     |
| `millisecond`                         | Milisekunde                                                                         |
| `data`                                | Niz vraćenih podataka                                                               |
| `total_pages`                         | Ukupan broj stranica u vraćenom skupu                                               |
| `current_page`                        | Trenutna stranica                                                                   |
| `next_page`                           | Sledeća stranica dostupna za preuzimanje; `null` ako je trenutna stranica poslednja |

<RequestExample>
  <CodeGroup labels={["curl", "Node", "Python", "Go", "PHP"]}>
    <Fragment slot="panel-0">

```bash
curl -i \
  --header "access-token: *********************" \
  --header "token-type: Bearer" \
  --header "client: **********************" \
  --header "uid: api-user@example.com" \
  --header "Content-Type: application/json" \
  --request GET \
  "https://api.vadsro.eu/api/v1/seances?telemetry_id=1111&fp_start=2021-11-02&fp_end=2021-11-30&page=2"
```

    </Fragment>
    <Fragment slot="panel-1">

```js
const res = await fetch(
  'https://api.vadsro.eu/api/v1/seances?telemetry_id=1111&fp_start=2021-11-02&fp_end=2021-11-30&page=2',
  {
    headers: {
      'access-token': '*********************',
      'token-type': 'Bearer',
      client: '**********************',
      uid: 'api-user@example.com',
      'Content-Type': 'application/json',
    },
  },
);
const data = await res.json();
```

    </Fragment>
    <Fragment slot="panel-2">

```python
import requests

res = requests.get(
    "https://api.vadsro.eu/api/v1/seances",
    params={
        "telemetry_id": 1111,
        "fp_start": "2021-11-02",
        "fp_end": "2021-11-30",
        "page": 2,
    },
    headers={
        "access-token": "*********************",
        "token-type": "Bearer",
        "client": "**********************",
        "uid": "api-user@example.com",
        "Content-Type": "application/json",
    },
)
data = res.json()
```

    </Fragment>
    <Fragment slot="panel-3">

```go
req, _ := http.NewRequest("GET", "https://api.vadsro.eu/api/v1/seances?telemetry_id=1111&fp_start=2021-11-02&fp_end=2021-11-30&page=2", nil)
req.Header.Set("access-token", "*********************")
req.Header.Set("token-type", "Bearer")
req.Header.Set("client", "**********************")
req.Header.Set("uid", "api-user@example.com")
req.Header.Set("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)
```

    </Fragment>
    <Fragment slot="panel-4">

```php
$ch = curl_init("https://api.vadsro.eu/api/v1/seances?telemetry_id=1111&fp_start=2021-11-02&fp_end=2021-11-30&page=2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "access-token: *********************",
    "token-type: Bearer",
    "client: **********************",
    "uid: api-user@example.com",
    "Content-Type: application/json",
]);
$data = json_decode(curl_exec($ch), true);
```

    </Fragment>

  </CodeGroup>
</RequestExample>

<ResponseExample>

```json
{
  "data": [
    {
      "id": 303481,
      "telemetry_id": 1111,
      "event_time": 1636202160,
      "Evtid": null,
      "Trycnt": null,
      "Tryfl": null,
      "state": 0,
      "Btm": 3900,
      "Rssi": 23,
      "Bsg": null,
      "gettime": true,
      "next_session_time": 1636204200,
      "referenceparameter_seance_status_id": 99,
      "duration_session": null,
      "session_traffic": null,
      "millisecond": null
    }
  ],
  "total_pages": 2,
  "current_page": 1,
  "next_page": 2
}
```

</ResponseExample>
