-
Notifications
You must be signed in to change notification settings - Fork 7
Table management APIs
Table management APIs are used to create and manage metadata about a table.
To create a table, create table API needs to be used.
Endpoint: /foxtrot/v1/tables
HTTP Method: POST
Content-type application/json
Returns: HTTP 201/Created on success
Parameters:
- table - table_name (Required) - Name of the table
- ttl - Number of days for which table data will be kept (Required) (in range [1-90])
- seggregatedBackend - Whether data in Datastore backend (HBase) will be written to different HBase table for this particular foxtrot table
###Request
{
"name": "test",
"ttl": 7,
"seggregatedBackend" : true
}
##Get table info To get table metadata use the table get API.
Endpoint: /foxtrot/v1/tables/{table}
HTTP Method: GET
Content-type: application/json
Returns: HTTP 200/OK with the table information in the body.
###Response
{
"name": "test",
"ttl": 7
}
##List all tables To get a list of tables in foxtrot use the table list API.
Endpoint: /foxtrot/v1/tables
HTTP Method: GET
Content-type: application/json
Returns: HTTP 200/OK with a list of table information in the body. ###Response
[
{
"name": "test",
"ttl": 7
}
]
##Table field metadata Foxtrot can extract and forward the field metadata from the events you send. The list of fields and their types can be received by using the field meta API. The list returned is a super-set of all the different fields present across all events for that table.
Endpoint: /foxtrot/v1/tables/{table}/fields
HTTP Method: GET
Content-type: application/json
Returns: HTTP 200/OK with response in the following format.
###Field meta response
{
"table": "foxtest",
"mappings": [
{
"field": "component",
"type": "STRING"
},
{
"field": "table",
"type": "STRING"
}
]
}