API Routes Examples
Example API routes using Arcsec's API endpoint for common database operations.
Overview
This page provides examples of how to create API routes in your application using Arcsec's "/api/query" endpoint. These examples demonstrate common database operations such as inserting new users, retrieving data for display, and updating records.
Example API Routes
1. Insert New User
This route demonstrates how to insert a new user's login and password into a 'users' table.
2. Retrieve User Data
This route demonstrates how to retrieve user data from the 'users' table based on the user's wallet address.
3. Update User Data
This route demonstrates how to update a user's password in the 'users' table based on the user's wallet address.
4. Delete User Data
This route demonstrates how to delete a user's data from the 'users' table based on the user's wallet address.