Skip to main content
Dashboards are the primary organizational unit in Forge. Each dashboard can contain multiple widgets and belongs to a single user.

Create Dashboard

curl -X POST http://localhost:3000/api/dashboards \
  -H "Content-Type: application/json" \
  -H "Cookie: session=your-session-token" \
  -d '{
    "name": "My Dashboard"
  }'

Request Body

name
string
required
Dashboard name (minimum 1 character)

Response

id
string (uuid)
Unique dashboard identifier
userId
string
ID of the user who owns this dashboard
name
string
Dashboard name
isPublic
boolean
Whether the dashboard is publicly accessible (default: false)
createdAt
string (ISO 8601)
Creation timestamp
updatedAt
string (ISO 8601)
Last update timestamp
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "userId": "user123",
  "name": "My Dashboard",
  "isPublic": false,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}

Get Dashboards

Retrieve all dashboards for the authenticated user, or a specific dashboard by ID.
curl -X GET http://localhost:3000/api/dashboards \
  -H "Cookie: session=your-session-token"

Query Parameters

id
string (uuid)
Dashboard ID to retrieve. If omitted, returns all user dashboards.

Response

Returns an array of dashboard objects.
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "userId": "user123",
    "name": "My Dashboard",
    "isPublic": false,
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z"
  }
]

Update Dashboard

curl -X PUT http://localhost:3000/api/dashboards \
  -H "Content-Type: application/json" \
  -H "Cookie: session=your-session-token" \
  -d '{
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Updated Dashboard Name"
  }'

Request Body

id
string (uuid)
required
Dashboard ID to update
name
string
required
New dashboard name (minimum 1 character)

Response

Returns the updated dashboard object.
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "userId": "user123",
  "name": "Updated Dashboard Name",
  "isPublic": false,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T11:45:00.000Z"
}

Delete Dashboard

Deletes a dashboard and all associated widgets.
curl -X DELETE "http://localhost:3000/api/dashboards?id=550e8400-e29b-41d4-a716-446655440000" \
  -H "Cookie: session=your-session-token"

Query Parameters

id
string (uuid)
required
Dashboard ID to delete

Response

Returns the deleted dashboard object.
This action is permanent and will also delete all widgets on the dashboard.
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "userId": "user123",
  "name": "My Dashboard",
  "isPublic": false,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}

Build docs developers (and LLMs) love