API BSG
api
action-type > list
-
Description:
List of available action types.
NOTE:
- Available only for logged users.
-
Return:
List of action types (id, name, description).
action-type > read
-
Description:
Retrieve specific action type.
NOTE:
- Available only for logged users.
-
Return:
Action type (id, name, description) or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this type. |
app_menu > list
-
Description:
Tree of active app menus.
-
Return:
Tree of app menus (title, item[id], url, title_translation[list of name translation {language, text}], child_menus_data[app menu]).
area > list
-
Description:
List of active areas.
NOTE:
- Available only for logged users.
-
Return:
List of areas (id, name, name_full, description, type_data{id,name,description}, country, adress, logo[url to image], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}]).
area > read
-
Description:
Retrieve the specific active area.
NOTE:
- Available only for logged users.
-
Return:
Area (id, name, name_full, description, type_data{id,name,description}, country, adress, logo_url[url], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}]) or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this area. |
area-type > list
-
Description:
List of available area types.
NOTE:
- Available only for logged users.
-
Return:
List of area types (id, name, description).
area-type > read
-
Description:
Retrieve specific area type.
NOTE:
- Available only for logged users.
-
Return:
Area type (id, name, description) or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this type. |
badge > list
-
Description:
List of active badges.
NOTE:
- Available only for logged users.
-
Return:
List of areas (id, name, name_full, description, resources_data [resource{id, name, type, type_name, file_url, translation_data{language, file_url}}], description_translation[list of name translation {language, text}]).
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
id | Id of badge |
name | Name of badge |
country > list
-
Description:
List of countries.
NOTE:
- Available only for logged users.
-
Return:
List of countries (id, key, value).
EXAMPLE: (1, "PL", "Polska")
country > read
-
Description:
Retrieve specific country.
NOTE:
- Available only for logged users.
-
Return:
Country (id, key, value) or if not found:
"detail": "Not found."
.EXAMPLE: (1, "PL", "Polska")
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this country. |
events > list
-
Description:
List of current authenticated user events.
NOTE:
- Available only for logged users.
-
Return:
List of events (id, action_type, user[id], date, description, achievements_data, item, route, item_resource, language). If event fullfiled some active rules then 'achievements_data' dict is fulfilled {items_data:[], avatar_data, badges_data:[], points, texts_data:[], congratulation_items_data: []}
events > create
-
Description:
Register an event of action in the area location or musemum, for the current authenticated user.
NOTE:
-
Available only for logged users.
-
In description field you may send variables with value in format [variable=value] example: [game_result=300] *
-
-
Return:
Event (id, action_type, user[id], date, description, achievements_data, item, route, item_resource, language). If event fullfiled some active rules then 'achievements_data' dict is fulfilled {items_data:[], avatar_data, badges_data:[], points, texts_data:[], congratulation_items_data: []}
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
action_type required | An unique string value identifying action type. |
description | Info about an event |
item | A unique integer value identifying item. |
route | A unique integer value identifying route. |
item_resource | A unique integer value identifying item resource. |
language | A unique integer value identifying language. |
events > read
-
Description:
Retrieve specific event for the current authenticated user.
NOTE:
- Available only for logged users.
-
Return:
Event (id, action_type, user[id], date, description, achievements_data, item, route, item_resource, language) or if not found:
"detail": "Not found."
. If event fullfiled some active rules then 'achievements_data' dict is fulfilled {items_data:[], avatar_data, badges_data:[], points, texts_data:[], congratulation_items_data: []}
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this event. |
item > list
-
Description:
List of available active items.
NOTE:
-
Available only for logged users.
-
Available only active.
-
-
Return:
List of items (id, name, name_full, description, type id, type_data{id,name,description}, kind, kind_data{id,name,description}, locations id [], resources_data [resource{id, name, type, type_name, file_url, translation_data{language, file_url}}], next_item(item id), child_items_data [items], quiz[id], survey[id], qr_code [data], latitude [24,16], longitude [24,16], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}], x(integer), y(integer), fullscreen(boolean), zoomout(boolean)).
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
id | Id of item |
name | Name of item |
type__id | Id of type |
type__name | Name of type |
kind__id | Id of kind |
kind__name | Name of kind |
item_locations__location__id | Id of item location |
item_locations__location__name | Name of item location |
item_tags__tag__name | Name of item tag |
parent_item__item__id | Id of parent item |
type__id | Id of type |
type__name | Name of type |
item_routes__route__id | Id of route |
item_routes__route__name | Name of route |
item_locations__default | Id of item location |
item-kind > list
-
Description:
List of available item kinds.
NOTE:
- Available only for logged users.
-
Return:
List of item kinds (id, name, description).
item-kind > read
-
Description:
Retrieve specific item kind.
NOTE:
- Available only for logged users.
-
Return:
Item kind (id, name, description) or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this type. |
item-type > list
-
Description:
List of available item types.
NOTE:
- Available only for logged users.
-
Return:
List of item types (id, name, description).
item-type > read
-
Description:
Retrieve specific item type.
NOTE:
- Available only for logged users.
-
Return:
Item type (id, name, description) or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this type. |
language > list
-
Description:
List of languages.
-
Return:
List of languages (id, key, value).
EXAMPLE: (1, "PL", "polski")
language > read
-
Description:
Retrieve specific language.
-
Return:
Language (id, key, value) or if not found:
"detail": "Not found."
.EXAMPLE: (1, "PL", "polski")
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this language. |
locations > list
-
Description:
List of available locations.
NOTE:
-
Available only for logged users.
-
Available only active.
-
-
Return:
List of locations (id, name, name_full, description, type_data{id,name,description}, areas[area], routes[route], resources_data [resource{id, name, type, type_name, file_url, translation_data{language, file_url}}], quiz[id], survey[id], qr_code [data], latitude [24,16], longitude [24,16], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}], x(integer), y(integer), default_screen (item_id), screens(itme id of type screen)).
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
id | Id of location |
name | Name of location |
location_routes__route__id | Id of location route |
location_routes__route__name | Name of location route |
locations-type > list
-
Description:
List of available location types.
NOTE:
- Available only for logged users.
-
Return:
List of location types (id, name, description).
locations-type > read
-
Description:
Retrieve specific location type.
NOTE:
- Available only for logged users.
-
Return:
Location type (id, name, description) or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this type. |
quiz > list
-
Description:
List of available Quizzes.
NOTE:
-
Only that quizzes are available, that are related to the connnected to the application (sending request).
-
Field 'name_translation' is a collection.
-
Field 'name_full_translation' is a collection.
-
Field 'description_translation' is a collection.
-
Available only for logged users.
-
Available only active.
-
Available with area application for token application.
-
-
Return:
List of quizzes (id, name, name_full, description, location, item, language[], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}]).
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
location__id | Id of location |
item__id | Id of item |
quiz > read
-
Description:
Retrieve specific quiz.
NOTE:
-
Only that quizzes are available, that are related to the connnected to the application (sending request).
-
Field 'name_translation' is a collection.
-
Field 'name_full_translation' is a collection.
-
Field 'description_translation' is a collection.
-
Field 'questions_data' is a collection.
-
Field 'options_data' is a collection.
-
Field 'file_url' url to BLOB.
-
Available only for logged users.
-
Available only active.
-
Available with area application for token application.
-
-
Return:
Quiz (id, name, name_full, description, location, item, language[], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}], questions_data [{id, no, type, description, file_url, description_translation [list of description translation {language, text}], options_data [{id, no, description, file_url, description_translation [[list of description translation {language, text}]]]}]}). or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this quiz. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
location__id | Id of location |
item__id | Id of item |
quiz-answer > create
-
Description:
Save, check answer and return answer data.
NOTE:
-
Field 'options_selected_data' is a collection of selected options.
-
Field 'question_data' represents the complete set of data about the question.
-
Field 'file_url' url to BLOB.
-
Available only for logged users.
-
Available only active.
-
Available with location/item for area token application.
-
-
Return:
Answer {id, fulfillment id, question id, value, correct, options_selected_data [{id,no,description,file_url, description_translation}], question_data {id,no,type,description,value_type,file_url, options_data[{id,no,description,file_url,correct}], correct_value}, event}
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
fulfillment required | |
question required | |
value | |
options_data | |
event |
quiz-fulfillment > list
-
Description:
List of user quiz fulfillemts.
NOTE:
-
Only that fulfillments are available, that are related to logged user.
-
Available only for logged users.
-
Available only fulfillments for active quzi.
-
-
Return:
List of fulfillments (id, quiz(id), user(id), date_add, all_answers_sent(bool), answers_data[answer]).
quiz-fulfillment > create
-
Description:
Save and return fulfillment data.
NOTE:
-
Only that fulfillments are available, that are related to logged user.
-
Available only for logged users.
-
Available only fulfillments for active quzi.
-
Return:
Fulfillment (id, quiz(id), user(id), date_add, all_answers_sent(bool), answers_data[answer]).
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
quiz required |
quiz-fulfillment > read
-
Description:
Retrieve specific quiz fulfillemt.
NOTE:
-
Only that fulfillments are available, that are related to logged user.
-
Available only for logged users.
-
Available only fulfillments for active quzi.
-
Return:
Fulfillment (id, quiz(id), user(id), date_add, all_answers_sent(bool), answers_data[answer]) or "detail": "Not found." not available.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this fulfillment. |
route > list
-
Description:
List of available areas routes.
NOTE:
-
Available only for logged users.
-
Available only active.
Available with no area or area application for token application.
-
-
Return:
List of routes (id, name, name_full, description, type, type_data{id,name,description}, areas[ids], areas_data[area], locations_data[location], items_data[item], route_start[M - map item / F - first item], map_item[item id], first_item[item id], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}], languages[list pf languages]).
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
id | Id of item |
name | Name of item |
type__id | Id of type |
type__name | Name of type |
languages__id | Id of language |
languages__key | Key of language |
route_items__item__id | Id of item |
route_items__item__name | Name of item |
route > read
-
Description:
Retrieve specific area route.
NOTE:
-
Only that routes are available, that are related to the areas connected to the application (sending request).
-
Field 'Areas ids' is a collection.
-
Field 'locations ids' is a collection.
-
Available only for logged users.
-
Available only active.
-
Available with no area or area application for token application.
-
-
Return:
Route (id, name, name_full, description, type, type_data{id,name,description}, logo_url[url], areas[ids], areas_data[area], locations_data[location], items_data[item], route_start[M - map item / F - first item], map_item[item id], first_item[item id], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}], languages[list pf languages]). or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this route. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
id | Id of item |
name | Name of item |
type__id | Id of type |
type__name | Name of type |
languages__id | Id of language |
languages__key | Key of language |
route_items__item__id | Id of item |
route_items__item__name | Name of item |
route-type > list
-
Description:
List of available route types.
NOTE:
- Available only for logged users.
-
Return:
List of route types (id, name, description).
route-type > read
-
Description:
Retrieve specific route type.
NOTE:
- Available only for logged users.
-
Return:
Route type (id, name, description, description_translation[list of name translation {language, text}]) or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this type. |
site > list
-
Description:
List of active sites.
-
Return:
List of sites (id, name, title, description, about, terms_url[url to terms page], logo[url to image], image[url to image], header[url], title_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}], about_translation[list of name translation {language, text}]).
survey > list
-
Description:
List of available Surveys.
NOTE:
-
Only that surveys are available, that are related to the connnected to the application (sending request).
-
Field 'name_translation' is a collection.
-
Field 'name_full_translation' is a collection.
-
Field 'description_translation' is a collection.
-
Available only for logged users.
-
Available only active.
-
Available with area application for token application.
-
-
Return:
List of surveys (id, name, name_full, description, location, item, language[], name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}]).
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
location__id | Id of location |
item__id | Id of item |
survey > read
-
Description:
Retrieve specific survey.
NOTE:
-
Only that surveys are available, that are related to the connnected to the application (sending request).
-
Field 'name_translation' is a collection.
-
Field 'name_full_translation' is a collection.
-
Field 'description_translation' is a collection.
-
Field 'questions_data' is a collection.
-
Field 'options_data' is a collection.
-
Field 'file_url' url to BLOB.
-
Available only for logged users.
-
Available only active.
-
Available with area application for token application.
-
-
Return:
Survey (id, name, name_full, description, language[], location, item, name_full_translation[list of name translation {language, text}], description_translation[list of name translation {language, text}], questions_data [{id, no, type, description, file_url, description_translation [list of description translation {language, text}], options_data [{id, no, description, file_url, description_translation [[list of description translation {language, text}]]]}]}). or if not found:
"detail": "Not found."
.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this survey. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
location__id | Id of location |
item__id | Id of item |
survey-answer > create
-
Description:
Save, check answer and return answer data.
NOTE:
-
Field 'options_selected_data' is a collection of selected options.
-
Field 'question_data' represents the complete set of data about the question.
-
Field 'file_url' url to BLOB.
-
Available only for logged users.
-
Available only active.
-
Available with location/item for area token application.
-
-
Return:
Answer {id, fulfillment id, question id, value, options_selected_data [{id,no,description,file_url, description_translation}], event}
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
fulfillment required | |
question required | |
value | |
options_data | |
event |
survey-fulfillment > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
survey required |
team > list
List of groups in which user is member.
**NOTE:**
* Available only for logged users.
-
Return:
List of teams (id, name, users [users], avatar, access_code).
team > read
NOTE:
* Available only for logged users and user must be a member of group.
-
Return:
Team (id, name, users [users], avatar, access_code).
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this team. |
team-create > create
-
Description:
Create new group.
NOTE:
-
Status 201 - Created
-
Status 464 - Member of other team
-
Field 'name' is a name of new group.
-
Field 'avatar' is an image which will be avatar of group.
-
-
Return:
Team (id, name, users [users], avatar, access_code).
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | |
avatar |
team-edit > read
-
Return:
Team (id, name, users [users], avatar, access_code).
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this team. |
team-edit > update
-
Description:
Update team informations.
NOTE:
- Available only for logged users.
-
Return:
Team (id, name, users [users], avatar, access_code).
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this team. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | |
avatar |
team-edit > partial_update
-
Description:
Partial update team informations.
NOTE:
- Available only for logged users.
-
Return:
Team (id, name, users [users], avatar, access_code).
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this team. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name | |
avatar |
team-edit > delete
-
Description:
Delete team.
NOTE:
- Available only for logged users.
-
Return:
None
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this team. |
team-membership > create
-
Description:
Create new membership
NOTE:
-
Status 200 - Group joined
-
Status 404 - Not Found
-
Status 461 - Invalid credentials
-
Status 462 - Already a member
-
Status 464 - Member of other team
-
Field 'avatar' is an image which will be avatar of group.
-
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | |
access_code |
team-membership > delete
-
Description:
Delete membership
NOTE:
-
Status 200 - Group leaved
-
Status 404 - Not Found
-
Status 463 - Not a member
-
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
name required |
ui_translation > list
-
Description:
List of ui translations.
-
Return:
List of ui translations (id, text, text_translation[list of text translation {language, text}]).
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
id | Id of translation |
text | Text to translation |
user_profile > list
-
Description:
Current authenticated user profile.
NOTE:
- Available only for logged users.
-
Return:
List of users profiles (id, username, first_name, last_name, status, language, country, user, guest, points, level_up_points, level_current_points, for_delete, owned_items_data[items], avatar(item), badges_data[badges]).
user_profile > create
-
Description:
Create profile.
NOTE:
-
If guest=false - username, email is required.
-
If guest=true - username is generated automatically
-
password is required.
-
password and confirm password in output is to confirm that password has been changed "[CHANGED]", otherwise ""
-
-
Return:
Users profile (id, username, email, password, confirm_password, language, country, for_delete, guest)
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username | |
email | |
password | |
confirm_password | |
language | |
country | |
for_delete | |
guest |
user_profile > update
-
Description:
Update profile informations about current, authenticated user.
NOTE:
-
All fields will be set, otherwise use update_partial.
-
password is required.
-
Available only for logged users.
-
password and confirm password in output is to confirm that password has been changed "[CHANGED]", otherwise ""
-
-
Return:
Users profile (id, username, email, password, confirm_password, language, country, for_delete, guest)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this user profile. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username required | |
email required | |
password required | |
confirm_password required | |
language | |
country | |
for_delete | |
guest |
user_profile > partial_update
-
Description:
Partial update profile informations about current, authenticated user.
NOTE:
-
Only sended fields will be set, otherwise use update.
-
Available only for logged users.
-
password and confirm password in output is to confirm that password has been changed "[CHANGED]", otherwise ""
-
-
Return:
Users profile (id, username, email, password, confirm_password, language, country, for_delete, guest)
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this user profile. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username | |
email | |
password | |
confirm_password | |
language | |
country | |
for_delete | |
guest |
auth
convert-token > create
Implements an endpoint to convert a provider token to an access token
The endpoint is used in the following flows:
- Authorization code
- Client credentials
token > create
Implements an endpoint to provide access tokens
The endpoint is used in the following flows:
- Authorization code
- Password
- Client credentials
private-media-api
read
-
Description:
Retrieve the specific resource file (if exists) for location and item.
Path parameter example for location: location/aligator.jpg
NOTE:
- Available only for logged users.
-
Return:
BLOB
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
path required |
user_profile
reset-achievements > list
- Description:
Reset achievements of current user.
- Return:
(message, error:[0-OK,1-error])