ArchersLab API (0.1.0)

Download OpenAPI specification:

License: MIT

CCAPDEV MCO

user

Login

Authorizations:
JwtNone
Request Body schema: application/json
email
required
string <email>
password
required
string <password> (UserPassword)

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "123456"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Logout

Authorizations:
Jwt

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Create a user

Authorizations:
JwtNone
Request Body schema: application/json
email
required
string <email>
password
required
string <password> (UserPassword)
required
object (UserName)

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "123456",
  • "name": {
    }
}

Response samples

Content type
application/json
"507f1f77bcf86cd799439011"

Get current user ID

Authorizations:
Jwt

Responses

Response samples

Content type
application/json
"507f1f77bcf86cd799439011"

Read a user

Authorizations:
JwtNone
path Parameters
id
required
string (UserId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the user

Responses

Response samples

Content type
application/json
{
  • "name": {
    },
  • "description": "Epic gamer",
  • "id": "507f1f77bcf86cd799439011",
  • "admin": true,
  • "editable": true
}

Update a user

Authorizations:
Jwt
path Parameters
id
required
string (UserId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the user

Request Body schema: application/json
required
object (UserName)
description
required
string
password
string <password> (UserPassword)

Responses

Request samples

Content type
application/json
{
  • "name": {
    },
  • "description": "Epic gamer",
  • "password": "123456"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete a user

Authorizations:
Jwt
path Parameters
id
required
string (UserId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the user

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Read a user image

Authorizations:
JwtNone
path Parameters
id
required
string (UserId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the user

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Update a user image

Authorizations:
Jwt
path Parameters
id
required
string (UserId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the user

Request Body schema: image/*
string <binary> (Image)

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete a user image

Authorizations:
Jwt
path Parameters
id
required
string (UserId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the user

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

lab

Read all labs

Authorizations:
JwtNone
query Parameters
q
string

The search query to filter labs

page
integer >= 1
Default: 1

Pagination query

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "hasNextPage": true
}

Create a lab

Authorizations:
Jwt
Request Body schema: application/json
required

The lab to create

name
required
string
required
object

Weekly schedule of the lab

required
Array of objects

Available slots in the lab

Responses

Request samples

Content type
application/json
{
  • "name": "GK403",
  • "weeklySchedule": {
    },
  • "slots": [
    ]
}

Response samples

Content type
application/json
"507f1f77bcf86cd799439011"

Read a lab

Authorizations:
JwtNone
path Parameters
id
required
string (LabId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the lab

Responses

Response samples

Content type
application/json
{
  • "name": "GK403",
  • "weeklySchedule": {
    },
  • "slots": [
    ],
  • "id": "507f1f77bcf86cd799439011",
  • "editable": true
}

Update a lab

Authorizations:
Jwt
path Parameters
id
required
string (LabId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the lab

Request Body schema: application/json
name
required
string
required
object

Weekly schedule of the lab

required
Array of objects

Available slots in the lab

Responses

Request samples

Content type
application/json
{
  • "name": "GK403",
  • "weeklySchedule": {
    },
  • "slots": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete a lab

Authorizations:
Jwt
path Parameters
id
required
string (LabId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the lab

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

reservation

Create a reservation

Authorizations:
Jwt
Request Body schema: application/json
anonymous
boolean
required
object (Interval)

Time interval

slotIds
required
Array of strings (SlotId) [ items non-empty ]
labId
required
string (LabId) ^[0-9a-fA-F]{24}$

The unique identifier of a lab

Responses

Request samples

Content type
application/json
{
  • "anonymous": true,
  • "schedule": {
    },
  • "slotIds": [
    ],
  • "labId": "507f1f77bcf86cd799439011"
}

Response samples

Content type
application/json
"507f1f77bcf86cd799439011"

Update a reservation

Authorizations:
Jwt
path Parameters
id
required
string (ReservationId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the reservation

Request Body schema: application/json
anonymous
boolean
required
object (Interval)

Time interval

slotIds
required
Array of strings (SlotId) [ items non-empty ]

Responses

Request samples

Content type
application/json
{
  • "anonymous": true,
  • "schedule": {
    },
  • "slotIds": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete a reservation

Authorizations:
Jwt
path Parameters
id
required
string (ReservationId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the reservation

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Read the reservations of the user

Authorizations:
JwtNone
path Parameters
id
required
string (UserId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the user

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Read the reservations of the lab

Authorizations:
JwtNone
path Parameters
id
required
string (LabId) ^[0-9a-fA-F]{24}$
Example: 507f1f77bcf86cd799439011

The unique identifier of the lab

Responses

Response samples

Content type
application/json
[
  • {
    }
]