1. Opis działania RESThooka


RESThook w Webankieta.pl pozwala na automatyczne przesyłanie danych ankietowych po wypełnieniu ankiety. Po każdym wypełnieniu, dane z ankiety zostaną przesłane w formacie JSON na zdefiniowany przez użytkownika adres URL.

Przykładowa odpowiedź

{
   "data": {
   "sheets": [
    {
        "meta": {
            "id": 89595094,
            "surveyId": 347232,
            "startDate": "2021-05-26 11:01:01",
            "endDate": "2021-05-26 11:07:14",
            "lastRespondentInteractionDate": "2023-07-03 11:28:03",
            "email": "[email protected]",
            "respondentId": 7548,
            "token": "84CFd0",
            "finished": true,
            "externalKey": "",
            "ip": "213.222.209.195",
            "referer": "https://www.webankieta.pl/ankieta/token/id/424938/demo-single-sheets.html"
            "personalDataChecked": true, 
            "labels": [ 
                { 
                   "id": 1, 
                   "name": "Zawód",
                   "value": "Programista" 
                }, 
                { 
                   "id": 2, 
                   "name": "Wykształcenie", 
                   "value": "Wyższe" 
                } 
             ],
             "tags": [ 
                { 
                   "id": 11452, 
                   "sentiment": "positive", 
                   "weight": 1 
                }, 
                { 
                   "id": 11454, 
                   "sentiment": "none", 
                   "weight": null 
                } 
              ] 
        },
        "time": {
            "real": "00:06:13",
            "total": "00:06:13",
            "pages": [
                {
                    "id": 1539098,
                    "time": 373
                }
            ]
        },
        "questions": [
            {
                "id": 5255742,
                "content": "Jednokrotne",
                "answer": {
                    "id": 1,
                    "content": "a",
                    "additional": "własna odpowiedź"
                }
            },
            {
                "id": 5255744,
                "content": "Wielokrotne",
                "answers": [
                    {
                        "id": 1,
                        "content": "a",
                        "additional": "własna odpowiedź"
                    },
                    {
                        "id": 2,
                        "content": "b",
                        "additional": null
                    },
                    {
                        "id": 3,
                        "content": "c",
                        "additional": null
                    }
                ]
            },
            {
                "id": 5255746,
                "content": "Otwarte",
                "answers": [
                    {
                        "value": "otwarte 1"
                    },
                    {
                        "value": "otwarte 2"
                    }
                ]
            },
            {
                "id": 5255748,
                "content": "NPS",
                "answer": {
                    "id": 7,
                    "content": "6",
                    "additional": "Uzasadnienie"
                }
            },
            {
                "id": 5255750,
                "content": "Ocena/Macierz ocen",
                "answers": [
                    {
                        "id": 1,
                        "rating": 2,
                        "content": "a",
                        "additional": "Uzasadnienie",
                        "reason": null
                    },
                    {
                        "id": 2,
                        "rating": 3,
                        "content": "b",
                        "additional": null,
                        "reason": null
                    },
                    {
                        "id": 3,
                        "rating": 4,
                        "content": "c",
                        "additional": null,
                        "reason": null
                    }
                ]
            },
            {
                "id": 5255752,
                "content": "Macierzowe jednokrotne",
                "answers": [
                    {
                        "id": 1,
                        "content": "wiersz 1",
                        "column": {
                            "id": 1,
                            "content": "kolumna 1"
                        },
                        "additional": "w1",
                        "reason": "w1k1"
                    },
                    {
                        "id": 2,
                        "content": "wiersz 2",
                        "column": {
                            "id": 2,
                            "content": "kolumna 2"
                        },
                        "additional": null,
                        "reason": null
                    },
                    {
                        "id": 3,
                        "content": "wiersz 3",
                        "column": {
                            "id": 3,
                            "content": "kolumna 3"
                        },
                        "additional": null,
                        "reason": null
                    }
                ]
            },
            {
                "id": 5255754,
                "content": "Macierzowe wielokrotne",
                "answers": [
                    {
                        "id": 1,
                        "content": "w1",
                        "columns": [
                            {
                                "column": "1",
                                "content": "k1"
                            },
                            {
                                "column": "2",
                                "content": "k2"
                            }
                        ],
                        "additional": "w1 uzasadnienie"
                    },
                    {
                        "id": 2,
                        "content": "w2",
                        "columns": [
                            {
                                "column": "2",
                                "content": "k2"
                            }
                        ],
                        "additional": "w2 uzasadnienie"
                    },
                    {
                        "id": 3,
                        "content": "w3",
                        "columns": [
                            {
                                "column": "3",
                                "content": "k3"
                            }
                        ],
                        "additional": null
                    }
                ]
            },
            {
                "id": 5255758,
                "content": "Macierzowe otwarte",
                "answers": [
                    {
                        "id": 1,
                        "content": "w1",
                        "columns": [
                            {
                                "column": "1",
                                "content": "k1",
                                "answer": "w1k2"
                            },
                            {
                                "column": "2",
                                "content": "k2",
                                "answer": "w1k1"
                            }
                        ]
                    },
                    {
                        "id": 2,
                        "content": "w2",
                        "columns": [
                            {
                                "column": "1",
                                "content": "k1",
                                "answer": "w2k1"
                            },
                            {
                                "column": "2",
                                "content": "k2",
                                "answer": "w2k2"
                            }
                        ]
                    }
                ]
            },
            {
                "id": 5255760,
                "content": "Suwak",
                "type": "slider", 
                "answers": [ 
                    { 
                        "id": 21, 
                        "leftPositionContent": "tekst po lewej", 
                        "rightPositionContent": "tekst po prawej", 
                        "rowId": 1 
                    }, 
                    { 
                        "id": 4, 
                        "leftPositionContent": "tekst po lewej 2", 
                        "rightPositionContent": "tekst po prawej 2", 
                        "rowId": 2 
                    }, 
                    { 
                        "id": 18, 
                        "leftPositionContent": "tekst po lewej 3", 
                        "rightPositionContent": "tekst po prawej 3", 
                        "rowId": 3
                    } 
               ] 
            },
            {
                "id": 5255762,
                "content": "Formularz",
                "answers": [
                    {
                        "id": "1",
                        "content": "odpowiedz 1",
                        "value": "odp1"
                    },
                    {
                        "id": "2",
                        "content": "odpowiedz 2",
                        "value": "odp2"
                    }
                ]
            },
            {
                "questionId": 5255764,
                "content": "Lista rozwijana",
                "answer": {
                    "id": 2,
                    "content": "b"
                }
            },
            {
                "id": 5255766,
                "content": "przeciągnij i upuść",
                "answers": [
                    {
                        "id": 1,
                        "content": "a",
                        "group": 1,
                        "groupContent": "samogłoski"
                    },
                    {
                        "id": 2,
                        "content": "b",
                        "group": 2,
                        "groupContent": "spółgłoski"
                    },
                    {
                        "id": 3,
                        "content": "c",
                        "group": 2,
                        "groupContent": "spółgłoski"
                    },
                    {
                        "id": 4,
                        "content": "d",
                        "group": 2,
                        "groupContent": "spółgłoski"
                    },
                    {
                        "id": 5,
                        "content": "f",
                        "group": 2,
                        "groupContent": "spółgłoski"
                    }
                ]
            },
            {
                "id": 5255768,
                "content": "Ranking",
                "answers": [
                    {
                        "id": 1,
                        "content": "rzodkiewki",
                        "value": 3
                    },
                    {
                        "id": 2,
                        "content": "truskawki",
                        "value": 2
                    },
                    {
                        "id": 3,
                        "content": "banany",
                        "value": 1
                    }
                ]
            },
            {
                "questionId": 5255770,
                "answers": [
                    {
                        "id": 1,
                        "content": "a",
                        "value": 33
                    },
                    {
                        "id": 2,
                        "content": "b",
                        "value": 33
                    },
                    {
                        "id": 3,
                        "content": "c",
                        "value": 34
                    }
                ]
            },
            {
                "id": 5255772,
                "content": "Załącznik",
                "answer": "816_przenoszenie.pdf"
            },
            {
                "id": 5255774,
                "content": "Liczba",
                "answer": "165"
            },
            {
                "id": 5255776,
                "content": "Email",
                "answer": "[email protected]"
            },
            {
                "id": 5255778,
                "content": "Data",
                "answer": "2021-05-21 00:00:00"
            }
        ]
    }
}


2. Rejestracja RESThooka


Aby zarejestrować RESThook, użytkownik musi przesłać dane potrzebne do konfiguracji. Zgłoszenie należy wysłać na adres: [email protected].

W zgłoszeniu należy podać:

  • Adres URL, na który mają być przesyłane dane. (np: https://example.com/hooks/123456/987654321)

  • Numer ID ankiety, dla której ma został zdefiniowany RESThook.