REST API Endpoints - TINF16C-WE2-IE/TheIndoorExplorer GitHub Wiki
Version: 1.0.0
Terms of service:
Contact information:
[email protected]
Security
session_cookie
apiKey | API Key |
---|---|
Name | Session Cookie |
In | header |
/map
GET
Summary: Get maps
Description: Get all maps that the user has access to (public/private).
Responses
Code | Description | Schema |
---|---|---|
200 | success | [ Map ] |
/map/{mapid}
GET
Summary: Get one map
Description: Get map data of a specific map if the user has access.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
mapid | path | Map ID | Yes | number |
Responses
Code | Description | Schema |
---|---|---|
200 | success | MapJSON |
404 | no map with this id exists or the access was denied |
POST
Summary: Save map
Description: Save/Create edited map.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
mapid | path | Map ID | Yes | number |
Responses
Code | Description |
---|---|
201 | success |
401 | user not logged in |
403 | no write permission |
404 | no map with this id exists or the access was denied |
Security
Security Schema | Scopes |
---|---|
session_cookie |
DELETE
Summary: Delete map
Description: Delete existing map.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
mapid | path | Map ID | Yes | number |
Responses
Code | Description |
---|---|
204 | success |
403 | no delete permission |
404 | no map with this id exists or the access was denied |
Security
Security Schema | Scopes |
---|---|
session_cookie |
/map/{mapid}/publish
POST
Summary: Publish map
Description: Request review in order to publish map.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
mapid | path | Map ID | Yes | number |
Responses
Code | Description |
---|---|
204 | success |
404 | no map with this id exists or the access was denied |
418 | you need to supply coffee |
Security
Security Schema | Scopes |
---|---|
session_cookie |
/user
GET
Summary: Get User Info
Description: Get info about logged in user
Responses
Code | Description | Schema |
---|---|---|
200 | success | User |
401 | user not logged in | |
404 | user not found |
Security
Security Schema | Scopes |
---|---|
session_cookie |
/user/logout
POST
Summary: Log out user
Description: Logout out current user
Responses
Code | Description |
---|---|
204 | success |
400 | error |
Security
Security Schema | Scopes |
---|---|
session_cookie |
Models
Map
Name | Type | Description | Required |
---|---|---|---|
id | integer | No | |
name | string | No | |
visibility | integer | is public map (0/1) | No |
permission | integer | has write permission (0/1) | No |
favorite | boolean | is favorite | No |
MapJSON
Name | Type | Description | Required |
---|---|---|---|
id | integer | No | |
name | string | No | |
floors | [ object ] | actual map data | No |
visibility | integer | is public map (0/1) | No |
permission | integer | has write permission (0/1) | No |
favorite | boolean | is favorite | No |
User
Name | Type | Description | Required |
---|---|---|---|
id | long | No | |
username | string | No |