Home - n1lby73/industrial-IOT GitHub Wiki

Industrial IoT API Documentation

This documentation provides details about the endpoints available in the Industrial IoT API, explaining their functionalities, request parameters, and responses.

Authentication

To access the API endpoints, users need to authenticate using JSON Web Tokens (JWT). Certain endpoints require specific roles for access.

Endpoints

Login

The Login API allows users to authenticate by providing their email and password. Successful login generates access and refresh tokens.

Query

The Query API retrieves the status of an ESP32 pin.

Users

The Users API retrieves information about registered users. Accessible to users with an "owner" role.

Delete

The Delete API removes a user from the database. Requires an "owner" role for access.

Logout

The Logout API logs out the user and invalidates the tokens.

Register

The Register API allows new user registration with email verification using OTP.

RefreshJWT

The RefreshJWT API refreshes the JWT access token using the refresh token.

UpdatePin

The UpdatePin API updates the state of an ESP32 pin.

UpdateRole

The UpdateRole API updates a user's role, accessible by users with an "owner" role.

... (Add other endpoints here)

Usage

Each API endpoint has its URL, method, and specific parameters required. Refer to each endpoint's documentation for usage details and examples.

For detailed information on each endpoint, refer to the specific pages linked above.