Skip to main content

First Request

This guide walks you through making your first API request to fetch data from a cube.

Base URL

All API requests use the following base URL:
https://api.cubestack.app/api/v1

Fetch Records

To retrieve records from a cube:
curl "https://api.cubestack.app/api/v1/{project-slug}/{cube-slug}" \
  -H "X-Api-Key: your-api-key"

Response Format

{
  "data": [],
  "total": 0,
  "page": 1,
  "pageSize": 25
}

Pagination

Use _page and _pageSize query parameters to paginate results:
curl "https://api.cubestack.app/api/v1/{project}/{cube}?_page=2&_pageSize=10" \
  -H "X-Api-Key: your-api-key"

Sorting

Use _sort and _order query parameters:
curl "https://api.cubestack.app/api/v1/{project}/{cube}?_sort=created_at&_order=desc" \
  -H "X-Api-Key: your-api-key"

Filtering

Apply filters using column names with operators:
# Exact match
?title=eq:Hello

# Contains
?title=contains:world

# Greater than
?price=gt:100

# Multiple filters
?status=eq:published&price=gt:50

Available Filter Operators

OperatorDescription
eqEqual to
notNot equal to
containsContains substring
gtGreater than
gteGreater than or equal
ltLess than
lteLess than or equal

Next Steps