API Reference

Import from spreadsheets

Description

Imports spreadsheet data and immediately returns a file meta result. This DTO has an ID, which can be used to poll on status via the file controller.

POST /api/v1/table/{tableId}/spreadsheet/import

🚧

Required OAuth Scopes:

No OAuth scopes are required to use this endpoint.

Parameters

ParameterInTypeRequiredDescription
tableIdpathstringtrueThe unique identifier of the table
bodybodyImportFromSpreadsheetDtotrueThe representation of the table to update

Body parameter example

{
  "fileId": "string",
  "name": "string",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "url": "string"
}

Code Samples

curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/table/{tableId}/spreadsheet/import  \ 
-H 'Content-Type: application/json' \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http POST https://h.app.wdesk.com/s/wdata/prep/api/v1/table/{tableId}/spreadsheet/import  \ 
Content-Type:application/json \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/prep/api/v1/table/{tableId}/spreadsheet/import" \
 --output-document -  \ 
 --header 'Content-Type: application/json' \ 
 --header 'Accept: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://h.app.wdesk.com/s/wdata/prep/api/v1/table/{tableId}/spreadsheet/import', headers = headers)

print(r.json())

Returns

200 - OK

Returns a JSON object with a body property, which contains a FileMetaDto object for the imported spreadsheet.

Example Responses


{
  "body": {
    "columnMappings": {},
    "created": "string",
    "delimiter": "string",
    "id": "string",
    "key": "string",
    "metadata": {},
    "name": "string",
    "numErrors": "integer",
    "numRecords": "integer",
    "originalFileSize": "integer",
    "source": "string",
    "status": "string",
    "tableId": "string",
    "tags": {},
    "updated": "string",
    "userId": "string",
    "version": "integer"
  },
  "code": "integer"
}