OData API
Overview
Section titled “Overview”Formation exposes an OData v4 API for querying entities. All GET endpoints support standard OData query options.
Supported Query Options
Section titled “Supported Query Options”| Option | Description | Example |
|---|---|---|
$filter | Filter results | $filter=Name eq 'Tower A' |
$expand | Include related entities | $expand=Address,Companies |
$select | Choose specific fields | $select=Name,Id |
$orderby | Sort results | $orderby=Name asc |
$top | Limit result count | $top=10 |
$skip | Skip results (paging) | $skip=20 |
$count | Include total count | $count=true |
$search | Full-text search | $search=london |
Entity Endpoints
Section titled “Entity Endpoints”| Entity | Endpoint |
|---|---|
| Schemes | /odata/Schemes |
| Developments | /odata/Developments |
| Companies | /odata/Companies |
| Addresses | /odata/Addresses |
ID Encoding
Section titled “ID Encoding”All entity IDs are Base64-encoded with a 2-character type prefix to prevent collisions:
AD...— AddressSC...— SchemeCO...— Company
Always use the Id field from API responses, never raw database keys.
Authentication
Section titled “Authentication”All API requests require a valid Azure AD Bearer token. Include it in the Authorization header:
Authorization: Bearer <token>