Developer Data Structure
FutureAI does not enforce schema on top of the developer data, however we expect this data to be in tabular shape (e.g. rows and columns or a set of data records following more or less stable schema). Developer data is organised into tables. FutureAI provides an API to insert new data into tables, update or delete existing records. Tables are created on-demand, during first attempt to insert data. Table schema is deducted based on the provided input. Further attempts to insert data into the table may result in new columns to be added automatically, once they appear. In order to update or delete individual records, developer must specify name of the “key column” which will be used to search for individual records. While “key column” is expected to be unique, FutureAI does not actually enforces any restrictions on this column. Attempts to update or delete a record which has duplicate “key column” values will result in multiple records being updated or deleted.Authentication
All developer APIs expect standard developer authorization, e.g. an API key, previously obtained via Developer Dashboard, to be provided viaFUTUREAI-SDK-KEY
HTTP header for every request.
Endpoints
All endpoints are based upon FutureAI’s API server URL, same value provided toserverUrl
parameter of Future.startFutureSession
client connection.
Upload CSV file
This request will consume provided CSV file, and will create or replace a data table with provided data. Any data that may be present in the table before would be rewritten, and table schema will be refreshed based on new data.POST /developer-data/upload/:tableName
tableName
- name of the table
text/csv
or multipart/form-data
- a CSV file provided either as a raw request body (with text/csv content-type)
- or a multipart/form-data payload, where CSV file should be present under a form key file
application/json
format.
Insert data into the table
Appends provided record (or multiple records) to the existing table data. Creates a table if it didn’t exist before. If provided data has new columns, these columns will be appended to the table schema.POST /developer-data/insert/:tableName
tableName
- name of the table
application/json
object, or an array of multiple JSON objects.
Response body:
Table metadata in application/json
format.
Update table metadata
Allows updating meta information about the table. Currently, meta information may only include name of the column to be interpreted as a primary key.POST /developer-data/set-metadata/:tableName
tableName
- name of the table
application/json
format.
Update single record
Allows updating single record for tables having key column specified.POST /developer-data/update/:tableName/:key
tableName
- name of the tablekey
- identifier of the record (expected value of the key column)
application/json
object.
Response body:
Delete single record
Allows deleting single record for tables having key column specified.POST /developer-data/delete/:tableName/:key
tableName
- name of the tablekey
- identifier of the record (expected value of the key column)