Getting started
Read table rows
Read a bounded page of PostgreSQL rows with optional ordering. The table and ordering identifiers are validated.
GET
/api/customer/v1/projects/{projectId}/databases/{databaseId}/tables/{table}/rowsPath parameters
| Name | Value |
|---|---|
projectId | Required resource ID from an earlier API response. |
databaseId | Required resource ID from an earlier API response. |
table | Required table. |
Query parameters
| Name | Type | Required | Limits |
|---|---|---|---|
schema | string | No | See schema |
limit | integer | No | Minimum 1; Maximum 1000 |
offset | integer | No | Minimum 0 |
orderBy | string | No | See schema |
orderDir | "asc" | "desc" | No | See schema |
Example request
Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.
curl --request GET "$HCODE_BASE_URL/api/customer/v1/projects/${PROJECT_ID}/databases/${DATABASE_ID}/tables/${TABLE}/rows" \
--header "Authorization: Bearer $HCODE_API_KEY" Response
The JSON shape is defined in the response schema.
Response schema
{
"type": "object",
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"columns": {
"type": "array",
"items": {}
},
"rowCount": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"required": [],
"additionalProperties": true
}See errors and retries for failure responses.