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
- Endpoint URL: Login API
- Method: POST
The Login API allows users to authenticate by providing their email and password. Successful login generates access and refresh tokens.
Query
- Endpoint URL: Query API
- Method: POST
The Query API retrieves the status of an ESP32 pin.
Users
- Endpoint URL: Users API
- Method: GET
The Users API retrieves information about registered users. Accessible to users with an "owner" role.
Delete
- Endpoint URL: Delete API
- Method: DELETE
The Delete API removes a user from the database. Requires an "owner" role for access.
Logout
- Endpoint URL: Logout API
- Method: POST
The Logout API logs out the user and invalidates the tokens.
Register
- Endpoint URL: Register API
- Method: POST
The Register API allows new user registration with email verification using OTP.
RefreshJWT
- Endpoint URL: RefreshJWT API
- Method: POST
The RefreshJWT API refreshes the JWT access token using the refresh token.
UpdatePin
- Endpoint URL: UpdatePin API
- Method: PUT
The UpdatePin API updates the state of an ESP32 pin.
UpdateRole
- Endpoint URL: UpdateRole API
- Method: PUT
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.