openapi: 3.1.0 info: title: Jabbercracky API description: Core API for the Jabbercracky project. version: 1.0.0 contact: name: John Jabbercracky email: contact@jabbercracky.com servers: - url: https://jabbercracky.com paths: /api/ping: get: summary: Returns the status of the server. description: This endpoint is used to check the health status of the server. It returns a simple message indicating that the server is running. tags: - Unauthenticated responses: '200': description: Successful response content: application/json: schema: type: object properties: message: type: string examples: - value: "pong" authenticated: type: string examples: - value: "false" server_time: type: string format: date-time examples: - value: "2024-04-21T01:15:46Z" point_per_crack: type: number examples: - value: 1.0 /api/login: post: summary: User login description: Authenticates a user and returns a JWT token. tags: - Unauthenticated requestBody: required: true content: application/json: schema: type: object properties: username: type: string password: type: string responses: '200': description: Login successful content: application/json: schema: type: object properties: token: type: string examples: - token: "eyJ..." /api/login/register: post: summary: User registration description: Registers a new user. tags: - Unauthenticated requestBody: required: true content: application/json: schema: type: object properties: username: type: string password: type: string responses: '200': description: Registration successful content: application/json: schema: type: object properties: PasswordResetCode: type: string examples: - PasswordResetCode: "af42015d-e06f-45c2-9958-4f3f51ffe40f-8f962566-e4e8-4c06-9d66-af716093f5b4" message: type: string examples: - message: "Registration successful" /api/login/reset: post: summary: Reset password description: Resets the password for an existing user. tags: - Unauthenticated requestBody: required: true content: application/json: schema: type: object properties: username: type: string password_reset_code: type: string new_password: type: string responses: '200': description: Password reset successful content: application/json: schema: type: object properties: PasswordResetCode: type: string examples: - value: "8c1bb4fe-4969-475a-9e91-bbbc8e4d001c-962acecf-50d1-495a-81df-2c7962bd20d0" message: type: string examples: - value: "Password reset successful" /api/game: get: summary: Get game details description: Retrieves game details. tags: - Unauthenticated - Game responses: '200': description: Game details retrieved successfully content: application/json: schema: type: object properties: config: type: object properties: game_active: type: boolean examples: - value: true time_remaining: type: string examples: - value: "22h58m0.93201532s" total_cracked: type: integer examples: - value: 1 total_hash_list_1_cracked: type: integer examples: - value: 1 total_hash_list_2_cracked: type: integer examples: - value: 0 total_hash_list_3_cracked: type: integer examples: - value: 0 total_players: type: integer examples: - value: 5 total_items: type: integer examples: - value: 0 total_rare_items: type: integer examples: - value: 0 total_legendary_items: type: integer examples: - value: 0 total_mythical_items: type: integer examples: - value: 0 total_score: type: number examples: - value: 2.35 leaderboard: type: array items: type: object properties: username: type: string examples: - value: "berryt3st" hash_list_1_cracked: type: integer examples: - value: 1 hash_list_2_cracked: type: integer examples: - value: 0 hash_list_3_cracked: type: integer examples: - value: 0 total_cracked: type: integer examples: - value: 1 score: type: number examples: - value: 2.35 item_count: type: integer examples: - value: 0 visible_item: type: object properties: item_name: type: string examples: - value: "" item_rarity: type: string examples: - value: "" date_obtained: type: string examples: - value: "" message: type: string examples: - value: "success" /api/game/leaderboard: get: summary: Get leaderboard description: Retrieves the leaderboard. parameters: - name: user in: query required: false schema: type: array items: type: string examples: - value: ["berry", "cherry"] tags: - Authenticated - Game responses: '200': description: Leaderboard retrieved successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" users: type: array items: type: object properties: username: type: string examples: - value: "berryt3st" hash_list_1_cracked: type: integer examples: - value: 1 hash_list_2_cracked: type: integer examples: - value: 0 hash_list_3_cracked: type: integer examples: - value: 0 total_cracked: type: integer examples: - value: 1 score: type: number examples: - value: 2.35 item_count: type: integer examples: - value: 0 visible_item: type: object properties: item_name: type: string examples: - value: "" item_rarity: type: string examples: - value: "" date_obtained: type: string examples: - value: "" /api/game/leaderboard/log: get: summary: Get leaderboard log description: Retrieves the leaderboard log. tags: - Authenticated - Game responses: '200': description: Leaderboard log retrieved successfully content: application/json: schema: type: object properties: log: type: array items: type: object properties: current_time: type: string format: date-time examples: - value: "2024-11-26T01:15:46Z" time_remaining: type: string examples: - value: "-1h15m46.229865108s" total_cracked: type: integer examples: - value: 0 total_hash_list_1_cracked: type: integer examples: - value: 0 total_hash_list_2_cracked: type: integer examples: - value: 0 total_hash_list_3_cracked: type: integer examples: - value: 0 total_items: type: integer examples: - value: 0 total_rare_items: type: integer examples: - value: 0 total_legendary_items: type: integer examples: - value: 0 total_mythical_items: type: integer examples: - value: 0 total_score: type: number examples: - value: 0 leaderboard: type: string nullable: true examples: - value: null message: type: string examples: - value: "success" /api/game/announcements: get: summary: Get announcements description: Retrieves announcements. tags: - Authenticated - Game responses: '200': description: Announcements retrieved successfully content: application/json: schema: type: object properties: announcements: type: object properties: announcement_log: type: array items: type: object properties: announcement_time: type: string format: date-time examples: - value: "2024-12-01T00:06:47Z" announcement_message: type: string examples: - value: "User berryt3st has registered." message: type: string examples: - value: "success" /api/game/hashlist: get: summary: Get hash lists description: Retrieves the list of available hash lists. tags: - Authenticated - Game responses: '200': description: Hash lists retrieved successfully content: application/json: schema: type: object properties: hash_lists: type: array items: type: object properties: hash_list_id: type: integer hash_list_name: type: string drop_item_chance: type: number drop_rare_item_chance: type: number drop_legendary_item_chance: type: number drop_mythical_item_chance: type: number message: type: string examples: - value: "success" /api/game/hashlist/{hashlistid}: get: summary: Get hash list description: Retrieves the hash list specified by hashlistid. tags: - Authenticated - Game parameters: - name: hashlistid in: path required: true schema: type: string responses: '200': description: Hash list retrieved successfully content: application/json: schema: type: object properties: hash_list: type: array items: type: string examples: - value: "5d41402abc4b2a76b9719d911017c592" - value: "bc934e0ed9ac13a76e5b9d0590932c6e" - value: "cafd1eaf9f03752bd6320f05ab039a39" message: type: string examples: - value: "success" /api/game/submit/{hashlistid}: post: summary: Submit game data description: Submit game data identified by hashlistid. tags: - Authenticated - Game parameters: - name: hashlistid in: path required: true schema: type: string responses: '200': description: Successful submission content: application/json: schema: type: object properties: submission_uid: type: string examples: - value: "3fa5cc74-bbf3-46b2-bd92-09754ed04300" hash_list_id: type: string examples: - value: "1" username: type: string examples: - value: "berryt3st" found_count: type: integer examples: - value: 1 added_score: type: number examples: - value: 2.35 total_score: type: number examples: - value: 2.35 new_items: type: array items: type: string examples: - value: [] total_item_count: type: integer examples: - value: 0 date_submitted: type: string format: date-time examples: - value: "2024-12-01T01:01:49Z" /api/user: get: summary: Get user details description: Retrieves user details. tags: - Authenticated - User responses: '200': description: Successful retrieval content: application/json: schema: type: object properties: enabled: type: boolean examples: - value: true hash_list_1_cracked: type: integer examples: - value: 0 hash_list_1_remaining: type: integer examples: - value: 0 hash_list_2_cracked: type: integer examples: - value: 0 hash_list_2_remaining: type: integer examples: - value: 0 hash_list_3_cracked: type: integer examples: - value: 3 hash_list_3_remaining: type: integer examples: - value: 0 item_count: type: integer examples: - value: 1 message: type: string examples: - value: "success" score: type: integer examples: - value: 705 total_cracked: type: integer examples: - value: 3 username: type: string examples: - value: "berry3" visible_item: type: object properties: item_name: type: string examples: - value: "" item_rarity: type: string examples: - value: "" date_obtained: type: string examples: - value: "" /api/user/{username}: get: summary: Get user by username description: Retrieves user details by username. tags: - Authenticated - User parameters: - name: username in: path required: true schema: type: string responses: '200': description: Successful retrieval content: application/json: schema: type: object properties: enabled: type: boolean examples: - value: true hash_list_1_cracked: type: integer examples: - value: 0 hash_list_1_remaining: type: integer examples: - value: 0 hash_list_2_cracked: type: integer examples: - value: 0 hash_list_2_remaining: type: integer examples: - value: 0 hash_list_3_cracked: type: integer examples: - value: 3 hash_list_3_remaining: type: integer examples: - value: 0 item_count: type: integer examples: - value: 1 message: type: string examples: - value: "success" score: type: integer examples: - value: 705 total_cracked: type: integer examples: - value: 3 username: type: string examples: - value: "berry3" visible_item: type: object properties: item_name: type: string examples: - value: "" item_rarity: type: string examples: - value: "" date_obtained: type: string examples: - value: "" /api/user/submissions: get: summary: Get user submissions description: Retrieves a list of user submissions. tags: - Authenticated - User responses: '200': description: Submissions retrieved successfully content: application/json: schema: type: object properties: events: type: array items: type: object properties: submission_uid: type: string examples: - value: "c1014340-9469-4c88-910b-d4a86992c376" hash_list_id: type: string examples: - value: "3" username: type: string examples: - value: "berry3" found_count: type: integer examples: - value: 3 added_score: type: integer examples: - value: 705 total_score: type: integer examples: - value: 705 new_items: type: array items: type: object properties: item_name: type: string examples: - value: "Flaming Long Sword" item_rarity: type: string examples: - value: "rare" date_obtained: type: string examples: - value: "2024-12-01 01:39:04" total_item_count: type: integer examples: - value: 1 date_submitted: type: string format: date-time examples: - value: "2024-12-01T01:39:04Z" message: type: string examples: - value: "success" /api/user/wield: post: summary: Wield an item description: Endpoint to wield an item. tags: - Authenticated - User requestBody: required: true content: application/json: schema: type: object properties: item_name: type: string examples: - value: "Flaming Long Sword" item_rarity: type: string examples: - value: "rare" date_obtained: type: string examples: - value: "2024-12-01 01:39:04" responses: '200': description: Item wielded successfully content: application/json: schema: type: object properties: item: type: object properties: item_name: type: string examples: - value: "Flaming Long Sword" item_rarity: type: string examples: - value: "rare" date_obtained: type: string examples: - value: "2024-12-01 01:39:04" message: type: string examples: - value: "success" /api/user/unwield: delete: summary: Unwield an item description: Endpoint to unwield an item. tags: - Authenticated - User responses: '200': description: Item unwielded successfully content: application/json: schema: type: object properties: item: type: object properties: item_name: type: string examples: - value: "" item_rarity: type: string examples: - value: "" date_obtained: type: string examples: - value: "" message: type: string examples: - value: "success" /api/user/items: get: summary: Get items description: Retrieves a list of items. tags: - Authenticated - User responses: '200': description: Items retrieved successfully content: application/json: schema: type: object properties: items: type: array items: type: object properties: item_name: type: string examples: - value: "Flaming Long Sword" item_rarity: type: string examples: - value: "rare" date_obtained: type: string examples: - value: "2024-12-01 01:39:04" message: type: string examples: - value: "success" /api/user/items/reforge: post: summary: Reforge items description: Reforges selected items from the user's inventory. tags: - Authenticated - User requestBody: required: true content: application/json: schema: type: object properties: items: type: array items: type: object properties: item_name: type: string examples: - value: "Pristine Giant Rubber Band" item_rarity: type: string examples: - value: "rare" date_obtained: type: string format: date-time examples: - value: "2025-01-11 18:01:05" responses: '200': description: Items reforged successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "Items reforged successfully" /api/user/delete: delete: summary: Delete user account description: Deletes the account of the currently authenticated user. tags: - Authenticated - User responses: '200': description: Account deleted successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "Account deleted successfully" /api/user/uid: get: summary: Get user UID description: Returns the user's UID. tags: - Authenticated - User responses: '200': description: UID retrieved successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" uid: type: string examples: - value: "user-uid-example" /api/user/uid/auth: get: summary: Check UID authentication status description: Returns whether the user is using UID authentication or not. tags: - Authenticated - User responses: '200': description: UID authentication status retrieved successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" uid_auth: type: boolean examples: - value: true post: summary: Update user UID authentication settings description: Updates the user's UID authentication settings. tags: - Authenticated requestBody: required: true content: application/json: schema: type: object properties: uid_auth: type: boolean examples: - value: true responses: '200': description: User settings updated successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" username: type: string examples: - value: "username-example" /api/user/team: get: summary: Get current users team information description: Returns information about a players current team. tags: - Authenticated - Team responses: '200': description: Team information retrieved successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" team: type: object properties: team_name: type: string examples: - value: "TeamAwesome" usernames: type: array items: type: string examples: - value: "berryt3st" average_cracked: type: number examples: - value: 100 average_score: type: number examples: - value: 1000 total_items: type: number examples: - value: 10 /user/team/new: post: summary: Create a new team description: Endpoint to create a new team. tags: - Authenticated - Team requestBody: required: true content: application/json: schema: type: object properties: team_name: type: string examples: - value: "BerryBoys" team_password: type: string examples: - value: "notavalidpassword" responses: '200': description: Team created successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" team: type: object properties: team_name: type: string examples: - value: "BerryBoys" average_cracked: type: integer examples: - value: 0 average_score: type: integer examples: - value: 0 total_items: type: integer examples: - value: 0 /user/team/leave: delete: summary: Leave a team description: Endpoint to leave a team. tags: - Authenticated - Team responses: '200': description: Successfully left the team content: application/json: schema: type: object properties: message: type: string examples: - value: "Success" /user/team/join: post: summary: Join a team description: Endpoint to join a team. tags: - Authenticated - Team requestBody: required: true content: application/json: schema: type: object properties: team_name: type: string examples: - value: "TeamAwesome" team_password: type: string examples: - value: "notavalidpassword" responses: '200': description: Successfully joined the team content: application/json: schema: type: object properties: message: type: string examples: - value: "Success" /api/user/team/leaderboard: get: summary: Get team leaderboard description: Retrieves the leaderboard for teams. tags: - Authenticated - Team responses: '200': description: Team leaderboard retrieved successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" teams: type: array items: type: object properties: team_name: type: string examples: - value: "cherry" average_cracked: type: integer examples: - value: 6 average_score: type: number examples: - value: 27.9 total_items: type: integer examples: - value: 0 /api/user/admin/disable: post: summary: Disable user description: Disables a user. tags: - Authenticated - Administrator requestBody: required: true content: application/json: schema: type: object properties: username: type: string examples: - value: "Cherry" responses: '200': description: User disabled successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" username: type: string examples: - value: "Cherry" /api/user/admin/enable: post: summary: Enable user description: Enables a user. tags: - Authenticated - Administrator requestBody: required: true content: application/json: schema: type: object properties: username: type: string examples: - value: "Cherry" responses: '200': description: User enabled successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" username: type: string examples: - value: "Cherry" /api/user/admin/delete: post: summary: Delete user description: Deletes a user. tags: - Authenticated - Administrator requestBody: required: true content: application/json: schema: type: object properties: username: type: string examples: - value: "Cherry" responses: '200': description: User deleted successfully content: application/json: schema: type: object properties: message: type: string examples: - value: "success" username: type: string examples: - value: "Cherry" /api/user/admin/game/download: get: summary: Download game backup description: Returns a zip file of the game backup. tags: - Authenticated - Administrator responses: '200': description: Zip file of the game backup content: application/zip: schema: type: string format: binary