This API provides endpoints for managing various entities such as helmets, loadouts, passives, primary weapons, secondary weapons, throwables, and traits. The API is built using NestJS and TypeORM, and it interacts with a PostgreSQL database.
The base URL for all API endpoints is: http://your-domain.com/api
Some endpoints require authentication using JWT. Include the JWT token in the Authorization header as follows:
Authorization: Bearer <your-jwt-token>
-
Upload Helmet Image
- POST
/helmet/image/:id - Description: Upload an image for a helmet.
- Parameters:
id(number): The ID of the helmet.
- Body: Multipart form data with the image file.
- POST
-
Create Helmet
- POST
/helmet - Description: Create a new helmet.
- Body:
{ "name": "string", "description": "string", "type": "string", "armor_rating": "number", "speed": "number", "stamina_regen": "number", "passiveIds": "number[]" }
- POST
-
Get All Helmets
- GET
/helmet - Description: Retrieve all helmets.
- GET
-
Get Helmet by ID
- GET
/helmet/:id - Description: Retrieve a helmet by its ID.
- Parameters:
id(string): The ID of the helmet.
- GET
-
Update Helmet
- PUT
/helmet/:id - Description: Update a helmet.
- Parameters:
id(string): The ID of the helmet.
- Body:
{ "name": "string", "description": "string", "type": "string", "armor_rating": "number", "speed": "number", "stamina_regen": "number", "passiveIds": "number[]" }
- PUT
-
Create Loadout
- POST
/loadouts - Description: Create a new loadout.
- Body:
{ "name": "string", "helmetId": "number", "armorId": "number", "capeId": "number", "primaryWeaponId": "number", "secondaryWeaponId": "number", "throwableId": "number" }
- POST
-
Get All Loadouts
- GET
/loadouts - Description: Retrieve all loadouts.
- GET
-
Get Loadout by Unique ID
- GET
/loadouts/:uniqueId - Description: Retrieve a loadout by its unique ID.
- Parameters:
uniqueId(string): The unique ID of the loadout.
- GET
-
Update Loadout
- PUT
/loadouts/:id - Description: Update a loadout.
- Parameters:
id(string): The ID of the loadout.
- Body:
{ "name": "string", "helmetId": "number", "armorId": "number", "capeId": "number", "primaryWeaponId": "number", "secondaryWeaponId": "number", "throwableId": "number" }
- PUT
-
Delete Loadout
- DELETE
/loadouts/:id - Description: Delete a loadout.
- Parameters:
id(string): The ID of the loadout.
- DELETE
-
Create Passive
- POST
/passives - Description: Create a new passive.
- Body:
{ "name": "string", "description": "string" }
- POST
-
Get All Passives
- GET
/passives - Description: Retrieve all passives.
- GET
-
Get Passive by ID
- GET
/passives/:id - Description: Retrieve a passive by its ID.
- Parameters:
id(number): The ID of the passive.
- GET
-
Update Passive
- PUT
/passives/:id - Description: Update a passive.
- Parameters:
id(number): The ID of the passive.
- Body:
{ "name": "string", "description": "string" }
- PUT
-
Delete Passive
- DELETE
/passives/:id - Description: Delete a passive.
- Parameters:
id(number): The ID of the passive.
- DELETE
-
Upload Primary Weapon Image
- POST
/primary-weapon/image/:id - Description: Upload an image for a primary weapon.
- Parameters:
id(number): The ID of the primary weapon.
- Body: Multipart form data with the image file.
- POST
-
Create Primary Weapon
- POST
/primary-weapon - Description: Create a new primary weapon.
- Body:
{ "name": "string", "description": "string", "type": "string", "damage": "number", "capacity": "number", "recoil": "number", "fireRate": "number", "maxPenetration": "object" }
- POST
-
Get All Primary Weapons
- GET
/primary-weapon - Description: Retrieve all primary weapons.
- GET
-
Get Primary Weapon by ID
- GET
/primary-weapon/:id - Description: Retrieve a primary weapon by its ID.
- Parameters:
id(string): The ID of the primary weapon.
- GET
-
Update Primary Weapon
- PUT
/primary-weapon/:id - Description: Update a primary weapon.
- Parameters:
id(string): The ID of the primary weapon.
- Body:
{ "name": "string", "description": "string", "type": "string", "damage": "number", "capacity": "number", "recoil": "number", "fireRate": "number", "maxPenetration": "object" }
- PUT
-
Upload Secondary Weapon Image
- POST
/secondary-weapon/image/:id - Description: Upload an image for a secondary weapon.
- Parameters:
id(number): The ID of the secondary weapon.
- Body: Multipart form data with the image file.
- POST
-
Create Secondary Weapon
- POST
/secondary-weapon - Description: Create a new secondary weapon.
- Body:
{ "name": "string", "description": "string", "type": "string", "damage": "number", "capacity": "number", "recoil": "number", "fireRate": "number", "maxPenetration": "object" }
- POST
-
Get All Secondary Weapons
- GET
/secondary-weapon - Description: Retrieve all secondary weapons.
- GET
-
Get Secondary Weapon by ID
- GET
/secondary-weapon/:id - Description: Retrieve a secondary weapon by its ID.
- Parameters:
id(string): The ID of the secondary weapon.
- GET
-
Update Secondary Weapon
- PUT
/secondary-weapon/:id - Description: Update a secondary weapon.
- Parameters:
id(string): The ID of the secondary weapon.
- Body:
{ "name": "string", "description": "string", "type": "string", "damage": "number", "capacity": "number", "recoil": "number", "fireRate": "number", "maxPenetration": "object" }
- PUT
-
Upload Throwable Image
- POST
/throwables/image/:id - Description: Upload an image for a throwable.
- Parameters:
id(number): The ID of the throwable.
- Body: Multipart form data with the image file.
- POST
-
Create Throwable
- POST
/throwables - Description: Create a new throwable.
- Body:
{ "name": "string", "description": "string", "damage": "number", "penetration": "number", "outer_radius": "number", "fuse_time": "number", "traits": "object" }
- POST
-
Get All Throwables
- GET
/throwables - Description: Retrieve all throwables.
- GET
-
Get Throwable by ID
- GET
/throwables/:id - Description: Retrieve a throwable by its ID.
- Parameters:
id(number): The ID of the throwable.
- GET
-
Update Throwable
- PUT
/throwables/:id - Description: Update a throwable.
- Parameters:
id(number): The ID of the throwable.
- Body:
{ "name": "string", "description": "string", "damage": "number", "penetration": "number", "outer_radius": "number", "fuse_time": "number", "traits": "object" }
- PUT
-
Delete Throwable
- DELETE
/throwables/:id - Description: Delete a throwable.
- Parameters:
id(number): The ID of the throwable.
- DELETE
-
Create Trait
- POST
/traits - Description: Create a new trait.
- Body:
{ "name": "string", "description": "string" }
- POST
-
Get All Traits
- GET
/traits - Description: Retrieve all traits.
- GET
-
Get Trait by ID
- GET
/traits/:id - Description: Retrieve a trait by its ID.
- Parameters:
id(number): The ID of the trait.
- GET
-
Update Trait
- PUT
/traits/:id - Description: Update a trait.
- Parameters:
id(number): The ID of the trait.
- Body:
{ "name": "string", "description": "string" }
- PUT
-
Delete Trait
- DELETE
/traits/:id - Description: Delete a trait.
- Parameters:
id(number): The ID of the trait.
- DELETE
-
Upload Armor Image
- POST
/armor/image/:id - Description: Upload an image for an armor.
- Parameters:
id(number): The ID of the armor.
- Body: Multipart form data with the image file.
- POST
-
Create Armor
- POST
/armor - Description: Create a new armor.
- Body:
{ "name": "string", "description": "string", "type": "string", "armor_rating": "number", "speed": "number", "stamina_regen": "number", "passiveIds": "number[]" }
- POST
-
Get All Armors
- GET
/armor - Description: Retrieve all armors.
- GET
-
Get Armor by ID
- GET
/armor/:id - Description: Retrieve an armor by its ID.
- Parameters:
id(string): The ID of the armor.
- GET
-
Update Armor
- PUT
/armor/:id - Description: Update an armor.
- Parameters:
id(string): The ID of the armor.
- Body:
{ "name": "string", "description": "string", "type": "string", "armor_rating": "number", "speed": "number", "stamina_regen": "number", "passiveIds": "number[]" }
- PUT
-
Upload Cape Image
- POST
/cape/image/:id - Description: Upload an image for a cape.
- Parameters:
id(number): The ID of the cape.
- Body: Multipart form data with the image file.
- POST
-
Create Cape
- POST
/cape - Description: Create a new cape.
- Authentication: Requires a valid JWT token.
- Body:
{ "name": "string", "description": "string", "type": "string", "armor_rating": "number", "speed": "number", "stamina_regen": "number", "passiveIds": "number[]" }
- POST
-
Get All Capes
- GET
/cape - Description: Retrieve all capes.
- GET
-
Get Cape by ID
- GET
/cape/:id - Description: Retrieve a cape by its ID.
- Parameters:
id(string): The ID of the cape.
- GET
-
Update Cape
- PUT
/cape/:id - Description: Update a cape.
- Authentication: Requires a valid JWT token.
- Parameters:
id(string): The ID of the cape.
- Body:
{ "name": "string", "description": "string", "type": "string", "armor_rating": "number", "speed": "number", "stamina_regen": "number", "passiveIds": "number[]" }
- PUT
-
Sign Up
- POST
/auth/signup - Description: Sign up a new user.
- Body:
{ "name": "string", "email": "string", "password": "string" }
- POST
-
Log In
- POST
/auth/login - Description: Log in a user.
- Body:
{ "username": "string", "password": "string" }
- POST
All error responses should follow the structure:
{
"statusCode": "number",
"message": "string",
"error": "string"
}