> ## Documentation Index
> Fetch the complete documentation index at: https://docs-beta.rebase.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete API reference for the Rebase Energy Dashboard API

## Overview

The Rebase Energy Dashboard API provides a comprehensive set of endpoints for building energy monitoring dashboards. All endpoints are RESTful and require authentication via Bearer tokens.

## Base URL

```
https://api.rebase.energy/api/v1/dashboard
```

## Authentication

All endpoints require authentication using a Bearer token in the Authorization header:

```bash theme={null}
Authorization: <your_api_token>
```

### Getting Your API Token

1. Sign up at [dash.rebase.energy](https://dash.rebase.energy)
2. Navigate to your account settings
3. Generate a new API token
4. Use the token in your API requests

## API Structure

The API is organized into four main categories:

### Dashboards

Manage complete dashboard configurations with drag-and-drop layouts.

* **Create, List, Get, Update, Delete** dashboards
* **React Grid Layout** configuration
* **Component state** management

### Components

Build reusable visualization components for your dashboards.

* **Map Components** - Interactive maps with layers
* **Time Series Components** - Charts and graphs

### Layers

Create and manage both map and weather layers with a unified API.

* **Map Layers** - ScatterPlotLayer, GeoJsonLayer
* **Weather Layers** - Raster, Particle, Isoline layers
* **Unified Management** - Single API for all layer types

### Datasets

Store and manage your energy data.

* **Static Datasets** - Pre-loaded data
* **Live Datasets** - Real-time data from external APIs
* **Time Series & Geospatial** - Multiple data types supported

## Quick Reference

| Category       | Endpoints        | Description                              |
| -------------- | ---------------- | ---------------------------------------- |
| **Dashboards** | 5 endpoints      | Create, manage, and configure dashboards |
| **Components** | 9 endpoints      | Build visualization components           |
| **Layers**     | 5 endpoints      | Unified layer management                 |
| **Datasets**   | 8 endpoints      | Data storage and management              |
| **Total**      | **27 endpoints** | Complete dashboard API                   |

## Response Format

All API responses are returned in JSON format with the following structure:

```json theme={null}
{
  "id": "unique_identifier",
  "name": "Resource Name",
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z"
  // ... resource-specific fields
}
```

## Error Handling

The API uses standard HTTP status codes:

* **200** - Success
* **201** - Created
* **400** - Bad Request
* **401** - Unauthorized
* **404** - Not Found
* **500** - Internal Server Error

Error responses include detailed information:

```json theme={null}
{
  "error": "Error message",
  "details": "Additional error details",
  "status_code": 400
}
```

## Rate Limiting

* **100 requests per minute** per API token
* **1000 requests per hour** per API token
* Rate limit headers included in responses

## SDK Support

Use our official Python SDK for easy integration:

```bash theme={null}
pip install rebase-dashboard
```

```python theme={null}
from rebase_dashboard import RebaseDashboardClient

client = RebaseDashboardClient(
    api_key="YOUR_API_KEY"
)
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Dashboards" icon="grid" href="/api-reference/endpoints/dashboards">
    Manage dashboard configurations and layouts.
  </Card>

  <Card title="Components" icon="puzzle-piece" href="/api-reference/endpoints/components">
    Build visualization components.
  </Card>

  <Card title="Layers" icon="map" href="/api-reference/endpoints/layers">
    Create and manage layers.
  </Card>

  <Card title="Datasets" icon="database" href="/api-reference/endpoints/datasets">
    Store and manage your data.
  </Card>
</CardGroup>
