Base URL
https://{tenant}.logzi.com/api/exam/
Every request returns a JSON response. On success result.code == 1, on error result.code == 0.
/api/exam/get
Retrieve a single exam by its identifier.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
int | The exam's unique identifier |
Example request
GET /api/exam/get?id=1
X-API-KEY: {your_api_key}
Example response
{
"result": { "code": 1, "message": "success" },
"data": {
"id": 1,
"title": "Termékismeret vizsga",
"description": "Alapozó teszt új belépők számára.",
"company_id": 1,
"date_create": "2024-01-10 09:00:00",
"date_update": "2024-05-20 14:30:00"
}
}
/api/exam/list
Retrieve a paginated list of exams.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset |
int | Pagination offset (default: 0) | |
list_count |
int | Number of records per page (default: 20) | |
company_id |
int | Filter by company identifier |
Example request
GET /api/exam/list?list_offset=0&company_id=1
X-API-KEY: {your_api_key}
Example response
{
"result": { "code": 1, "message": "success" },
"data": [
{
"id": 1,
"title": "Termékismeret vizsga",
"description": "Alapozó teszt új belépők számára.",
"date_create": "2024-01-10 09:00:00",
"date_update": "2024-05-20 14:30:00"
}
],
"params": {
"list_all": 5,
"list_offset": 0,
"list_count": 20
}
}
/api/exam/save
Create or update an exam. For a new exam use data[id] = 0; to update, supply the existing ID.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | 0 = new exam, >0 = update | |
company_id |
int | Company identifier (required only for a new exam) | |
title |
string | The exam's name | |
description |
string | Description / instructions for the participant |
Example request
POST /api/exam/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"id": 0,
"company_id": 1,
"title": "Termékismeret vizsga",
"description": "Alapozó teszt új belépők számára."
}
}
Example response
{
"result": { "code": 1, "message": "Saved" },
"data": { "id": 3 }
}
/api/exam/delete
Soft-delete an exam.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | Identifier of the exam to delete |
Example request
POST /api/exam/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": { "id": 3 }
}
Example response
{
"result": { "code": 1, "message": "Deleted" },
"data": { "id": 3 }
}
/api/exam/question-list
Retrieve all questions belonging to an exam, together with their answer options.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
exam_id |
int | The exam's identifier |
Example request
GET /api/exam/question-list?exam_id=1
X-API-KEY: {your_api_key}
Example response
{
"result": { "code": 1, "message": "success" },
"data": [
{
"id": 10,
"exam_id": 1,
"question_text": "Mi a Logzi fő funkciója?",
"question_type": "radio",
"explanation_text": "A Logzi egy ERP rendszer.",
"sort_order": 1,
"answers": [
{ "id": 101, "answer_text": "Számlázás és készletkezelés", "is_correct": 1, "sort_order": 0 },
{ "id": 102, "answer_text": "Videóstream", "is_correct": 0, "sort_order": 1 }
]
}
]
}
/api/exam/question
Retrieve a single question by its identifier, together with its answer options.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
int | The question's identifier |
Example request
GET /api/exam/question?id=10
X-API-KEY: {your_api_key}
Example response
{
"result": { "code": 1, "message": "success" },
"data": {
"id": 10,
"exam_id": 1,
"question_text": "Mi a Logzi fő funkciója?",
"question_type": "radio",
"explanation_text": "A Logzi egy ERP rendszer.",
"sort_order": 1,
"answers": [
{ "id": 101, "answer_text": "Számlázás és készletkezelés", "is_correct": 1, "sort_order": 0 },
{ "id": 102, "answer_text": "Videóstream", "is_correct": 0, "sort_order": 1 }
]
}
}
/api/exam/save-question
Create or update a question together with its answer options. On update, existing answers are removed and new ones are inserted.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | 0 = new question, >0 = update | |
exam_id |
int | Exam identifier (required only for a new question) | |
question_text |
string | The question's text | |
question_type |
string | Question type: radio, checkbox, true_false, text |
|
explanation_text |
string | Explanatory text shown together with the answer | |
sort_order |
int | Sort order (default: 0) | |
answers |
array | Array of answer options (see below) — not needed for the text type |
Answer fields — data[answers][]
| Field | Type | Required | Description |
|---|---|---|---|
answer_text |
string | The answer option's text | |
is_correct |
int | 1 = correct answer, 0 = incorrect answer |
Example request
POST /api/exam/save-question
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"id": 0,
"exam_id": 1,
"question_text": "Mi a Logzi fő funkciója?",
"question_type": "radio",
"explanation_text": "A Logzi egy ERP rendszer.",
"sort_order": 1,
"answers": [
{ "answer_text": "Számlázás és készletkezelés", "is_correct": 1 },
{ "answer_text": "Videóstream", "is_correct": 0 }
]
}
}
Example response
{
"result": { "code": 1, "message": "Saved" },
"data": { "id": 10 }
}
/api/exam/delete-question
Delete a question. All answer options belonging to the question are deleted as well.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | Identifier of the question to delete |
Example request
POST /api/exam/delete-question
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": { "id": 10 }
}
Example response
{
"result": { "code": 1, "message": "Deleted" },
"data": { "id": 10 }
}
/api/exam/attempt-list
Retrieve the list of all attempts (submissions) for an exam, together with partner-user data.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
exam_id |
int | The exam's identifier |
Example request
GET /api/exam/attempt-list?exam_id=1
X-API-KEY: {your_api_key}
Example response
{
"result": { "code": 1, "message": "success" },
"data": [
{
"id": 5,
"exam_id": 1,
"partner_user_id": 12,
"partner_user_name": "Kovács Béla",
"partner_user_email": "kovacs.bela@example.com",
"status": "completed",
"score": 8,
"date_start": "2024-06-01 10:00:00",
"date_complete": "2024-06-01 10:15:00"
}
]
}
/api/exam/save-attempt
Start a new exam attempt (submission session) for a partner user. Returns the attempt's identifier and the key used in the submission link (chk).
POST fields
| Field | Type | Required | Description |
|---|---|---|---|
exam_id |
int | The exam's identifier | |
partner_user_id |
int | Identifier of the partner user taking the exam |
Example request
POST /api/exam/save-attempt
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"exam_id": 1,
"partner_user_id": 12
}
Example response
{
"result": { "code": 1, "message": "Created" },
"data": {
"id": 5,
"chk": "a3f9c2e1b07d..."
}
}
/api/exam/save-slide-answer
Save an answer to a question for an active attempt. When the last question is answered, the attempt closes automatically and the score is calculated.
POST fields
| Field | Type | Required | Description |
|---|---|---|---|
attempt_id |
int | The attempt's identifier | |
question_id |
int | Identifier of the question being answered | |
partner_user_id |
int | Identifier of the partner user taking the exam | |
selected_answer_ids |
array | Array of selected answer IDs (for the radio, checkbox, true_false types) |
|
text_answer |
string | Free-text answer (for a text-type question) |
Example request
POST /api/exam/save-slide-answer
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"attempt_id": 5,
"question_id": 10,
"partner_user_id": 12,
"selected_answer_ids": [101]
}
Example response (not the last question)
{
"result": { "code": 1, "message": "success" },
"data": {
"is_correct": 1,
"correct_answer_ids": [101],
"explanation_text": "A Logzi egy ERP rendszer.",
"is_last": false
}
}
Example response (last question — attempt closes)
{
"result": { "code": 1, "message": "success" },
"data": {
"is_correct": 1,
"correct_answer_ids": [101],
"explanation_text": "A Logzi egy ERP rendszer.",
"is_last": true,
"score": 9,
"total": 10
}
}
Create your account now,
pay later!