- 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 OKif login is successful401 Unauthorizedif 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 Createdif registration is successful409 Conflictif user already exists
- Body:
{ "token": <JWTSessionToken> }
Retrieve all spaces for the authenticated user
- Headers:
Authorization: Bearer <JWTSessionToken>
- Body: None
- Status:
200 OKif spaces are retrieved successfully401 Unauthorizedif 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 OKif space are retrieved successfully401 Unauthorizedif the user is not authenticated404 Not Foundif 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 Createdif space are created successfully401 Unauthorizedif 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 OKif space are updated successfully401 Unauthorizedif the user is not authenticated404 Not Foundif 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 OKif space are updated successfully401 Unauthorizedif the user is not authenticated404 Not Foundif 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 OKif things are retrieved successfully401 Unauthorizedif the user is not authenticated404 Not Foundif 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 OKif thing are retrieved successfully401 Unauthorizedif the user is not authenticated404 Not Foundif 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 Createdif thing are created successfully401 Unauthorizedif the user is not authenticated404 Not Foundif 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 OKif thing is updated successfully401 Unauthorizedif the user is not authenticated404 Not Foundif 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 OKif thing is deleted successfully401 Unauthorizedif the user is not authenticated404 Not Foundif the thing is not found- Body:
{
"message": "Thing deleted successfully"
}