define({ "api": [ { "success": { "fields": { "Success 200": [ { "group": "Success 200", "optional": false, "field": "varname1", "description": "

No type.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "varname2", "description": "

With type.

" } ] } }, "type": "", "url": "", "version": "0.0.0", "filename": "./apidoc/apidoc/main.js", "group": "D__xampp_htdocs_1ka_admin_survey_api_apidoc_apidoc_main_js", "groupTitle": "D__xampp_htdocs_1ka_admin_survey_api_apidoc_apidoc_main_js", "name": "" }, { "success": { "fields": { "Success 200": [ { "group": "Success 200", "optional": false, "field": "varname1", "description": "

No type.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "varname2", "description": "

With type.

" } ] } }, "type": "", "url": "", "version": "0.0.0", "filename": "./apidoc/main.js", "group": "D__xampp_htdocs_1ka_admin_survey_api_apidoc_main_js", "groupTitle": "D__xampp_htdocs_1ka_admin_survey_api_apidoc_main_js", "name": "" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyAnswerState/survey/:id", "title": "getSurveyAnswerState", "name": "getSurveyAnswerState", "group": "Dashboard", "description": "

Get response rate for survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Main Fields": [ { "group": "Main Fields", "type": "Object[]", "optional": false, "field": "status", "description": "

Basic status of answers (3ll-entered intro, 4ll-entered frist page, 5ll-started responding, 5-partially completed, 6-completed)

" }, { "group": "Main Fields", "type": "Object[]", "optional": false, "field": "usability", "description": "

Unit usability (unit (bottom usable limit/top usable limit))

" }, { "group": "Main Fields", "type": "Object[]", "optional": false, "field": "breakoffs", "description": "

Data of responents breakoffs

" } ], "Data Fields": [ { "group": "Data Fields", "type": "Number", "optional": false, "field": "freq", "description": "

Frequency

" }, { "group": "Data Fields", "type": "String", "optional": false, "field": "state", "description": "

Realtive frequency

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n\t\"status\": {\n\t\t\"3ll\": {\n\t\t\t\"freq\": 29,\n\t\t\t\"state\": \"100%\"\n\t\t},\n\t\t\"4ll\": {\n\t\t\t\"freq\": 27,\n\t\t\t\"state\": \"93%\"\n\t\t},\n\t\t\"5ll\": {\n\t\t\t\"freq\": 20,\n\t\t\t\"state\": \"69%\"\n\t\t},\n\t\t\"5\": {\n\t\t\t\"freq\": 18,\n\t\t\t\"state\": \"62%\"\n\t\t},\n\t\t\"6\": {\n\t\t\t\"freq\": 18,\n\t\t\t\"state\": \"62%\"\n\t\t}\n\t},\n\t\"usability\": {\n\t\t\"unit\": \"(50%\\/80%)\",\n\t\t\"usable\": {\n\t\t\t\"freq\": 1,\n\t\t\t\"state\": \"5%\"\n\t\t},\n\t\t\"partusable\": {\n\t\t\t\"freq\": 6,\n\t\t\t\"state\": \"30%\"\n\t\t},\n\t\t\"unusable\": {\n\t\t\t\"freq\": 13,\n\t\t\t\"state\": \"65%\"\n\t\t}\n\t},\n\t\"breakoffs\": {\n\t\t\"intro\": {\n\t\t\t\"freq\": 9,\n\t\t\t\"state\": \"31%\"\n\t\t},\n\t\t\"questionnaire\": {\n\t\t\t\"freq\": 0,\n\t\t\t\"state\": \"0% (neto 0%)\"\n\t\t},\n\t\t\"total\": {\n\t\t\t\"freq\": 9,\n\t\t\t\"state\": \"31%\"\n\t\t}\n\t}\n }", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Dashboard" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyDashboard/survey/:id", "title": "getSurveyDashboard", "name": "getSurveyDashboard", "group": "Dashboard", "description": "

Get all dashboard data of survey (if survey has no responses, only survey info is returned)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "info", "description": "

Info of survey (basic dashboard info)

" }, { "group": "Success 200", "type": "Object[]", "optional": true, "field": "statuses", "description": "

Statuses of responses of survey (optional)

" }, { "group": "Success 200", "type": "Object[]", "optional": true, "field": "datetime", "description": "

Object of nubers of all responses by date and hour in day (optional)

" }, { "group": "Success 200", "type": "Object[]", "optional": true, "field": "redirections", "description": "

Redirections of survey (optional)

" }, { "group": "Success 200", "type": "Object[]", "optional": true, "field": "paradata", "description": "

Paradata of responses of survey (optional)

" }, { "group": "Success 200", "type": "Object[]", "optional": true, "field": "responserate", "description": "

Response rate of survey (optional)

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n\t\"info\": [SEE OUTPUT OF FUNCTION getSurveyInfo],\n\t\"statuses\": [SEE OUTPUT OF FUNCTION getSurveyStatuses],\n\t\"datetime\": [SEE OUTPUT OF FUNCTION getSurveyDateTimeRange],\n\t\"redirections\": [SEE OUTPUT OF FUNCTION getSurveyDateTimeRange],\n\t\"paradata\": [SEE OUTPUT OF FUNCTION getSurveyParadata],\n\t\"responserate\": [SEE OUTPUT OF FUNCTION getSurveyAnswerState]\n }", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Dashboard" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyDateTimeRange/survey/:id", "title": "getSurveyDateTimeRange", "name": "getSurveyDateTimeRange", "group": "Dashboard", "description": "

Get object of nubers of all responses by date and hour in day (keys as date and hour in day, values as number of answers at that time)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\n\t\"2017-10-02 09\": \"10\",\n\t\"2017-10-03 13\": \"1\",\n\t\"2017-11-10 11\": \"3\",\n\t\"2017-11-10 12\": \"7\",\n\t\"2017-11-10 13\": \"1\",\n\t\"2017-11-10 14\": \"7\",\n \"2017-11-10 17\": \"2\"\n }", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Dashboard" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyParadata/survey/:id", "title": "getSurveyParadata", "name": "getSurveyParadata", "group": "Dashboard", "description": "

Get paradata of responses of survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "valid", "description": "

Paradata of valid answers/respondents

" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "all", "description": "

Paradata of all (valid and nonvalid) answers/respondents

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n\t\"valid\": {\n\t\t\"unfilteredCount\": 3,\n\t\t\"allCount\": 2,\n\t\t\"pcCount\": \"2\",\n\t\t\"mobiCount\": 0,\n\t\t\"tabletCount\": 0,\n\t\t\"robotCount\": 0,\n\t\t\"jsActive\": 2,\n\t\t\"jsNonActive\": 0,\n\t\t\"jsUndefined\": 0,\n\t\t\"browser\": {\n\t\t\t\"Other\": \"2\"\n\t\t},\n\t\t\"os\": {\n\t\t\t\"Other\": \"2\"\n\t\t}\n\t},\n\t\"all\": {\n\t\t\"unfilteredCount\": 3,\n\t\t\"allCount\": 3,\n\t\t\"pcCount\": \"3\",\n\t\t\"mobiCount\": 0,\n\t\t\"tabletCount\": 0,\n\t\t\"robotCount\": 0,\n\t\t\"jsActive\": 3,\n\t\t\"jsNonActive\": 0,\n\t\t\"jsUndefined\": 0,\n\t\t\"browser\": {\n\t\t\t\"Other\": \"3\"\n\t\t},\n\t\t\"os\": {\n\t\t\t\"Other\": \"3\"\n\t\t}\n\t}\n }", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Dashboard" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyRedirections/survey/:id", "title": "getSurveyRedirections", "name": "getSurveyRedirections", "group": "Dashboard", "description": "

Get all redirections of survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\n\t\"3\": 0,\n\t\"4\": 0,\n\t\"5\": 0,\n\t\"6\": 0,\n\t\"valid\": {\n\t\t\"email\": 86,\n\t\t\"www.1ka.si\": 23,\n\t\t\"www.customsite.si\": 1\n\t},\n\t\"email\": 86,\n\t\"direct\": 4,\n\t\"cntAll\": 0\n }", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Dashboard" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyStatuses/survey/:id", "title": "getSurveyStatuses", "name": "getSurveyStatuses", "group": "Dashboard", "description": "

Get statuses of responses of survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object", "optional": false, "field": "valid", "description": "

6-finished surveys, 5-partially finished surveys

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "nonvalid", "description": "

6l-lurkers, 5l-lurkers, 4-click on survey, 3-click on intro, -1-unknown status

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "invitation", "description": "

(non-surveyed units) 2-email sent (error), 1-email sent (non-response), 0-email not sent

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"valid\":{\"6\":50,\"5\":0},\n \"nonvalid\":{\"6l\":0,\"5l\":0,\"4\":0,\"3\":0,\"-1\":0},\n \"invitation\":{\"2\":0,\"1\":0,\"0\":0}}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Dashboard" }, { "type": "post", "url": "https://www.1ka.si/api/addLink/survey/:id", "title": "addLink", "name": "addLink", "group": "Data_and_analysis", "description": "

Add new public link (hash link of data or analysis). Example of hash (public) link: https://www.1ka.si/podatki/50/5BABEC6D/ ([SITE_ROOT]/podatki/[SURVEY_ID]/[HASH_CODE]/)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "String", "optional": false, "field": "a", "description": "

Broad type of content of hash link (analysis, data) (if data, parameter m is not needed)

" }, { "group": "POST parameter", "type": "String", "optional": false, "field": "m", "description": "

Specific type of content of hash link (analysis_creport, descriptor, frequency, charts, sumarnik) (when parameter a is "data", this parameter is not needed)

" } ] }, "examples": [ { "title": "Post-example: ", "content": "{\"a\":\"analysis\", \"m\":\"frequency\"}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Link added\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Data_and_analysis" }, { "type": "delete", "url": "https://www.1ka.si/api/deleteLink/survey/:id", "title": "deleteLink", "name": "deleteLink", "group": "Data_and_analysis", "description": "

Delete specific public link (hash link of data or analysis)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "String", "optional": false, "field": "hash", "description": "

Hash code of public link to delete

" } ] }, "examples": [ { "title": "Post-example: ", "content": "{\"hash\":\"5BABEC6D\"}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Link deleted\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Data_and_analysis" }, { "type": "delete", "url": "https://www.1ka.si/api/deleteSurveyUnit/survey/:id", "title": "deleteSurveyUnit", "name": "deleteSurveyUnit", "group": "Data_and_analysis", "description": "

Delete unit/response in survey data (whole response of a respondent)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "String", "optional": false, "field": "srv_unit_id", "description": "

ID of unit/response to delete

" } ] }, "examples": [ { "title": "Post-example: ", "content": "{\"srv_unit_id\":\"12774\"}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Survey unit deleted\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Data_and_analysis" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyFrequencies/survey/:id", "title": "getSurveyFrequencies", "name": "getSurveyFrequencies", "group": "Data_and_analysis", "description": "

Get frequencies for all radio, checkbox, dropdown and plain text questions in the survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Question Fields": [ { "group": "Question Fields", "type": "String", "optional": false, "field": "besedilo_vprasanja", "description": "

Text of question

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "id_vprasanja", "description": "

Id of question (left side of '_' is actual ID of question, right side is ID of sequence within question)

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "vrsta_vprasanja", "description": "

Code of question type: 0-single choice (radio, dropdown), 1-multiple choice (checkbox), 2-text

" }, { "group": "Question Fields", "type": "Object", "optional": false, "field": "odgovori", "description": "

Answers

" } ], "Answer Fields": [ { "group": "Answer Fields", "type": "Object", "optional": false, "field": "invalid", "description": "

Invalid answers

" }, { "group": "Answer Fields", "type": "Number", "optional": false, "field": "invalidCnt", "description": "

Count of all invalid answers

" }, { "group": "Answer Fields", "type": "Number", "optional": false, "field": "allCnt", "description": "

Count of all answers

" }, { "group": "Answer Fields", "type": "Number", "optional": false, "field": "validCnt", "description": "

Count of all valid answers

" }, { "group": "Answer Fields", "type": "Object[]", "optional": false, "field": "valid", "description": "

Array of all valid asnwers

" }, { "group": "Answer Fields", "type": "String", "optional": false, "field": "naslov", "description": "

Text/name/title of answer/choice (not in single choice)

" } ], "Valid answer Fields - single choice": [ { "group": "Valid answer Fields - single choice", "type": "String", "optional": false, "field": "text", "description": "

Text/name/title of answer/choice

" }, { "group": "Valid answer Fields - single choice", "type": "String", "optional": false, "field": "text_graf", "description": "

Text of answer/choice in graph

" }, { "group": "Valid answer Fields - single choice", "type": "String", "optional": false, "field": "cnt", "description": "

Count of choices for this answer

" }, { "group": "Valid answer Fields - single choice", "type": "Number", "optional": false, "field": "vrednost", "description": "

Value of answer/choice

" } ], "Valid answer Fields - multiple choice": [ { "group": "Valid answer Fields - multiple choice", "type": "String", "optional": false, "field": "text", "description": "

0-not checked, 1-checked

" } ], "Valid answer Fields - text": [ { "group": "Valid answer Fields - text", "type": "String", "optional": false, "field": "text", "description": "

Actual text asnwer

" }, { "group": "Valid answer Fields - text", "type": "Number", "optional": false, "field": "cnt", "description": "

Count of same asnwer

" } ] }, "examples": [ { "title": "Success-Response:", "content": "[{\n \"besedilo_vprasanja\": \"Best counrty in Europe\",\n \"id_vprasanja\": \"118_0\",\n \"vrsta_vprasanja\": \"0\",\n \"odgovori\": {\n \"invalid\": {\n \"-1\": {\"text\": \"Unanswered question\",\"cnt\": \"1\"},\n \"-2\": {\"text\": \"Skipped question (IF logic)\",\"cnt\": 0},\n \"-3\": {\"text\": \"Drop-out\",\"cnt\": 0},\n \"-4\": {\"text\": \"Subsequent question\",\"cnt\": 0},\n \"-5\": {\"text\": \"Empty unit\",\"cnt\": 0},\n \"-97\": {\"text\": \"Invalid\",\"cnt\": 0},\n \"-98\": {\"text\": \"Refused\",\"cnt\": 0},\n \"-99\": {\"text\": \"Don't know\",\"cnt\": 0}\n },\n \"invalidCnt\": 1,\n \"allCnt\": 5,\n \"validCnt\": 4,\n \"valid\": [{\n \"text\": \"Slovenia\",\n \"text_graf\": \"Slovenia\",\n \"cnt\": \"1\",\n \"vrednost\": 1\n }, {\n \"text\": \"Spain\",\n \"text_graf\": \"Spain\",\n \"cnt\": 0,\n \"vrednost\": 2\n }, {\n \"text\": \"Germany\",\n \"text_graf\": \"Germany\",\n \"cnt\": \"2\",\n \"vrednost\": 3\n }, {\n \"text\": \"Other:\",\n \"text_graf\": \"Other:\",\n \"cnt\": \"1\",\n \"vrednost\": 4\n }, {\n \"text\": \"estonia\",\n \"cnt\": 1,\n \"text_graf\": null,\n \"other\": \"Other:\",\n \"vrednost\": \"estonia\"\n }]\n }\n }, {\n \"besedilo_vprasanja\": \"Cities you visited\",\n \"id_vprasanja\": \"119_0\",\n \"vrsta_vprasanja\": \"1\",\n \"odgovori\": [{\n \"invalid\": {[SEE FIRST QUESTION]},\n \"invalidCnt\": 1,\n \"allCnt\": 5,\n \"valid\": [{\n \"text\": \"0\",\n \"text_graf\": null,\n \"cnt\": \"1\"\n }, {\n \"text\": \"1\",\n \"text_graf\": null,\n \"cnt\": \"3\"\n }],\n \"validCnt\": 4,\n \"naslov\": \"Ljubljana\"\n }, {\n \"invalid\": {[SEE FIRST QUESTION]},\n \"invalidCnt\": 1,\n \"allCnt\": 5,\n \"valid\": [{\n \"text\": \"0\",\n \"text_graf\": null,\n \"cnt\": \"3\"\n }, {\n \"text\": \"1\",\n \"text_graf\": null,\n \"cnt\": \"1\"\n }],\n \"validCnt\": 4,\n \"naslov\": \"Berlin\"\n }, {\n \"invalid\": {[SEE FIRST QUESTION]},\n \"invalidCnt\": 1,\n \"allCnt\": 5,\n \"valid\": [{\n \"text\": \"0\",\n \"text_graf\": null,\n \"cnt\": \"2\"\n }, {\n \"text\": \"1\",\n \"text_graf\": null,\n \"cnt\": \"2\"\n }],\n \"validCnt\": 4,\n \"naslov\": \"Madrid\"\n }, {\n \"invalid\": {[SEE FIRST QUESTION]},\n \"invalidCnt\": 1,\n \"allCnt\": 5,\n \"valid\": [{\n \"text\": \"0\",\n \"text_graf\": null,\n \"cnt\": \"3\"\n }, {\n \"text\": \"1\",\n \"text_graf\": null,\n \"cnt\": \"1\"\n }],\n \"validCnt\": 4,\n \"naslov\": \"London\"\n }, {\n \"invalid\": {[SEE FIRST QUESTION]},\n \"invalidCnt\": 1,\n \"allCnt\": 5,\n \"valid\": [{\n \"text\": \"0\",\n \"text_graf\": null,\n \"cnt\": 0\n }, {\n \"text\": \"1\",\n \"text_graf\": null,\n \"cnt\": \"4\"\n }],\n \"validCnt\": 4,\n \"naslov\": \"Other:\"\n }, {\n \"invalid\": {[SEE FIRST QUESTION]},\n \"invalidCnt\": 1,\n \"allCnt\": 5,\n \"validCnt\": 4,\n \"average\": null,\n \"valid\": [{\n \"text\": \"paris\",\n \"cnt\": 1,\n \"text_graf\": null,\n \"other\": \"Other:\"\n }, {\n \"text\": \"zagreb\",\n \"cnt\": 1,\n \"text_graf\": null,\n \"other\": \"Other:\"\n }, {\n \"text\": \"lisbon\",\n \"cnt\": 2,\n \"text_graf\": null,\n \"other\": \"Other:\"\n }],\n \"other\": \"Other:\"\n }]\n }, {\n \"besedilo_vprasanja\": \"Write a name\",\n \"id_vprasanja\": \"120_0\",\n \"vrsta_vprasanja\": \"2\",\n \"odgovori\": [{\n \"invalid\": {[SEE FIRST QUESTION]},\n \"invalidCnt\": 1,\n \"allCnt\": 5,\n \"validCnt\": 4,\n \"average\": null,\n \"valid\": [{\n \"text\": \"lucy\",\n \"cnt\": 1,\n \"text_graf\": null\n }, {\n \"text\": \"crish\",\n \"cnt\": 2,\n \"text_graf\": null\n }, {\n \"text\": \"marie\",\n \"cnt\": 1,\n \"text_graf\": null\n }]\n }]\n }]", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Data_and_analysis" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyHashes/survey/:id", "title": "getSurveyHashes", "name": "getSurveyHashes", "group": "Data_and_analysis", "description": "

Get all hash links of survey. Example of hash (public) link: https://www.1ka.si/podatki/50/5BABEC6D/ ([SITE_ROOT]/podatki/[SURVEY_ID]/[HASH_CODE]/)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Main Fields": [ { "group": "Main Fields", "type": "String", "optional": false, "field": "hash", "description": "

Hash code for link

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "comment", "description": "

Comment of hash link

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "refresh", "description": "

0-refresh mode off, 1-auto refresh site every x seconds

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "access_password", "description": "

If not NULL or "", this password is needed to access public link

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "page", "description": "

Broad type of content of hash link (analysis, data)

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "add_date", "description": "

Date of creation

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "add_time", "description": "

Time of creation

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "email", "description": "

Email of author

" }, { "group": "Main Fields", "type": "Object", "optional": false, "field": "properties", "description": "

Properties of hash link

" } ], "Hash link Fields": [ { "group": "Hash link Fields", "type": "String", "optional": false, "field": "anketa", "description": "

ID of survey that hash link belong to

" }, { "group": "Hash link Fields", "type": "String", "optional": false, "field": "a", "description": "

Broad type of content of hash link (analysis, data)

" }, { "group": "Hash link Fields", "type": "String", "optional": false, "field": "m", "description": "

Specific type of content of hash link (analysis_creport, descriptor, frequency, charts, sumarnik)

" }, { "group": "Hash link Fields", "type": "String", "optional": false, "field": "profile_id_status", "description": "" }, { "group": "Hash link Fields", "type": "String", "optional": false, "field": "profile_id_variable", "description": "" }, { "group": "Hash link Fields", "type": "String", "optional": false, "field": "profile_id_condition", "description": "" } ] }, "examples": [ { "title": "Success-Response:", "content": "[{\n \"hash\": \"179A60BA\",\n \"properties\": {\n \"anketa\": \"50\",\n \"a\": \"analysis\",\n \"m\": \"frequency\",\n \"profile_id_status\": 2,\n \"profile_id_variable\": 0,\n \"profile_id_condition\": 1\n },\n \"comment\": \"Frequencies\",\n \"refresh\": \"0\",\n \"access_password\": \"\",\n \"page\": \"analysis\",\n \"add_date\": \"17.05.2019\",\n \"add_time\": \"12:38\",\n \"email\": \"admin\"\n }, {\n \"hash\": \"F3FB9720\",\n \"properties\": {\n \"anketa\": \"50\",\n \"a\": \"analysis\",\n \"m\": \"charts\",\n \"profile_id_status\": 2,\n \"profile_id_variable\": 0,\n \"profile_id_condition\": 1\n },\n \"comment\": \"Charts\",\n \"refresh\": \"0\",\n \"access_password\": \"\",\n \"page\": \"analysis\",\n \"add_date\": \"17.05.2019\",\n \"add_time\": \"12:37\",\n \"email\": \"admin\"\n }, {\n \"hash\": \"2D704440\",\n \"properties\": {\n \"anketa\": \"50\",\n \"a\": \"data\",\n \"m\": \"\",\n \"profile_id_status\": 2,\n \"profile_id_variable\": 0,\n \"profile_id_condition\": 1\n },\n \"comment\": \"\",\n \"refresh\": \"0\",\n \"access_password\": null,\n \"page\": \"data\",\n \"add_date\": \"17.05.2019\",\n \"add_time\": \"12:37\",\n \"email\": \"admin\"\n }, {\n \"hash\": \"7A96B2C7\",\n \"properties\": {\n \"anketa\": \"50\",\n \"a\": \"analysis\",\n \"m\": \"sumarnik\",\n \"profile_id_status\": 2,\n \"profile_id_variable\": 0,\n \"profile_id_condition\": 1\n },\n \"comment\": \"Summary\",\n \"refresh\": \"0\",\n \"access_password\": \"\",\n \"page\": \"analysis\",\n \"add_date\": \"17.05.2019\",\n \"add_time\": \"12:36\",\n \"email\": \"admin\"\n }]", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Data_and_analysis" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyResponseData/survey/:id?usr_id=333", "title": "getSurveyResponseData", "name": "getSurveyResponseData", "group": "Data_and_analysis", "description": "

Get basic info and all values/answers of response

", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

ID of survey

" }, { "group": "Parameter", "type": "Number", "optional": false, "field": "usr_id", "description": "

ID of response to analyse

" } ] } }, "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "relevance", "description": "

Relevance of response (1-valid, 0-unvalid)

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "status", "description": "

Status code of response (6-Completed, 5-partially completed, 4-entered first page, 3-entered intro)

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "recnum", "description": "

Record number (sequence of response in survey)

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "itime", "description": "

Date of response

" }, { "group": "Success 200", "type": "String", "optional": true, "field": "ALL_OTHERS", "description": "

Keys as names of values, values as answers

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"relevance (Relevance)\": \"1\",\n \"status (Status)\": \"6\",\n \"recnum (Record number)\": \"1\",\n \"itime (Date)\": \"20.05.2019\",\n \"Q1 (City)\": \"1\",\n \"Q1_4_text (Other:)\": \"-2\",\n \"Q2a (Slovenia)\": \"1\",\n \"Q2b (Germany)\": \"1\",\n \"Q2c (UK)\": \"0\",\n \"Q2d (Other:)\": \"0\",\n \"Q2d_text (Other:)\": \"-2\",\n \"Q3 (Vpi\\u0161ite besedilo)\": \"Manja\"\n }", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Data_and_analysis" }, { "type": "post", "url": "https://www.1ka.si/api/copyQuestion/survey/:id", "title": "copyQuestion", "name": "copyQuestion", "group": "Questions_and_variables", "description": "

Make a copy of specific question and put it +1 in order to original question on same page

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "Number", "optional": false, "field": "que_id", "description": "

ID of question to copy

" } ] }, "examples": [ { "title": "Post-example: ", "content": "{\"que_id\":12240}", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Number", "optional": false, "field": "que_id", "description": "

ID of new question

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"id\":12831,\"note\":\"Question copied\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Questions_and_variables" }, { "type": "post", "url": "https://www.1ka.si/api/createQuestion/survey/:id", "title": "createQuestion", "name": "createQuestion", "group": "Questions_and_variables", "description": "

Add new question to survey, put it on last spot of given group/page in survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey to add new question to

" } ], "POST parameter": [ { "group": "POST parameter", "type": "String", "optional": false, "field": "title", "description": "

Text of question

" }, { "group": "POST parameter", "type": "Number", "optional": true, "field": "group_id", "description": "

Id of page/group to put question in (default is last page/group)

" }, { "group": "POST parameter", "type": "Number", "optional": false, "field": "type_code", "description": "

Type of question (0-radio, 1-checkbox, 2-text)

" }, { "group": "POST parameter", "type": "Number", "optional": true, "field": "reminder", "description": "

Reminder code for question (0-no reminder, 1-soft reminder, 2-hard reminder) (default is 0)

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "other", "description": "

Text of option other to add (for cshoose type questions)

" }, { "group": "POST parameter", "type": "Number", "optional": true, "field": "taSize", "description": "

Height size in lines of text field (for text question) (default is single line)

" }, { "group": "POST parameter", "type": "String[]", "optional": true, "field": "options", "description": "

Array of options to add to question (for cshoose type questions)

" } ] }, "examples": [ { "title": "Post-example (For choice-type): ", "content": " {\n\t\"question\": {\n\t\t\t\"title\": \"This is text of choice type question\",\n\t\t\t\"type_code\": 1,\n \"group_id\": 2027,\n\t\t\t\"reminder\": 0,\n\t\t\t\"other\": \"Other:\",\n\t\t\t\"options\": [\"Text of option 1\", \"Text of option 2\", \"Text of option 3\"]\n\t\t}\t\n }", "type": "json" }, { "title": "Post-example (For text-type): ", "content": " {\n\t\"question\": {\n\t\t\t\"title\": \"This is text of text type question\",\n\t\t\t\"type_code\": 2,\n \"group_id\": 2027,\n\t\t\t\"reminder\": 1,\n\t\t\t\"taSize\": 3\n\t\t}\t\n }", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "que_id", "description": "

ID of new question

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"que_id\":5056,\"note\":\"Question created\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Questions_and_variables" }, { "type": "delete", "url": "https://www.1ka.si/api/deleteOption/survey/:id", "title": "deleteOption", "name": "deleteOption", "group": "Questions_and_variables", "description": "

Delete option/value of question (for picking type of question - single or multiple choice)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "String", "optional": false, "field": "option_id", "description": "

ID of option/value to delete

" } ] }, "examples": [ { "title": "Post-example: ", "content": "{\"option_id\":\"424\"}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Option deleted\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Questions_and_variables" }, { "type": "delete", "url": "https://www.1ka.si/api/deleteQuestion/survey/:id", "title": "deleteQuestion", "name": "deleteQuestion", "group": "Questions_and_variables", "description": "

Delete question

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "Number", "optional": false, "field": "que_id", "description": "

ID of question to delete

" } ] }, "examples": [ { "title": "Post-example: ", "content": "{\"que_id\":4240}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Question deleted\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Questions_and_variables" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyQuestions/survey/:id", "title": "getSurveyQuestions", "name": "getSurveyQuestions", "group": "Questions_and_variables", "description": "

Get info of all questions of survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Main Fields": [ { "group": "Main Fields", "type": "String", "optional": false, "field": "id", "description": "

Id of question

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "tip", "description": "

Type of question (verbal)

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "naslov", "description": "

Title of question

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "info", "description": "

Additional information of question (e.g. "Multiple answers are possible")

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "variable", "description": "

Short mark of question (question name)

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "stran_id", "description": "

Id of page

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "stran_naslov", "description": "

Title of page

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "vrstni_red", "description": "

Sequence number of the question

" }, { "group": "Main Fields", "type": "Object", "optional": false, "field": "vrednosti", "description": "

Values o questions (possible answers)

" } ], "Value Fields": [ { "group": "Value Fields", "type": "String", "optional": false, "field": "id", "description": "

Id of value in question

" }, { "group": "Value Fields", "type": "String", "optional": false, "field": "naslov", "description": "

Title of value in question

" }, { "group": "Value Fields", "type": "String", "optional": false, "field": "variable", "description": "

Short mark of value in question (value name)

" }, { "group": "Value Fields", "type": "String", "optional": false, "field": "vrstni_red", "description": "

Sequence number of value in the question

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"1234\":{\n \"id\":\"1234\",\n \"tip\":\"One answer\",\n \"naslov\":\"Question tittle 1\",\n \"info\":\"\",\n \"variable\":\"Q1\",\n \"stran_id\":\"2890\",\n \"stran_naslov\":\"Page 1\",\n \"vrstni_red\":\"1\",\n \"vrednosti\":{\n \"48495\":{\n \"id\":\"48495\",\n \"naslov\":\"Write text 1\",\n \"variable\":\"1\",\n \"vrstni_red\":\"1\"},\n \"48496\":{\n \"id\":\"48496\",\n \"naslov\":\"Write text 2\",\n \"variable\":\"2\",\n \"vrstni_red\":\"2\"}\n }\n }},\n {\"1235\"...", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Questions_and_variables" }, { "type": "post", "url": "https://www.1ka.si/api/updateOrCreateOption/survey/:id", "title": "updateOrCreateOption", "name": "updateOrCreateOption", "group": "Questions_and_variables", "description": "

Update or add a value/option to question (for picking type of question - single or multiple choice)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "String", "optional": false, "field": "option_text", "description": "

Title/text of option/value

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "que_id", "description": "

ID of question to add new option/value (needed only for adding)

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "option_id", "description": "

ID of option/value to update (needed only for updating)

" } ] }, "examples": [ { "title": "Post-example (adding): ", "content": "{\n \"option_text\":\"First option\",\n \"que_id\":\"3894\"\n}", "type": "json" }, { "title": "Post-example (updating): ", "content": "{\n \"option_text\":\"First option\",\n \"option_id\":\"9618\"\n}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response (adding):", "content": "{\"note\":\"Option added\",\"opt_id\":9619}", "type": "json" }, { "title": "Success-Response (updating):", "content": "{\"note\":\"Option updated\",\"opt_id\":\"9618\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Questions_and_variables" }, { "type": "post", "url": "https://www.1ka.si/api/updateQuestion/survey/:id", "title": "updateQuestion", "name": "updateQuestion", "group": "Questions_and_variables", "description": "

Update basic question properties

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "String", "optional": false, "field": "id_que", "description": "

ID of question

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "title", "description": "

Title/text of question

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "reminder", "description": "

Reminder code for question (0-no reminder, 1-soft reminder, 2-hard reminder)

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "other", "description": "

Text of option "Other" (update or add)

" } ] }, "examples": [ { "title": "Post-example: ", "content": " {\n\t\"question\": {\n \"id_que\": \"8487\",\n \"title\": \"Which city you like most?\",\n \"reminder\": \"1\",\n \"other\": \"Other:\"\n\t}\n }", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Question updated\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Questions_and_variables" }, { "type": "post", "url": "https://www.1ka.si/api/BlockRepeatedIP/survey/:id", "title": "BlockRepeatedIP", "name": "BlockRepeatedIP", "group": "Surveys", "description": "

Block repeated IP (do not allow respondent to respond to survey again for the next x minutes)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "Number", "optional": true, "field": "blockIP", "description": "

In minutes - if this parameter is not set, blocking IP will be turned off (possible options are 10, 20, 30, 60, 720, 1440, 0-ip blocking off)

" } ] }, "examples": [ { "title": "Post-example: ", "content": "{\"blockIP\":1440}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"IP blocking changed\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "post", "url": "https://www.1ka.si/api/SurveyActivation/survey/:id", "title": "SurveyActivation", "name": "SurveyActivation", "group": "Surveys", "description": "

Activate (for 3 months from now) or deactivate survey (start it or stop it)

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "Number", "optional": true, "field": "active", "description": "

If this parameter is not set, survey will be deactivated (0-deactivate survey, 1-activate survey)

" } ] }, "examples": [ { "title": "Post-example: ", "content": "{\"active\":1}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Survey activity changed\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "put", "url": "https://www.1ka.si/api/copySurvey/survey/:id", "title": "copySurvey", "name": "copySurvey", "group": "Surveys", "description": "

Make a copy of specific survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey to copy

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Number", "optional": false, "field": "id", "description": "

ID of new survey

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"id\":5194,\"note\":\"Survey copied\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "post", "url": "https://www.1ka.si/api/createSurvey", "title": "createSurvey", "name": "createSurvey", "group": "Surveys", "description": "

Create survey with questions

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Survey fields": [ { "group": "Survey fields", "type": "String", "optional": false, "field": "naslov_vprasalnika", "description": "

Title/name of survey

" }, { "group": "Survey fields", "type": "Number", "optional": false, "field": "survey_type", "description": "

Type of survey (0-voting, 2-survey)

" }, { "group": "Survey fields", "type": "Object", "optional": false, "field": "uvod", "description": "

Introducrion data

" }, { "group": "Survey fields", "type": "Number", "optional": true, "field": "hide_uvod", "description": "

Do we hide introduction (0-show, 1-hide, default is 0)

" }, { "group": "Survey fields", "type": "Object", "optional": false, "field": "zakljucek", "description": "

Conclusion data

" }, { "group": "Survey fields", "type": "Number", "optional": true, "field": "hide_zakljucek", "description": "

Do we hide conclusion (0-show, 1-hide, default is 0)

" }, { "group": "Survey fields", "type": "String", "optional": false, "field": "besedilo", "description": "

Text of introduction or conclusion (set it on "" for default text)

" }, { "group": "Survey fields", "type": "Object[]", "optional": true, "field": "vprasanja", "description": "

Array of all questions to add to survey

" } ], "Question fields": [ { "group": "Question fields", "type": "String", "optional": false, "field": "besedilo_vprasanja", "description": "

Text of question

" }, { "group": "Question fields", "type": "Number", "optional": false, "field": "mesto_vprasanja", "description": "

Order of question sequence to place this question in page

" }, { "group": "Question fields", "type": "Number", "optional": false, "field": "vrsta_vprasanja", "description": "

Type of question (0-radio, 1-checkbox, 2-text)

" }, { "group": "Question fields", "type": "Number", "optional": true, "field": "reminder", "description": "

Reminder code for question (0-no reminder, 1-soft reminder, 2-hard reminder) (default is 0)

" }, { "group": "Question fields", "type": "String", "optional": true, "field": "other", "description": "

Text of option other to add (for radio and checkbox)

" }, { "group": "Question fields", "type": "Number", "optional": true, "field": "velikost_polja", "description": "

Height size in lines of text field (for text question) (default is single line)

" }, { "group": "Question fields", "type": "String[]", "optional": true, "field": "Odgovori", "description": "

Array of options to add to question (for radio and checkbox)

" } ] }, "examples": [ { "title": "Post-example (For survey): ", "content": " {\n\t\"naslov_vprasalnika\": \"This is title of new survey\",\n\t\"survey_type\": 2,\n\t\"uvod\": {\n\t\t\"besedilo\": \"This is text of intruduction\",\n\t\t\"hide_uvod\": 0\n\t},\n\t\"zakljucek\": {\n\t\t\"besedilo\": \"\",\n\t\t\"hide_zakljucek\": 1\n\t},\n\t\"vprasanja\": [{\n\t\t\t\"besedilo_vprasanja\": \"This is text of question number 1\",\n\t\t\t\"mesto_vprasanja\": 1,\n\t\t\t\"vrsta_vprasanja\": 1,\n\t\t\t\"reminder\": 0,\n\t\t\t\"other\": \"Other:\",\n\t\t\t\"Odgovori\": [\"Text of option 1\", \"Text of option 2\", \"Text of option 3\"]\n\t\t},\n\t\t{\n\t\t\t\"besedilo_vprasanja\": \"This is text of question number 2\",\n\t\t\t\"mesto_vprasanja\": 2,\n\t\t\t\"vrsta_vprasanja\": 2,\n\t\t\t\"velikost_polja\": 10,\n\t\t\t\"reminder\": 1\n\t\t},\n {\n\t\t\t\"besedilo_vprasanja\": \"This is text of question number 3\",\n\t\t\t\"mesto_vprasanja\": 3,\n\t\t\t\"vrsta_vprasanja\": 0,\n\t\t\t\"Odgovori\": [\"Text of option 1\", \"Text of option 2\", \"Text of option 3\"]\n\t\t}\n\t]\n }", "type": "json" }, { "title": "Post-example (For voting): ", "content": " {\n\t\"naslov_vprasalnika\": \"This is title of new survey\",\n\t\"survey_type\": 0,\n \"besedilo_vprasanja\": \"This is text of question number 1\",\n \"vrsta_vprasanja\": 0,\n \"other\": \"Other:\",\n \"Odgovori\": [\"Text of option 1\", \"Text of option 2\", \"Text of option 3\"]\n }", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "url", "description": "

Link to new survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "id", "description": "

ID of new survey

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"url\":\"http:\\/\\/141.255.212.38\\/1ka\\/a\\/56\",\"id\":56,\"note\":\"Survey created\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "delete", "url": "https://www.1ka.si/api/deleteSurvey/survey/:id", "title": "deleteSurvey", "name": "deleteSurvey", "group": "Surveys", "description": "

Delete survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey to delete

" } ] } }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Survey deleted\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "get", "url": "https://www.1ka.si/api/getSurvey/survey/:id", "title": "getSurvey", "name": "getSurvey", "group": "Surveys", "description": "

Get info of survey and its questions

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Main Fields": [ { "group": "Main Fields", "type": "String", "optional": false, "field": "link", "description": "

Link of survey

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "title", "description": "

Title of survey

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "intro", "description": "

Introduction text ("" means default)

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "concl", "description": "

Conclusion text ("" means default)

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "show_intro", "description": "

Hide or show introduction (0-hide, 1-show)

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "show_concl", "description": "

Hide or show conclusion (0-hide, 1-show)

" }, { "group": "Main Fields", "type": "String", "optional": false, "field": "page_id", "description": "

ID of last page in survey

" }, { "group": "Main Fields", "type": "Object[]", "optional": false, "field": "questions", "description": "

Array of all questions in survey

" } ], "Question Fields": [ { "group": "Question Fields", "type": "String", "optional": false, "field": "id", "description": "

Id of question in survey

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "type", "description": "

Type in text of question in survey

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "type_code", "description": "

Type in code of question in survey

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "title", "description": "

Title/text of question in survey

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "info", "description": "

Additional information of question (e.g. "Multiple answers are possible")

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "variable", "description": "

Short mark of question in survey (question name)

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "page_id", "description": "

ID of page that question is at

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "page_title", "description": "

Name/text of page that question is at

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "reminder", "description": "

Reminder of question (0-no reminder, 1-soft reminder, 2-hard reminder)

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "order", "description": "

Sequence number of question in page

" }, { "group": "Question Fields", "type": "String", "optional": false, "field": "params", "description": "

Additional params as string for question

" }, { "group": "Question Fields", "type": "Object[]", "optional": false, "field": "options", "description": "

Array of options/answers/values of question

" } ], "Value Fields": [ { "group": "Value Fields", "type": "String", "optional": false, "field": "id", "description": "

Id of value in question

" }, { "group": "Value Fields", "type": "String", "optional": false, "field": "title", "description": "

Title of value in question

" }, { "group": "Value Fields", "type": "String", "optional": false, "field": "variable", "description": "

Short mark of value in question (value name)

" }, { "group": "Value Fields", "type": "String", "optional": false, "field": "other", "description": "

Is this value other (0-basic, 1-other)

" }, { "group": "Value Fields", "type": "String", "optional": false, "field": "order", "description": "

Sequence number of value in the question

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n \"link\": \"http:\\/\\/192.168.0.101\\/1ka\\/a\\/109\",\n \"title\": \"A survey\",\n \"intro\": \"\",\n \"concl\": \"\",\n \"show_intro\": \"1\",\n \"show_concl\": \"1\",\n \"page_id\": \"135\",\n \"questions\": [{\n \"id\": \"487\",\n \"type\": \"Single answer\",\n \"type_code\": \"1\",\n \"title\": \"City\",\n \"info\": \"\",\n \"variable\": \"Q1\",\n \"page_id\": \"134\",\n \"page_title\": \"Stran 1\",\n \"reminder\": \"0\",\n \"orientation\": \"1\",\n \"order\": \"1\",\n \"params\": [],\n \"options\": [{\n \"id\": \"1438\",\n \"title\": \"Ljubljana\",\n \"variable\": \"1\",\n \"other\": \"0\",\n \"order\": \"1\"\n }, {\n \"id\": \"1439\",\n \"title\": \"Berlin\",\n \"variable\": \"2\",\n \"other\": \"0\",\n \"order\": \"2\"\n }, {\n \"id\": \"1440\",\n \"title\": \"London\",\n \"variable\": \"3\",\n \"other\": \"0\",\n \"order\": \"3\"\n }, {\n \"id\": \"1445\",\n \"title\": \"Other:\",\n \"variable\": \"4\",\n \"other\": \"1\",\n \"order\": \"4\"\n }]\n }, {\n \"id\": \"488\",\n \"type\": \"Multiple answer\",\n \"type_code\": \"2\",\n \"title\": \"Country\",\n \"info\": \"Multiple answers possible\",\n \"variable\": \"Q2\",\n \"page_id\": \"134\",\n \"page_title\": \"Stran 1\",\n \"reminder\": \"0\",\n \"orientation\": \"1\",\n \"order\": \"2\",\n \"params\": [],\n \"options\": [{\n \"id\": \"1441\",\n \"title\": \"Slovenia\",\n \"variable\": \"Q2a\",\n \"other\": \"0\",\n \"order\": \"1\"\n }, {\n \"id\": \"1442\",\n \"title\": \"Germany\",\n \"variable\": \"Q2b\",\n \"other\": \"0\",\n \"order\": \"2\"\n }, {\n \"id\": \"1443\",\n \"title\": \"UK\",\n \"variable\": \"Q2c\",\n \"other\": \"0\",\n \"order\": \"3\"\n }, {\n \"id\": \"1446\",\n \"title\": \"Other:\",\n \"variable\": \"Q2d\",\n \"other\": \"1\",\n \"order\": \"4\"\n }]\n }, {\n \"id\": \"489\",\n \"type\": \"Text input\",\n \"type_code\": \"21\",\n \"title\": \"Write a name\",\n \"info\": \"\",\n \"variable\": \"Q3\",\n \"page_id\": \"135\",\n \"page_title\": \"Page 2\",\n \"reminder\": \"0\",\n \"orientation\": \"1\",\n \"order\": \"1\",\n \"params\": {\n \"taWidth\": \"-1\",\n \"taSize\": \"1\",\n \"captcha\": \"0\",\n \"emailVerify\": \"0\",\n \"prevAnswers\": \"0\",\n \"disabled_vprasanje\": \"0\"\n },\n \"options\": [{\n \"id\": \"1444\",\n \"title\": \"Input text\",\n \"variable\": \"Q3a\",\n \"other\": \"0\",\n \"order\": \"1\"\n }]\n }]\n }", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyInfo/survey/:id", "title": "getSurveyInfo", "name": "getSurveyInfo", "group": "Surveys", "description": "

Get info of survey

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Number", "optional": false, "field": "count", "description": "

Number of surveys in list

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "link", "description": "

Access link of survey for respondents

" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "surveys", "description": "

Array of surveys

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "id", "description": "

ID of survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "naslov", "description": "

Title of survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "active", "description": "

Current activity of survey (1 – survey is active, 0 – survey is not active)

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "block_ip", "description": "

Blocked IP in minutes – 0 off (1440 = 24h) - if on, respondent can not access to survey again for given minutes

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "e_name", "description": "

Name of editor of survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "i_name", "description": "

Name of author of survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "e_time", "description": "

Last edited

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "i_time", "description": "

Created

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "v_time_first", "description": "

First entry

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "v_time_last", "description": "

Last entry

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "answers", "description": "

Number of units

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "variables", "description": "

Number of questions

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "lastingfrom", "description": "

Date of start survey duration

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "lastinguntill", "description": "

Date of end survey duration

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "survey_type", "description": "

Type of survey (2-survey, 0-voting, 1-form)

" } ] }, "examples": [ { "title": "Success-Response:", "content": " {\"count\":1,\n \"surveys\":[\n {\"id\":\"29\",\n \"folder\":\"1\",\n \"del\":\"1\",\n \"naslov\":\"Test 111\",\n \"active\":\"1\",\n \"mobile_created\":\"0\",\n \"block_ip\":\"0\",\n \"edit_uid\":\"1045\",\n \"e_name\":\"admin\",\n \"e_surname\":\"admin\",\n \"e_email\":\"admin\",\n \"insert_uid\":\"1045\",\n \"i_name\":\"admin\",\n \"i_surname\":\"admin\",\n \"i_email\":\"admin\",\n \"e_time\":\"08.11.18 11:36\",\n \"i_time\":\"27.07.18 11:36\",\n \"v_time_first\":\"27.07.18 14:31\",\n \"v_time_last\":\"20.08.18 9:33\",\n \"answers\":\"8\",\n \"approp\":\"7\",\n \"variables\":\"12\",\n \"trajanjeod\":\"08.11.18\",\n \"trajanjedo\":\"08.02.19\",\n \"survey_type\":\"2\"}\n ],\n \"link\":\"http:\\/\\/www.1ka.si\\/a\\/109\"\n}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyList?limit=3", "title": "getSurveyList", "name": "getSurveyList", "group": "Surveys", "description": "

Get list of info of all surveys

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "limit", "description": "

Optional Limit of surveys to return, DESC order by time of new input (answer)

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Number", "optional": false, "field": "count", "description": "

Number of surveys in list

" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "surveys", "description": "

Array of surveys

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "id", "description": "

ID of survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "naslov", "description": "

Title of survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "active", "description": "

Current activity of survey (1 – survey is active, 0 – survey is not active)

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "block_ip", "description": "

Blocked IP in minutes – 0 off (1440 = 24h) - if on, respondent can not access to survey again for given minutes

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "e_name", "description": "

Name of editor of survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "i_name", "description": "

Name of author of survey

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "e_time", "description": "

Last edited

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "i_time", "description": "

Created

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "v_time_first", "description": "

First entry

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "v_time_last", "description": "

Last entry

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "answers", "description": "

Number of units

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "variables", "description": "

Number of questions

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "lastingfrom", "description": "

Date of start survey duration

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "lastinguntill", "description": "

Date of end survey duration

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "survey_type", "description": "

Type of survey (2-survey, 0-voting, 1-form)

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\"count\":3,\n \"surveys\":[\n {\"id\":\"29\",\n \"folder\":\"1\",\n \"del\":\"1\",\n \"naslov\":\"Test 111\",\n \"active\":\"1\",\n \"mobile_created\":\"0\",\n \"block_ip\":\"0\",\n \"edit_uid\":\"1045\",\n \"e_name\":\"admin\",\n \"e_surname\":\"admin\",\n \"e_email\":\"admin\",\n \"insert_uid\":\"1045\",\n \"i_name\":\"admin\",\n \"i_surname\":\"admin\",\n \"i_email\":\"admin\",\n \"e_time\":\"08.11.18 11:36\",\n \"i_time\":\"27.07.18 11:36\",\n \"v_time_first\":\"27.07.18 14:31\",\n \"v_time_last\":\"20.08.18 9:33\",\n \"answers\":\"8\",\n \"approp\":\"7\",\n \"variables\":\"12\",\n \"trajanjeod\":\"08.11.18\",\n \"trajanjedo\":\"08.02.19\",\n \"survey_type\":\"2\"},...\n ]}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "get", "url": "https://www.1ka.si/api/getSurveyResponses", "title": "getSurveyResponses", "name": "getSurveyResponses", "group": "Surveys", "description": "

Get list of numbers of all surveys responses (and info about activity) with keys as survey ID

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "String", "optional": false, "field": "answers", "description": "

Number of all responses

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "active", "description": "

Is survey active right now (1-active, 0-unactive)

" } ] }, "examples": [ { "title": "Success-Response:", "content": "{\n\t\"4401\": {\n\t\t\"answers\": \"1103\",\n\t\t\"active\": \"0\"\n\t},\n\t\"5012\": {\n\t\t\"answers\": \"190\",\n\t\t\"active\": \"1\"\n\t},\n\t\"5330\": {\n\t\t\"answers\": \"88\",\n\t\t\"active\": \"1\"\n\t}\n}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" }, { "type": "post", "url": "https://www.1ka.si/api/updateSurvey/survey/:id", "title": "updateSurvey", "name": "updateSurvey", "group": "Surveys", "description": "

Update basic survey properties

", "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "identifier", "description": "

Identifier to access API (https://www.1ka.si/d/en/about/1ka-api/api-key)

" }, { "group": "Header", "type": "String", "optional": false, "field": "token", "description": "

SHA256 hash token calculated with API key (https://www.1ka.si/d/en/about/1ka-api/example2/get-call-example-php)

" } ] }, "examples": [ { "title": "Request-Example:", "content": "{ \"identifier\": \"abcdefgh01234567\",\n \"token\": \"bd26lo2863dzcyidb8d7rmwo7xydhpoa77kbdamwtlj5ej70akgffb0b7aj30zqh\" }", "type": "json" } ] }, "parameter": { "fields": { "GET parameter": [ { "group": "GET parameter", "type": "Number", "optional": false, "field": "id", "description": "

Id of survey

" } ], "POST parameter": [ { "group": "POST parameter", "type": "String", "optional": true, "field": "title", "description": "

Title of survey

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "que_title", "description": "

Title/text of question (only voting)

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "introduction", "description": "

Introduction text of survey or form ("" stands for default text)

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "conclusion", "description": "

Conclusion text of survey or form ("" stands for default text)

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "show_intro", "description": "

Do we show introduction (0-hide, 1-show)

" }, { "group": "POST parameter", "type": "String", "optional": true, "field": "show_concl", "description": "

Do we show conclusion (0-hide, 1-show)

" } ] }, "examples": [ { "title": "Post-example (survey or form): ", "content": "{\n \"title\":\"A survey\",\n \"introduction\":\"\",\n \"conclusion\":\"Thank you!\",\n \"show_intro\":\"1\",\n \"show_concl\":\"1\"\n}", "type": "json" }, { "title": "Post-example (voting): ", "content": "{\n \"title\":\"Weekly voting\",\n \"que_title\":\"What is your vote?\"\n}", "type": "json" } ] }, "success": { "examples": [ { "title": "Success-Response:", "content": "{\"note\":\"Survey updated\"}", "type": "json" } ] }, "version": "1.0.0", "filename": "./class.ApiSurvey.php", "groupTitle": "Surveys" } ] });