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

# Records

> API endpoints for CRUD operations on records.

# Records Endpoints

Endpoints for creating, reading, updating, and deleting records in a cube.

## List Records

Retrieve paginated records from a cube.

```bash theme={null}
GET /api/v1/{project}/{cube}
```

### Query Parameters

<ParamField query="_page" type="integer" default="1">
  Page number
</ParamField>

<ParamField query="_pageSize" type="integer" default="25">
  Number of records per page (max 100)
</ParamField>

<ParamField query="_sort" type="string">
  Column name to sort by
</ParamField>

<ParamField query="_order" type="string" default="asc">
  Sort direction: `asc` or `desc`
</ParamField>

### Filtering

Apply filters using column names as query parameters with operator prefixes:

```
?column=operator:value
```

Available operators: `eq`, `not`, `contains`, `gt`, `gte`, `lt`, `lte`

### Response

```json theme={null}
{
  "data": [
    {
      "id": 1,
      "title": "Hello World",
      "created_at": "2025-01-01T00:00:00Z"
    }
  ],
  "total": 100,
  "page": 1,
  "pageSize": 25
}
```

## Get Record

Retrieve a single record by ID.

```bash theme={null}
GET /api/v1/{project}/{cube}/{id}
```

### Response

```json theme={null}
{
  "id": 1,
  "title": "Hello World",
  "content": "My first record",
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Create Record

Create a new record.

```bash theme={null}
POST /api/v1/{project}/{cube}
```

<ParamField header="X-Api-Key" type="string" required>
  Your API key
</ParamField>

### Request Body

```json theme={null}
{
  "title": "New Record",
  "content": "Record content"
}
```

### Response

```json theme={null}
{
  "id": 2,
  "title": "New Record",
  "content": "Record content",
  "created_at": "2025-01-01T00:00:00Z"
}
```

## Update Record

Update an existing record.

```bash theme={null}
PUT /api/v1/{project}/{cube}/{id}
```

### Request Body

```json theme={null}
{
  "title": "Updated Title"
}
```

## Delete Record

Delete a record by ID.

```bash theme={null}
DELETE /api/v1/{project}/{cube}/{id}
```

### Response

```
204 No Content
```
