Import data#
Description#
By default, deletes all information in the workspace of the request. This is a final
operation and can’t be undone. Any state left in the workspace due to an error is
in an indeterminate state and shouldn’t be trusted. Some non-private information may be
kept for auditing and metric purposes. After the delete, it then imports the tables, tags,
and queries in the provided cb file into the workspace.
This is an asynchronous operation. Returns a 201 when the file is correctly decoded and
its tables, queries, and tags are saved. Files continue to import after this call
completes.
POST /api/v1/admin/import
Required OAuth Scopes
No OAuth scopes are required to use this endpoint.
Parameters#
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
wipe |
query |
boolean |
false |
|
file |
body |
string(binary) |
true |
The file containing workspace information to import |
Body parameter example#
file: string
Code Samples#
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import \
Content-Type:multipart/form-data \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import" \
--output-document - \
--header 'Content-Type: multipart/form-data' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import', headers = headers)
print(r.json())
Returns#
201 - Created#
Returns a JSON object with a body property, which contains the ID of the imported workspace.
Example Responses#
{
"body": "string",
"code": "integer"
}