Skip to main content

Base URL

http://localhost:8080

Authentication

Currently, the Blackjack API does not require authentication. All endpoints are publicly accessible.

API Documentation

Interactive API documentation is available via Swagger UI:
http://localhost:8080/swagger-ui.html

Available Endpoints

The Blackjack API provides the following game management endpoints:

Create Game

Start a new Blackjack game

Get Game

Retrieve current game state

Play Move

Make a move (HIT or STAND)

Delete Game

Remove an existing game

Response Format

All API responses are in JSON format. Successful operations return the relevant data object, while errors return an error response with appropriate HTTP status codes.

Error Handling

The API uses standard HTTP status codes:
  • 200 - Success
  • 201 - Created
  • 204 - No Content (successful deletion)
  • 400 - Bad Request (validation error)
  • 404 - Not Found (game doesn’t exist)
  • 409 - Conflict (invalid move or game state)

Game Status Values

Games can have the following status values:
  • IN_PROGRESS - Game is active and awaiting player action
  • PLAYER_WIN - Player won the game
  • DEALER_WIN - Dealer won the game
  • TIE - Game ended in a tie

Build docs developers (and LLMs) love