Building REST API
Prerequisites
Steps to Create an REST API Endpoint
1. Add API Resource to studio.yaml
name: Router Nitro
description: Indexing cross chain transfers on router nitro protocol
userId: xxxx-xxxx-xxxx
projectId: xxxx
user: prady
schema:
file: ./studio.schema.ts
Resources:
- Name: transactions
Type: api/rest
Slug: transactions
Handler: src/apis/transactions/index.transactionsHandler2. Generate Boilerplate Code
3. Implement API Logic
4. Using ABind for Database Operations
5. Testing the API
6. Deploying the API
Last updated