Creating an API Endpoint
Last updated
Last updated
If an API is considered the messenger passes data from your backend to your front-end, each individual API endpoint defines the specific command that messenger knows.
API Endpoints have a "method" or HTTP Verb associated them and the most common are POST, GET, PUT, PATCH, and DELETE. These verbs correspond to the CRUD (Create, Read, Update, Delete) operations, respectively. When you create an API endpoint, you must first define what type of verb it is.
The API Endpoint verb doesn't necessarily dictate exactly what can/can't happen in the Function Stack of the API. This means just because you're creating an API endpoint with the verb DELETE, doesn't mean you can't add records to a database when it gets called.
Most applications need something beyond basic CRUD operations and require you to create custom business logic in an API endpoint. Xano makes this easy.
CRUD Database Operation - Adds an API endpoint using a CRUD Operation to a database table.
Authentication - Creates an API endpoint with authentication logic
auth/login
Allows a user to login and generates a JWE token that lets them login.
auth/signup
Allows a user to sign up to your app and generates a token for them to login.auth/me
returns the authenticated user
Upload Content - Creates an API endpoint that allows you to upload Images, videos or attachments.
Import Query - You import any API endpoint you've exported using the three-dot menu
Start from scratch - Define the API name, Verb, and description from scratch
NOTE: Any of these API endpoints can be manipulated and changed to anything you want. These options just make it easy for you to generate useful API Endpoints quickly.