...
Description | Getting the schema of a table |
Resource Path | /analytics/tables/{tableName}/schema |
HTTP Method | GET |
Request/Response Format | application/json |
Authentication | Basic |
Parameter description
Parameter | Description |
---|---|
{tableName} | Name The name of the table of which , the schema is required. |
Sample cURL command
Code Block |
---|
curl -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v https://localhost:9443/analytics/tables/ORG_WSO2_DAS_SAMPLE_SMART_HOME_DATA/schema -k |
Example
Code Block | ||
---|---|---|
| ||
GET https://localhost:9443/analytics/tables/testtable/schema |
Sample output
Code Block | ||
---|---|---|
| ||
{ "columns": {"house_id": { "logFile" : { "type" : "STRING", "isIndex" : true, "isScoreParam" : false }, "weight" : { "type" : "DOUBLE", "isIndex" : true, "isScoreParam" : false } }, "primaryKeys" : ["logFile", "logLine"{"type":"INTEGER","isScoreParam":false,"isIndex":false},"metro_area":{"type":"STRING","isScoreParam":false,"isIndex":false},"state":{"type":"STRING","isScoreParam":false,"isIndex":false},"device_id":{"type":"INTEGER","isScoreParam":false,"isIndex":false},"power_reading":{"type":"FLOAT","isScoreParam":false,"isIndex":false},"is_peak":{"type":"BOOLEAN","isScoreParam":false,"isIndex":false}}, "primaryKeys":[] } |
REST API response
HTTP status code | 200, 404 For descriptions of the HTTP status codes, see HTTP Status Codes. |