Endpoints

1. Root Endpoint

  • URL: /

  • Method: GET

  • Description: Health check endpoint to verify that the API is running.

  • Authentication: None

  • Response:

    • Status Code: 200 OK

    • Body:

      {
        "message": "API Key Management and PDF Processing System is up and running."
      }

2. User Management

2.1. Create User

  • URL: /create-user

  • Method: POST

  • Description: Creates a new user in the system. Admin only.

  • Authentication: HTTP Basic (Admin credentials)

  • Request Body:

    • Content-Type: application/json

    • Schema: CreateUserRequest

  • Responses:

    • 201 Created

    • 400 Bad Request

      • Reason: Username already exists or validation error.

    • 401 Unauthorized

2.2. Remove User

  • URL: /remove-user

  • Method: POST

  • Description: Removes an existing user and their associated API key. Admin only.

  • Authentication: HTTP Basic (Admin credentials)

  • Request Body:

    • Content-Type: application/json

    • Schema: RemoveUserRequest

  • Responses:

    • 200 OK

    • 404 Not Found

      • Reason: User does not exist.

    • 401 Unauthorized


Last updated