Key Concepts
What is Orbitra API ?
Orbitra API is a pre-configured FastAPI template that allows you to quickly build and deploy REST endpoints integrated with Orbitra’s data platform and built-in examples. It abstracts away infrastructure concerns and provides:- Pre-configured authentication: Automatic token validation and credential management via Orbitra Commons;
- Orbitra Lake integration: Direct access to your data lake through the Lake SDK;
- Development and deployment ready: Serverless execution on Azure Functions, pre-configured OpenTelemetry/Azure Monitor telemetry, CI/CD pipeline integration, and local dev container setup.
REST API Fundamentals
A REST API exposes your application’s functionality through HTTP endpoints:- Endpoints: URLs that represent resources (e.g.,
/api/tables,/api/data) - HTTP Methods: GET (retrieve), POST (create), PUT (update), DELETE (remove)
- Request/Response: Structured data exchange using JSON
- Status Codes: HTTP codes indicate success (2xx), client errors (4xx), or server errors (5xx)
Getting Started with the Template
1) Set Up Your Development Environment
From your template project root:- Using Dev Container (Recommended)
- Manual Setup
Open the project in VS Code, press
ctrl+shift+P and select “Reopen in Container”. This automatically configures:- Python 3.11+ with all dependencies
- FastAPI development server
- Debugging support
- All required tools and libraries
2) Understand the Main Components
API Initialization (main.py)
The template includes a minimal api/main.py file:
3) Create Your First Endpoint
Add an endpoint directly to yourapi/main.py:
4) Run Your API Locally
- VS Code/Cursor UI
- Terminal
- Open the Run and Debug panel in VS Code
- Select “Python: API” configuration
- Press F5 to launch
if __name__ == "__main__": with uvicorn.run(...), so either option works.
5) Test Your Endpoints
- Using curl
- Using Python
- Using Swagger UI
Deployment
Serverless runtime and telemetry (pre-configured)
The API template is packaged and deployed as an Azure Function App with telemetry enabled by default:.pipelines/function_app.pywraps your FastAPI app usingfunc.AsgiFunctionApp(...)for serverless execution;.pipelines/host.jsonsetstelemetrymodeto OpenTelemetry and keeps HTTP routes at root ("routePrefix": "");configure_azure_monitor()is enabled to export traces/metrics/logs to Azure Monitor.
- Run the pipeline in
.pipelines/pipeline.yaml(buildsfunctionapp.zipwithapi/,.pipelines/function_app.py, and.pipelines/host.json); - Monitor via your platform observability stack and function app logs.
Next Steps
- Review the Orbitra Lake documentation for data access patterns.
- Explore the Flows SDK if you need to orchestrate backend processes.
- Check the Commons SDK to understand the authentication scenarios.