REST API Documentation

Full-reference guide for all Elbia Lambda's REST endpoints, including request/response formats, authentication, and error handling.

View API Reference

Authentication

All API requests require authentication via OAuth 2.0 bearer tokens in the Authorization header.

// Example Authorization
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Token Lifetime

  • 30-day expiry
  • Auto-renewal via refresh token

Generating API Token

  1. Log in to Elbia Lambda dashboard
  2. Navigate to Account Settings > API Tokens
  3. Click "Generate New Token" and assign scopes
  4. Copy the token for use in API requests

Resource Endpoints

GET /v1/resources

List all cloud computing resources associated with your account.

Parameters

  • - limit (integer): Maximum results (default: 50)
  • - offset (integer): Pagination offset
  • - filter (string): JSON-encoded search query

Response

200 OK

[
  {
    "id": "RES_1234567890",
    "region": "us-east",
    "type": "compute",
    "status": "active",
    "created_at": "2025-01-01T00:00:00Z"
  }
]

POST /v1/resources

Create a new cloud resource with specified configuration.

Required Body

  • - region (string): Valid AWS region code
  • - instance_type (string): e.g. "t2.micro"
  • - vpc (string): VPC name or ID

Response

201 Created

{
  "id": "RES_0987654321",
  "status": "pending",
  "provisioning_started_at": "2025-01-01T02:00:00Z"
}

GET /v1/resources/{id}

Retrieve detailed information for a specific resource.

Parameters

  • - id (string): Unique resource ID
  • - expand (string): Expand nested resources

Response

200 OK

{
  "id": "RES_1234567890",
  "type": "function",
  "region": "eu-west-1",
  "memory": "1024MB",
  "last_execution": "2025-01-01T03:00:00Z"
}

Function Endpoints

GET /v1/functions

List all serverless functions in your environment.

Filters

  • - status (string): "active", "deprecated"
  • - runtime (string): e.g., "Node.js 20"
  • - tag (string): Function group identifier

Response

200 OK

[
  {
    "id": "FUNC_1234567890",
    "name": "user-authentication",
    "created_at": "2025-01-01T00:00:00Z",
    "last_executed": "2025-01-01T03:00:00Z"
  }
]

POST /v1/functions

Deploy a new serverless function with runtime configuration.

Required Body

  • - name (string): Function identifier
  • - runtime (string): Execution environment
  • - handler (string): Entry point

Response

201 Created

{
  "id": "FUNC_0987654321",
  "status": "created",
  "deployment_started": "2025-01-01T02:00:00Z"
}

Billing Endpoints

GET /v1/usage

Retrieve monthly usage summary for all resources.

Response

{
  "total_executions": 524378,
  "gigabytes_hour": "42.3 GBh",
  "current_month_cost": "$2,345.00"
}

GET /v1/billing/invoices

List all previous month-end invoices.

Response

[
  {
    "date": "2024-12-31",
    "amount": "$3,242.50",
    "pdf_url": "https://example.com/invoice/202412"
  }
]

Error Responses

HTTP Code Message Cause
401 Unauthorized Invalid or missing API token Missing Authorization header or expired token
400 Bad Request Invalid JSON in request body Malformed, non-JSON, or incomplete payload
404 Not Found Resource not available Invalid ID or missing resource
429 Too Many Requests Rate limit exceeded API token usage policy violation

Ready to Build with Our API?

Create and manage your serverless infrastructure programmatically. Our API gives engineers full control over cloud resources.