Seznam průzkumů
Získejte seznam všech průzkumů přístupných vašemu týmu.
GET
https://api.sentisnap.com/v1/surveys
Autentizace
Vyžaduje API klíč s oprávněním surveys:read.
Query parametry
| Parametr | Typ | Povinný | Popis |
|---|---|---|---|
page | integer | Ne | Page number (default: 1) |
per_page | integer | Ne | Number of surveys per page (default: 50, max: 100) |
Odpověď
{
"data": [
{
"id": "019abc12-3456-7890-abcd-ef1234567890",
"name": "Customer Satisfaction Survey",
"slug": "customer-satisfaction-survey-abc123",
"status": "published",
"response_count": 1250,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:22:00Z",
"published_at": "2024-01-16T09:00:00Z"
}
],
"meta": {
"page": 1,
"per_page": 50,
"total": 12,
"total_pages": 1
},
"links": {
"self": "/v1/surveys?page=1",
"next": null,
"prev": null
}
}Pole odpovědi
| Pole | Typ | Popis |
|---|---|---|
id | string | Unikátní identifikátor průzkumu (UUID) |
name | string | Název průzkumu |
slug | string | URL-friendly identifikátor |
status | string | Stav průzkumu: draft, published, closed |
response_count | integer | Celkový počet odpovědí |
created_at | string | Časové razítko vytvoření (ISO 8601) |
updated_at | string | Časové razítko poslední aktualizace (ISO 8601) |
published_at | string | Časové razítko publikace (null pokud nepublikováno) |
Příklad
curl -X GET "https://public-api.sentisnap.com/v1/surveys?page=1&per_page=10" \
-H "Authorization: Bearer sk_live_..."Chyby
| Kód | Popis |
|---|---|
401 | Neplatný API klíč |
403 | Nedostatečné oprávnění (vyžaduje surveys:read) |