Get Data Store Table List

Retrieve a list of Data Store tables and views available in the Kahua Data Store.

Endpoint

GET /api/v1/datastore/tables

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

None

Response Body

The response will list all table and view metadata object in the data store. Optionally it will list columns and column details.

Status Code: 200

Property Type Description
recordCount integer Number of records returned
records Table[] Array of Table metadata objects

Table Metadata Object Fields

Property Type Description
name string Name of the Data Store table or view
columns Column[] Optional array of Column metadata objects

Column Metadata Object

Property 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

Copy
{
  "recordCount": 3,
  "records": [
    {
      "name": "kahua_AEC_DailyReport_DailyReport"
    },
    {
      "name": "kahua_AEC_DailyReport_DailyReport_Attachments"
    },
    {
      "name": "kahua_AEC_DailyReport_DailyReport_Companies"
    }
  ]
}

 

Error Codes

Status Code Description
400 Invalid request or query parameter
401 Unauthorized
403 Forbidden
500 Internal server error

 

Examples