CONNECT API Documentation

Version 1.0 | Base URL: http://localhost:8080

Authentication

Most endpoints require JWT authentication. Obtain a token by logging in:

POST /public/login
{
    "username": "TOM",
    "password": "TOM"
}

Include the token in the Authorization header:

Authorization: Bearer Token :  eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...

Public Endpoints

Endpoints that don't require authentication

GET /public/health-check Health-Check
Request
GET http://localhost:8080/public/health-check
Successful Response
OK
POST /public/signup Signup
Request
POST http://localhost:8080/public/signup
Request Body
{
    "username": "TOM",
    "email_address": "tom@gmail.com",
    "password": "TOM"
}
Successful Response
Account created
GET /public/get-email GET all email
Request
GET http://localhost:8080/public/get-email
GET /public/weather-check/{city} weather-check
Request
GET http://localhost:8080/public/weather-check/mumbai

Path Parameter: city - Name of the city to check weather for

POST /public/login Login
Request
POST http://localhost:8080/public/login

Request Body:

{
    "username": "TOM",
    "password": "TOM"
}

Successful Response:

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}

User Endpoints

Endpoints for user management (require JWT authentication)

DELETE /user Delete User
Authentication
JWT Token Required
Request
DELETE http://localhost:8080/user
Authorization: Bearer Token :  eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
GET /user Get User Details
Authentication
JWT Token Required
Request
GET http://localhost:8080/user
Authorization: Bearer Token :  eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
PUT /user Update user
Authentication
JWT Token Required
Request
PUT http://localhost:8080/user
Authorization: Bearer Token :  eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...

Request Body:

{
    "username": "TOM",
    "email_address": "t0m01@gmail.com",
    "password": "TOM"
}

Profile Endpoints

Endpoints for profile management (require JWT authentication)

POST /profiles Create Profile
Authentication
JWT Token Required
Request
POST http://localhost:8080/profiles
Authorization: Bearer Token :  eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...

Request Body:

{
    "title": "Sicret",
    "content": "You are king."
}
DELETE /profiles/{id} Delete by ID
Authentication
JWT Token Required
Request
DELETE http://localhost:8080/profiles/684212eace8b3cb77f856ae9
Authorization: Bearer Token :  eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...

Path Parameter: id - The ID of the profile to delete