Skip to content

Authentication Endpoints

Method URL Description
POST /api/v1/authentication/token Token
POST /api/v1/authentication/user Create User
PUT /api/v1/authentication/user Update User
GET /api/v1/authentication/user View User

Endpoint Description's

Token

Description

The token endpoint allows you to recieve a JWT token to authenticate with the API.

Example Input

{
    "username": "mrider3",
    "password": "secret"
}

Example Output

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6M30.PJZEu9eDOBqSQTWJkNMCdV__tvuETyEVRwA5wH9Ansc",
    "token_type": "bearer"
}

Create User

Description

The create user endpoint allows you to create a new user to use the application.

Example Input

{
    "username": "mrider3",
    "password_hash": "secret"
}

Example Output

{
    "id": 1,
    "username": "mrider3",
    "password_hash": "$2b$12$/mV9SXGaslPAgjM7CBnDLuFLiwwKfy7Liz715lXewHlod0KKlp.Wu",
    "name": null,
    "created_at": "2022-08-19T18:44:55.415824+00:00",
    "modified_at": "2022-08-19T18:44:55.415846+00:00"
}

Update User

Description

The update user endpoint allows you to update information about your account.

Example Input

{
    "username": "mrider3",
    "password_hash": "secret",
    "name": "Michael"
}

Example Output

{
    "id": 1,
    "username": "mrider3",
    "password_hash": "secret",
    "name": "Michael",
    "created_at": "2022-08-19T18:20:13.662074+00:00",
    "modified_at": "2022-08-19T18:20:13.662074+00:00"
}

Delete User

Description

The delete user endpoint allows you to delete your account.

Example Output

{
    "message": "Deleted user 1"
}