Get a list of meta data for all sites

In order to do actions like getting a site’s forecast, uploading data to a site and others, you will need to provide the site ID when querying the relevant endpoints. The example below shows how to get a list of meta data for all of your sites. The meta data include IDs of the sites among other parameter values.

Get meta list
import requests

api_key = "Your API key" # Set your API key

url = "https://api.rebase.energy/platform/v2/sites"
headers = {"Authorization": api_key, "Content-Type": "application/json"}

response = requests.get(url=url, headers=headers)
response.raise_for_status()
response = response.json()
Response Example
[
    {
        "id": "3b511f66-5c99-47ff-b656-f504f60ab668",
        "name": "My solar site",
        "latitude": 52.5,
        "longitude": 13.4,
        "capacity_kw_array": [
            {
                "value": 1000.0,
                "dateEnd": null
            }
        ],
        "creation_timestamp_utc": "2024-09-13T13:49:14.448761Z",
        "settings": {
            "model_resolution": "1h",
            "additional_points": [
            ],
            "trainLongTermModels": false,
            "trainNearTermModels": false,
            "usePhysicalModels": true,
            "weather_models": [
            ],
            "create_params": {
            }
        },
        "type": "solar",
        "assets": [
            {
                "azimuth": 180.0,
                "tilt": 30.0,
                "capacity": 1000.0,
                "install_date": "2015-01-01"
            }
        ]
    },
    {
        "id": "77a5845a-9f6d-456e-8507-3f8ce032f27d",
        "name": "My wind site",
        "latitude": 52.5,
        "longitude": 13.4,
        "capacity_kw_array": [
            {
                "value": 10000.0,
                "dateEnd": null
            }
        ],
        "creation_timestamp_utc": "2024-09-13T11:47:55.844700Z",
        "settings": {
            "model_resolution": "1h",
            "additional_points": [
            ],
            "trainLongTermModels": false,
            "trainNearTermModels": false,
            "usePhysicalModels": true,
            "weather_models": [
            ],
            "create_params": {
            }
        },
        "type": "wind",
        "assets": [
            {
                "nominal_power": 1000.0,
                "turbine_type": "V90/3000",
                "hub_height": 80.0,
                "rotor_diameter": 90.0,
                "nr_units": 10,
                "install_date": "2015-01-01"
            }
        ]
    }
]

Get meta data for a specific site

To get meta data for a specific site use the ID of that site.

Get site meta
import requests

api_key = "Your API key" # Set your API key
site_id = "a923653c-26f1-1b29-955d-ffde5d182276" # Set the site ID

url = f"https://api.rebase.energy/platform/v2/sites/{site_id}"
headers = {"Authorization": api_key, "Content-Type": "application/json"}

response = requests.get(url, headers=headers)
response.raise_for_status()
response = response.json()