Data Store - Tables List
Get Data Store Table List
Retrieve a list of Data Store tables and views available in the Kahua Data Store.
Endpoint Summary
| Property | Value |
|---|---|
| Method | GET |
| Endpoint | /api/v1/datastore/tables |
| Authentication | OAuth 2.0 |
| Content Type | application/json |
Authentication
This endpoint uses OAuth 2.0 authentication.
OAuth 2.0 credentials can be provisioned in Kahua by a Kahua Domain Administrator.
For more information, refer to the Authentication documentation.
Example Request Headers
GET /api/v1/datastore/tables HTTP/1.1 Authorization: Bearer <access_token> Accept: application/json
Path Parameters
This endpoint does not require path parameters.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| includeColumns | Boolean | No | Include column names and SQL Server data types for each table |
| includeColumnDetails | Boolean | No | Include additional column metadata such as size, precision, scale, ordinal position, and nullability |
Request Body
This endpoint does not accept a request body.
Response
Status Codes
| Status Code | Description |
|---|---|
| 200 | Request completed successfully |
| 400 | Invalid request or query parameter |
| 401 | Unauthorized |
| 403 | Forbidden |
| 500 | Internal server error |
Response Body
Top-Level Response Fields
| Field | Type | Description |
|---|---|---|
| recordCount | integer | Number of records returned |
| records | array | Array of table or view metadata objects |
Table Object Fields
| Field | Type | Description |
|---|---|---|
| name | string | Name of the Data Store table or view |
| columns | array | Optional array of column metadata objects |
Column Metadata Object
| Field | Type | Description |
|---|---|---|
| columnName | string | Name of the column |
| dataType | string | SQL Server data type |
| columnOrdinal | integer | Position of the column within the table |
| allowDBNull | Boolean | Indicates whether NULL values are allowed |
| columnSize | integer | Maximum size of the column |
| numericPrecision | integer | Numeric precision value for decimal types |
| numericScale | integer | Numeric scale value for decimal types |
Example Response
{
"recordCount": 3,
"records": [
{
"name": "kahua_AEC_DailyReport_DailyReport"
},
{
"name": "kahua_AEC_DailyReport_DailyReport_Attachments"
},
{
"name": "kahua_AEC_DailyReport_DailyReport_Companies"
}
]
}
Examples
Request
GET /api/v1/datastore/tables
cURL Example
curl --request GET \
--url https://service.kahua.com/api/v1/datastore/tables \
--header 'Authorization: Bearer <token>' \
--header 'Accept: application/json'
Response
{
"recordCount": 1,
"records": [
{
"name": "kahua_AEC_DailyReport_DailyReport"
}
]
}
Request
GET /api/v1/datastore/tables?includeColumns=true
cURL Example
curl --request GET \
--url 'https://service.kahua.com/api/v1/datastore/tables?includeColumns=true' \
--header 'Authorization: Bearer <token>' \
--header 'Accept: application/json'
Response
{
"recordCount": 670,
"records": [
{
"name": "kahua_AEC_DailyReport_DailyReportCompany",
"columns": [
{
"columnName": "Id",
"dataType": "bigint"
},
{
"columnName": "CreatedDateTime",
"dataType": "datetime"
},
{
"columnName": "EntityLinkUrl",
"dataType": "nvarchar"
}
]
}
]
}
Response truncated for brevity.
Request
GET /api/v1/datastore/tables?includeColumns=true&includeColumnDetails=true
cURL Example
curl --request GET \
--url 'https://service.kahua.com/api/v1/datastore/tables?includeColumns=true&includeColumnDetails=true' \
--header 'Authorization: Bearer <token>' \
--header 'Accept: application/json'
Response
{
"recordCount": 670,
"records": [
{
"name": "kahua_AEC_DailyReport_DailyReport",
"columns": [
{
"columnName": "Id",
"dataType": "bigint",
"columnOrdinal": 0,
"allowDBNull": false
},
{
"columnName": "EntityLinkUrl",
"dataType": "nvarchar",
"columnOrdinal": 5,
"allowDBNull": true,
"columnSize": 4000
},
{
"columnName": "TotalLaborUnits",
"dataType": "decimal",
"columnOrdinal": 17,
"allowDBNull": true,
"numericPrecision": 35,
"numericScale": 9
}
]
}
]
}
Response truncated for brevity.
- For SQL Server nvarchar columns, a columnSize value of 2147483647 is equivalent to nvarchar(MAX).
- This endpoint currently returns all tables in a single response and does not support pagination.