How to create a site
Create a site and read it back through the unified objects endpoint.
The platform models physical infrastructure as objects. A site is an object of type site, and you work with it through the same set of routes every object type gets:
GET /platform/v3/objects— list registered object types.POST /platform/v3/objects/sites— create a site.GET /platform/v3/objects/sites— list sites.GET /platform/v3/objects/sites/{siteId}— fetch one site.
Create a site
Sites have a name and required coordinates. You can embed initial assets in the same call — they're inserted atomically with the site.
import requests
url = "https://api.rebaseenergy.dev/platform/v3/objects/sites"
headers = {"Authorization": "Bearer <your_api_key>"}
body = {
"name": "Storrun Wind Farm",
"latitude": 63.1,
"longitude": 14.6,
"assets": [
{"type": "wind_turbine", "name": "WTG-1", "capacity_kw": 3000},
{"type": "wind_turbine", "name": "WTG-2", "capacity_kw": 3000},
],
}
response = requests.post(url, headers=headers, json=body)
print(response.json())The response is the full site record:
{
"id": "4dbb3433-402f-4276-8a55-7f27753f70dc",
"name": "Storrun Wind Farm",
"latitude": 63.1,
"longitude": 14.6,
"assets": [
{"id": "...", "type": "wind_turbine", "name": "WTG-1", "capacity_kw": 3000},
{"id": "...", "type": "wind_turbine", "name": "WTG-2", "capacity_kw": 3000}
],
"total_capacity_kw": 6000,
"valid_from": "2026-06-03T08:00:00Z"
}Fetch a site
import requests
site_id = "4dbb3433-402f-4276-8a55-7f27753f70dc"
url = f"https://api.rebaseenergy.dev/platform/v3/objects/sites/{site_id}"
headers = {"Authorization": "Bearer <your_api_key>"}
response = requests.get(url, headers=headers)
print(response.json())List sites
import requests
url = "https://api.rebaseenergy.dev/platform/v3/objects/sites"
headers = {"Authorization": "Bearer <your_api_key>"}
response = requests.get(url, headers=headers)
print(response.json())Assets follow the exact same pattern under /platform/v3/objects/assets. And site and asset are just the built-in object types — you can register your own. See create a custom object.