2.2 KiB
2.2 KiB
API Documentation
Introduction
This document provides detailed information on how to use and implement the APIs in the V8 engine.
Table of Contents
Sign Up
- Description: This API allows users to sign up for a new account through the browser.
- Usage: To use this API, follow the steps below:
- Step 1: Redirect the user to the sign-up page using the
/signup
route. - Step 2: Fill in the required information and submit the form.
- Step 3: A JSON response will be returned with the user's information.
- Step 1: Redirect the user to the sign-up page using the
- Payload Example:
{ "status": "success", "message": "User created successfully" }
Log In
- Description: This API allows users to log in to their account through the browser.
- Usage: To use this API, follow these steps:
- Step 1: Redirect the user to the log-in page using the
/login
route. - Step 2: Enter the user's credentials and submit the form.
- Step 3: A JSON response will be returned with the user's information.
- Step 1: Redirect the user to the log-in page using the
- Payload Example:
{ "id": 123, "username": "user123", "email": "rr@ttt.yy", "access_level": 1, "password": "password123" }
API Sign Up
- Description: This API allows users to sign up for a new account programmatically.
- Usage: To use this API, follow these steps:
- Step 1: API call to the
/api/signup?username={newUser}&email={Email}&password={Password}
endpoint with the required parameters. - Step 2: The server will create a new user account and return a JSON response.
- Step 1: API call to the
- Payload Example:
{ "status": "success", "message": "User created" }
API Log In
- Description: This API allows users to log in to their account programmatically.
- Usage: To use this API, follow these steps:
- Step 1: API call to the
/api/login?username={user}&password={password}
endpoint with the required parameters. - Step 3: The server will authenticate the user and return a JSON response.
- Step 1: API call to the
- Payload Example:
{ "id": 123, "username": "user123", "email": "rr@ttt.yy", "access_level": 1, "password": "password123" }