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
}
Tables
Query Rows
Query table rows with filtering, sorting, and pagination
POST
/
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
string
required
Table ID
Request
object
Filter expression. Use
and / or groups with conditions like { "column": "score", "operator": "gte", "value": 10 }string
Column name to sort by
string
default:"desc"
Sort direction:
asc or descnumber
default:"50"
Rows to return (max 1000)
number
default:"0"
Rows to skip
Response
array
Matching rows
number
Total rows matching the filter
number
Effective limit used
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
}