---
title: Lista poruka uređaja
method: GET
weight: 2
section: 'Basics'
---

import {
  EndpointHeader,
  ParamField,
  ParamFields,
  CodeGroup,
  RequestExample,
  ResponseExample,
} from '@/components/api';

<EndpointHeader method="GET" path="/api/v1/message_equipment_types" />

Vraća po stranicama listu poruka (kodova događaja i grešaka) vezanih za tipove mernih uređaja i tipove arhiva.

<ParamFields title="Parametri upita">
  <ParamField name="id" type="integer">
    Identifikator mernog mesta. Opciono.
  </ParamField>
  <ParamField name="equipment_type_id" type="integer">
    Identifikator tipa mernog uređaja. Opciono (filtriranje po tipu opreme).
  </ParamField>
  <ParamField name="archive_type_id" type="integer">
    Identifikator tipa arhive. Opciono (filtriranje po tipu arhive).
  </ParamField>
  <ParamField name="page" type="integer">
    Broj stranice.
  </ParamField>
  <ParamField name="per_page" type="integer">
    Broj zapisa po stranici (podrazumevanu vrednost određuje sistem).
  </ParamField>
</ParamFields>

## Polja odgovora

| Atribut                              | Opis                                                                                 |
| ------------------------------------ | ------------------------------------------------------------------------------------ |
| `id`                                 | Identifikator (jedinstveni ključ) poruke u sistemu                                   |
| `name`                               | Naziv poruke                                                                         |
| `description`                        | Opis poruke                                                                          |
| `device_code`                        | Kod poruke uređaja                                                                   |
| `equipment_type_id`                  | Identifikator tipa konfiguracije mernog uređaja (ključ tipa konfiguracije korektora) |
| `equipment_type_varname`             | Jedinstveni tekstualni identifikator tipa konfiguracije mernog uređaja               |
| `referenceparameter_archive_type_id` | Identifikator tipa arhive                                                            |
| `archive_type_varname`               | Jedinstveni tekstualni identifikator tipa arhive                                     |
| `message_typical_id`                 | Identifikator tipske poruke                                                          |
| `channel_id`                         | Identifikator (jedinstveni ključ) kanala; `null` ako poruka nije vezana za kanal     |
| `channel_varname`                    | Tekstualni identifikator kanala; `null` ako poruka nije vezana za kanal              |
| `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/message_equipment_types?equipment_type_id=11&page=1"
```

    </Fragment>
    <Fragment slot="panel-1">

```js
const res = await fetch(
  'https://api.vadsro.eu/api/v1/message_equipment_types?equipment_type_id=11&page=1',
  {
    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/message_equipment_types",
    params={"equipment_type_id": 11, "page": 1},
    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/message_equipment_types?equipment_type_id=11&page=1", 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/message_equipment_types?equipment_type_id=11&page=1");
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": 1,
      "name": "Accumulated volume",
      "description": "Scheduled communication",
      "device_code": "0",
      "equipment_type_id": 11,
      "equipment_type_varname": "EK-270",
      "referenceparameter_archive_type_id": 25,
      "archive_type_varname": "nesht",
      "message_typical_id": 2,
      "channel_id": null,
      "channel_varname": null
    }
  ],
  "total_pages": 5,
  "current_page": 1,
  "next_page": 2
}
```

</ResponseExample>
