- MongoDB Atlas
- AWS S3
Check API status
- Headers: None
- Body: None
- Status:
200 OK
- Body:
OK
Log user in and retrieve JWT Token
- Headers: None
- Body:
{ email: string, password: string }
- Status:
200 OK
if login is successful401 Unauthorized
if email or password is incorrect
- Body:
{ "token": <JWTSessionToken> }
Register a new user and retrieve JWT Token
- Headers: None
- Body:
{ name: string, email: string, password: string }
- Status:
201 Created
if registration is successful409 Conflict
if user already exists
- Body:
{ "token": <JWTSessionToken> }
Retrieve all spaces for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body: None
- Status:
200 OK
if spaces are retrieved successfully401 Unauthorized
if the user is not authenticated
- Body:
[ { "_id": "string", "user_id": "string", "name": "string", "description?": "string", "coords1": number[2], "coords2": number[2], "superSpace": Space, "subSpaces": Space[], "thingList": Thing[] } ]
Retrieve a specific space by ID for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body: None
- Status:
200 OK
if space are retrieved successfully401 Unauthorized
if the user is not authenticated404 Not Found
if the space is not found
- Body:
{ "_id": "string", "user_id": "string", "name": "string", "description?": "string", "coords1": number[2], "coords2": number[2], "superSpace": Space, "subSpaces": Space[], "thingList": Thing[] }
Create a new space for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body:
{ "name": "string", "description?": "string", "coords1": number[2], "coords2": number[2], "superSpace": Space, "image?" File }
- Status:
201 Created
if space are created successfully401 Unauthorized
if the user is not authenticated
- Body:
{ "_id": "string", "user_id": "string", "name": "string", "description?": "string", "coords1": number[2], "coords2": number[2], "superSpace": Space, "subSpaces": Space[], "thingList": Thing[], "image?": URL }
Update a specific space by ID for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body:
{ "name?": "string", "description?": "string", "coords1?": number[2], "coords2?": number[2], "superSpace?": Space, "subSpaces?": Space[], "thingList?": Thing[], "image?": File }
- Status:
200 OK
if space are updated successfully401 Unauthorized
if the user is not authenticated404 Not Found
if the space is not found- Body:
{
"_id": "string",
"user_id": "string",
"name": "string",
"description?": "string",
"coords1": number[2],
"coords2": number[2],
"superSpace": Space,
"subSpaces": Space[],
"thingList": Thing[],
"image?": URL
}
Delete a specific space by ID for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body: None
- Status:
200 OK
if space are updated successfully401 Unauthorized
if the user is not authenticated404 Not Found
if the space is not found- Body:
{
"message": "Space deleted successfully"
}
Retrieve all things for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Query Params:
?recursive
: boolean, if true, recursively return all things in subspaces?space
: string, if provided, returns from specific space
- Body: None
- Status:
200 OK
if things are retrieved successfully401 Unauthorized
if the user is not authenticated404 Not Found
if the space is not found
- Body:
[ { "_id": "string", "user_id": "string", "name": "string", "description?": "string", "space": Space, "image?": "string" } ]
Retrieve a specific thing by ID for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body: None
- Status:
200 OK
if thing are retrieved successfully401 Unauthorized
if the user is not authenticated404 Not Found
if the thing is not found
- Body:
{ "_id": "string", "user_id": "string", "name": "string", "description?": "string", "space": Space, "image?": "string" }
Create a new thing for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body:
{ "name": "string", "description?": "string", "space": "string", "image?": File }
- Status:
201 Created
if thing are created successfully401 Unauthorized
if the user is not authenticated404 Not Found
if the space is not found
- Body:
{ "_id": "string", "user_id": "string", "name": "string", "description?": "string", "space": Space, "image?": URL }
Update a specific thing by ID for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body:
{ "name?": "string", "description?": "string", "space?": "string", "image?": File }
- Status:
200 OK
if thing is updated successfully401 Unauthorized
if the user is not authenticated404 Not Found
if the thing is not found- Body:
{
"_id": "string",
"user_id": "string",
"name": "string",
"description?": "string",
"space": Space,
"image?": URL
}
Delete a specific thing by ID for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body: None
- Status:
200 OK
if thing is deleted successfully401 Unauthorized
if the user is not authenticated404 Not Found
if the thing is not found- Body:
{
"message": "Thing deleted successfully"
}