Data stores¶
Import Files¶
POST /data/import
Request body: ImportRequest
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Successful Response | ImportResult |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Template¶
GET /data/import/template
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
format |
query | one of "xlsx", "csv" |
no | 'xlsx' for an Excel workbook, 'csv' for a zip of CSV files. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | A blank template with one example row per sheet. |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
List Stores¶
GET /data/stores
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | DataStoreCollection |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Register Store¶
POST /data/stores
Register a folder or a database, checking it can be read first.
A database is connected to and read in full before it is registered, so a store that is registered is one that loaded at least once. Its problems are refused with one finding each, as an import's are.
Request body: DataStoreCreate
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Successful Response | DataStore |
| 409 | The engine's state refuses the request: a store is already loading, the store is the one being served, or the folder is already registered. | ErrorEnvelope |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Get Store¶
GET /data/stores/{store_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
store_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | DataStore |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Update Store¶
PATCH /data/stores/{store_id}
Rename a store, or change where a refresh takes its data from.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
store_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Request body: DataStoreUpdate
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | DataStore |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Forget Store¶
DELETE /data/stores/{store_id}
Forget a store.
A folder the user registered is left exactly as it is. A store the
engine created (managed) has its folder deleted too, since nothing
else knows it is there.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
store_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | Successful Response | |
| 409 | The engine's state refuses the request: a store is already loading, the store is the one being served, or the folder is already registered. | ErrorEnvelope |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Activate Store¶
POST /data/stores/{store_id}/activate
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
store_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Successful Response | LoadJobStatus |
| 409 | The engine's state refuses the request: a store is already loading, the store is the one being served, or the folder is already registered. | ErrorEnvelope |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Refresh Store¶
POST /data/stores/{store_id}/refresh
Bring a store up to date from its own source.
Refused with 409 when the store has nothing to refresh (imported files, or synthetic data too old to extend), when a folder or database that is not being served is asked to re-read (it is read afresh whenever it is activated), or when the store is already refreshing or loading.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
store_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Request body: RefreshRequest or null
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Successful Response | RefreshJobStatus |
| 409 | The engine's state refuses the request: a store is already loading, the store is the one being served, or the folder is already registered. | ErrorEnvelope |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Generate¶
POST /data/synthetic
Generate synthetic data into a new store, and serve it by default.
The store is registered at once, so it appears in GET /data/stores
while it is being written (not yet readable). If generation fails or
is cancelled, it is removed again.
Request body: GenerateSyntheticRequest or null
Responses
| Status | Meaning | Body |
|---|---|---|
| 202 | Successful Response | GenerateJobStatus |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.