🎨 ColorCode API

Welcome to the ColorCode API documentation. Below you'll find all available endpoints and how to use them.

Hello Endpoint

GET /hello

A simple hello world endpoint that echoes back any query parameters.

Response:

{
  "status": 200,
  "success": true,
  "message": "Hello from ColorCode",
  "data": {
    "queryParams": {}
  }
}

Login Endpoint

POST /login

Authentication endpoint for user login.

Request Body:

{
  "username": "string",
  "password": "string"
}

Response:

{
  "status": 200,
  "success": true,
  "message": "Login attempt successful",
  "data": {
    "user": "username"
  }
}

Random City Endpoint

GET /randomCity

Returns a random city from our database of 500 cities worldwide.

Query Parameters:

Response:

{
  "status": 200,
  "success": true,
  "message": "Random city retrieved successfully",
  "data": {
    "city": "Tokyo"
  }
}