Random League
Mock League where users, teams and fixtures can be created. All endpoints except the health and search endpoints are authenticated.
Environment is random-league prod
All authenticated routes require a Bearer token passed as a value to the Authorization header
Users
APIs that involve the CRUD features for users.
AUTHORIZATIONBearer Token
Token
POSTCreate a User
https://random-mock-league.herokuapp.com/v1/users
The form type for this request is multipart/form-data since image upload is possible on this request.
The role field is optional. The default role when no role is specified on user creation is user.
The avatar field is also optional. A default image is attached to the user's profile if no image is specified
AUTHORIZATIONBearer Token
This request is using Bearer Token from folderUsers
Bodyformdata
avatar
first_name
last_name
password
email
role
Example Request
Create a User Response
200 OK
Example Response
Server
Connection
X-Dns-Prefetch-Control
X-Frame-Options
Strict-Transport-Security
X-Download-Options
X-Content-Type-Options
X-Xss-Protection
Access-Control-Allow-Origin
Content-Type
Content-Length
Etag
Vary
Date
Via
GETGET all Users
https://random-mock-league.herokuapp.com/v1/users
Only an authenticated admin can get a list of all users
AUTHORIZATIONBearer Token
Token
Example Request
GET all Users success response
200 OK
Example Response
Server
Connection
X-Dns-Prefetch-Control
X-Frame-Options
Strict-Transport-Security
X-Download-Options
X-Content-Type-Options
X-Xss-Protection
Access-Control-Allow-Origin
Content-Type
Content-Length
Etag
Vary
Date
Via