Skip to main content
POST
https://api.crewship.dev
/
v1
/
tables
/
{id}
/
query
curl -X POST https://api.crewship.dev/v1/tables/tbl_abc123xyz789/query \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "and": [
        { "column": "status", "operator": "eq", "value": "qualified" },
        { "column": "score", "operator": "gte", "value": 50 }
      ]
    },
    "sort_by": "score",
    "sort_direction": "desc",
    "limit": 25,
    "offset": 0
  }'
{
  "rows": [
    {
      "id": "row_abc123xyz789",
      "company": "Acme",
      "score": 92,
      "status": "qualified",
      "_meta": {
        "created_at": "2024-01-15T10:35:00Z",
        "created_by": "api:Production Key",
        "updated_at": "2024-01-20T08:12:00Z",
        "updated_by": "api:Production Key"
      }
    }
  ],
  "total": 1,
  "limit": 25,
  "offset": 0
}

Path Parameters

id
string
required
Table ID

Request

filter
object
Filter expression. Use and / or groups with conditions like { "column": "score", "operator": "gte", "value": 10 }
sort_by
string
Column name to sort by
sort_direction
string
default:"desc"
Sort direction: asc or desc
limit
number
default:"50"
Rows to return (max 1000)
offset
number
default:"0"
Rows to skip

Response

rows
array
Matching rows
total
number
Total rows matching the filter
limit
number
Effective limit used
offset
number
Effective offset used
curl -X POST https://api.crewship.dev/v1/tables/tbl_abc123xyz789/query \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "and": [
        { "column": "status", "operator": "eq", "value": "qualified" },
        { "column": "score", "operator": "gte", "value": 50 }
      ]
    },
    "sort_by": "score",
    "sort_direction": "desc",
    "limit": 25,
    "offset": 0
  }'
{
  "rows": [
    {
      "id": "row_abc123xyz789",
      "company": "Acme",
      "score": 92,
      "status": "qualified",
      "_meta": {
        "created_at": "2024-01-15T10:35:00Z",
        "created_by": "api:Production Key",
        "updated_at": "2024-01-20T08:12:00Z",
        "updated_by": "api:Production Key"
      }
    }
  ],
  "total": 1,
  "limit": 25,
  "offset": 0
}