Skip to main content

Usage

The Backend exposes a RESTful API (v1) documented with OpenAPI 3.0.


Interactive Documentation (Swagger)

  • URL: http://localhost:3001/api
  • JSON Spec: http://localhost:3001/api-json

Core Endpoints

Transactions (/v1/transactions)

MethodEndpointDescription
POST/v1/transactionsCreates a new transaction proposal
PUT/v1/transactions/{id}/signatureSubmits a signature
PATCH/v1/transactions/{id}Updates transaction description
DELETE/v1/transactions/{id}Removes a transaction
GET/v1/transactionsLists transactions (filters: status, accountId, network)
GET/v1/transactions/publicKey/{publicKey}Retrieves transactions for a specific key

Health & Network

MethodEndpointDescription
GET/healthReturns { status: "ok" }
GET/network/environmentReturns configured network and Mirror Nodes

Authentication & Security

  • CORS: Configured via the ORIGIN variable in .env
  • Rate Limiting: Protected by nestjs/throttler (default: 100 reqs/min)
  • Validation: Uses class-validator for DTO integrity

Example: Health Check

curl -X GET http://localhost:3001/health

Debugging

To see verbose output, adjust the LOG_LEVEL:

LOG_LEVEL=debug npm run start:dev

View live logs from Docker:

docker-compose logs -f backend