NAV Navbar
Shell HTTP JavaScript Node.JS Ruby Python Java Go

Code Generation

Swagger is available to both view and download as JSON. You can find Swagger-UI here and the JSON file here.

In order to aid developers, we've also auto-generated clients in the following 3 languages which can be downloaded as zip archives:

Credentials

The Workiva Developer API is secured using an OAuth 2.0 Client Credentials Grant implementation. This authentication flow follows three steps:

  1. Obtain a client id and client secret. Steps on doing this can be found in the Workiva developer guide.
  2. Using the client id and client secret, make a POST request to the oauth2/token endpoint to exchange these credentials for a bearer token.
  3. When accessing the REST API, use the bearer token to authenticate.

Keep in mind that the consumer key/secret pair and the bearer token itself grant access to make requests on your behalf. These values should be considered as sensitive as passwords and must not be shared or distributed to untrusted parties.

This manner of authentication is only secure if SSL is used. Therefore, all requests must use HTTPS.

Authentication is handled on a different host than the rest of the api documentation, which can be found at api.app.wdesk.com.

Making Authenticated Requests

Step 1. Obtain a Client Id and Client Secret

First, make sure you have your client id and client secret handy. Store these somewhere safe.

Example request:

POST /iam/v1/oauth2/token HTTP/1.1
Host: api.app.wdesk.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
client_id=<your-client-id>&client_secret=<your-client-secret>&grant_type=client_credentials

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 19 Jan 2017 19:41:37 GMT
{
    "access_token": "ey...",
    "expires_in": 599,
    "scope": "scope",
    "token_type": "Bearer"
}

Step 2. Exchange Client Credentials for a Bearer Token

The client id and client secret must be exchanged for a bearer token by issuing a POST request to /iam/v1/oauth2/token:

Need to put in example request and example response

The value associated with the access_token field in the response is the bearer token to use on subsequent requests.

Example request:

GET /api/v1/table HTTP/1.1
Host: h.app.wdesk.com/s/cerebral
Authorization: Bearer ey...

Step 3. Authenticate API requests with the Bearer Token

The bearer token obtained in Step 2 is used to issue requests to Workiva Developer API endpoints. To use the bearer token, construct a normal HTTPS request and include an Authorization header with the value of Bearer <your-bearer-token>.

Example workflows

Creating a table and uploading data

Creating a table and uploading table so that it is queryable involves the following steps.

  1. Creating the table using the create table endpoint. This sets your table schema and defines the standards that imported files will need to adhere to to be correctly imported.

  2. Import a CSV file that adheres to the schema defined in step one. This involves using the upload file endpoint which accepts either a CSV file or a zip file with a single CSV file. Using a zip file simply reduces the file size before upload. If multiple files are in the zip file, a single file is randomly chosen. The response contains an id field which is the unique identifier for that file.

  3. Once the file is uploaded, it now needs to be imported into the table. This process involves validating the file and converting it into a format that's smaller and faster to query. At this time, additional data can be added to the import, such as tags. Here, you can also perform column mapping if you need to map columns in the uploaded file to the columns in the table. The import data should be used with the import file endpoint. This endpoint returns a file meta entity that contains a status. At this stage, assuming the import endpoint returned a success status, the file meta's status should be "IMPORTING".

  4. Use the get file meta endpoint to poll on the status of the import. Once done, the file meta will either be in the "IMPORTED" state which indicates the file has been successfully uploaded or it will revert back to the "STAGED" state which indicates there was an issue with the upload. The file meta entity will then indicate errors using the "numErrors" field. If this is greater than 0, a call can be made to the get import errors endpoint to get a list of errors.

Querying table data

Query a table's data involves the following steps:

  1. Create a query via the create query endpoint. This query is a persistent object that is available to reuse either as is or dynamically by using query parameters. If the query contains query parameters, then these parameters can be overridden when the query is run and if the query parameters do no contain default values then they must be overridden at runtime.

  2. Create a query result using the run query endpoint. This returns a query result entity that contains an id and a status. The status, assuming this call completed correctly, will be "NOT_STARTED" or "RUNNING".

  3. Poll on the query result using the get query result endpoint and the query result id. When the query completes or encounters an error, the status will change to "COMPLETE" or "ERROR" respectively. If status is set to error, then the "error" field on the query result will be populated.

  4. Download the result of the query using the download query results endpoint. The results will be in CSV format and will be an ordinary CSV file. This file adheres to the RFC4180 standard.

Updating a file

Updating an already imported file can be done as follows:

  1. Unimport the file using the unimport file endpoint. This removes the file from the imported data and it will no longer contribute to any query results.

  2. Delete the file from the system using the delete file endpoint.

  3. Follow steps 2 through 3 in the create table and import data workflow.

Cerebral API v1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The Wdata Preparation API allow users to import data sets from their source system, tag, organize, manipulate, share, export, and query against the data

Base URLs:

Email: Scout Team Web: Scout Team

Authentication

Scope Scope Description

API Health


The Health API endpoints provide methods for returning statusand debug information

healthCheckUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/health \
  -H 'Accept: */*'

GET https://h.app.wdesk.com/s/wdata/prep/health HTTP/1.1
Host: h.app.wdesk.com

Accept: */*

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/health',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'*/*'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/health',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/health',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/health', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/health");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/health", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /health

Health Check

Returns the status of the API WSGI servers

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Map_string_string_

Administrative Tasks


The Administrative Tasks API endpoints facilitate basic admin functionality. They are permissioned at a user level as it assumes that only admins in an individual workspace will be able to access these operations. In other words, no cross-workspace operations are supported here.

deleteWorkspaceUsingDELETE

Code samples

# You can also use wget
curl -X DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/account \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/account HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/account',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/account',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/account',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/account', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/account");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/account", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /api/v1/admin/account

Delete Workspace

Deletes all of the information in the workspace. This is a final operation and cannot be undone. Any state left in the workspace due to an error is in an indeterminate state and should not be trusted. Some non-private information may be kept for auditing and metric purposes.

Example responses

200 Response

{
  "body": "string",
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_string_
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

exportWorkspaceUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/export \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/export HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/export',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/export',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/export',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/export', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/export");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/export", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/admin/export

Export Workspace

Returns a file representing the entirety of this workspace. This file can be uploaded to another workspace to replicate this one.

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "id": "string",
    "objectId": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_TokenDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

importDataUsingPOST

Code samples

# You can also use wget
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}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import HTTP/1.1
Host: h.app.wdesk.com
Content-Type: multipart/form-data
Accept: application/json

var headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "file": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import',
  params: {
  }, headers: headers

p JSON.parse(result)

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', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/import", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/admin/import

Import Data

Deletes all of the information in the workspace. This is a final operation and cannot be undone. Any state left in the workspace due to an error is in an indeterminate state and should not be trusted. Some non-private information may be kept for auditing and metric purposes. Once this is done, it imports the tables, tags, and queries in the provided cb file into the workspace.

This is an asynchronous operation so when this endpoint returns a 201 it simply means that the file was correctly decoded and tables, queries, and tags have been saved. Files will continue to import even after this call completes.

Body parameter

file: string

Parameters

Parameter In Type Required Description
body body object false none
» file body string(binary) false The file containing workspace information to import

Example responses

201 Response

{
  "body": "string",
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_string_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

findWorkspaceFilesBySizeUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/filesBySize \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/filesBySize HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/filesBySize',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/filesBySize',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/filesBySize',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/filesBySize', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/filesBySize");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/filesBySize", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/admin/usage/filesBySize

Get Workspace Files By Size

Returns a paged collection of FileMeta associated with the workspace within this request ordered by size.

Parameters

Parameter In Type Required Description
limit query integer(int32) false The number of folders to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "columnMappings": {
        "property1": "string",
        "property2": "string"
      },
      "created": "2019-08-12T13:33:01Z",
      "id": "string",
      "key": "string",
      "metadata": {
        "property1": {
          "property1": {},
          "property2": {}
        },
        "property2": {
          "property1": {},
          "property2": {}
        }
      },
      "name": "string",
      "numErrors": 0,
      "numRecords": 0,
      "originalFileSize": 0,
      "source": "string",
      "status": "STAGING",
      "tableId": "string",
      "tags": {
        "property1": "string",
        "property2": "string"
      },
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_FileMetaDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getWorkspaceQueryUsageUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/query \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/query HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/query',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/query',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/query',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/query', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/query");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/query", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/admin/usage/query

Get Workspace Query Usage

Returns a Long that represents the number of bytes queried by the workspace associated with this request from the start time provided to now.

Parameters

Parameter In Type Required Description
startDate query string false The starting point to begin considering usage
stopDate query string false The ending point when considering usage

Example responses

200 Response

{
  "body": 0,
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_long_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getWorkspaceUploadUsageUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/upload \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/upload HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/upload',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/upload',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/upload',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/upload', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/upload");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/usage/upload", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/admin/usage/upload

Get Workspace Upload Usage

Returns a Long that represents the number of bytes uploaded by the workspace associated with this request from the start time provided to now.

Parameters

Parameter In Type Required Description
startDate query string false The starting point to begin considering usage
stopDate query string false The ending point when considering usage

Example responses

200 Response

{
  "body": 0,
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_long_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

validateFilesUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "tableId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files',
  params: {
  }, headers: headers

p JSON.parse(result)

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/admin/validation/files', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/admin/validation/files

Validate Files

Validates the files associated with the provided table ID. Files that are in an inconsistent state are repaired unless there is not enough state to recover. In that case, the file is deleted. All files deleted or repaired are returned.

Body parameter

{
  "tableId": "string"
}

Parameters

Parameter In Type Required Description
body body StartValidateFilesDto false The representation of the file to validate

Example responses

201 Response

{
  "body": {
    "deletedFiles": [
      {
        "columnMappings": {
          "property1": "string",
          "property2": "string"
        },
        "created": "2019-08-12T13:33:01Z",
        "id": "string",
        "key": "string",
        "metadata": {
          "property1": {
            "property1": {},
            "property2": {}
          },
          "property2": {
            "property1": {},
            "property2": {}
          }
        },
        "name": "string",
        "numErrors": 0,
        "numRecords": 0,
        "originalFileSize": 0,
        "source": "string",
        "status": "STAGING",
        "tableId": "string",
        "tags": {
          "property1": "string",
          "property2": "string"
        },
        "updated": "2019-08-12T13:33:01Z",
        "userId": "string",
        "version": 0
      }
    ],
    "repairedFiles": [
      {
        "columnMappings": {
          "property1": "string",
          "property2": "string"
        },
        "created": "2019-08-12T13:33:01Z",
        "id": "string",
        "key": "string",
        "metadata": {
          "property1": {
            "property1": {},
            "property2": {}
          },
          "property2": {
            "property1": {},
            "property2": {}
          }
        },
        "name": "string",
        "numErrors": 0,
        "numRecords": 0,
        "originalFileSize": 0,
        "source": "string",
        "status": "STAGING",
        "tableId": "string",
        "tags": {
          "property1": "string",
          "property2": "string"
        },
        "updated": "2019-08-12T13:33:01Z",
        "userId": "string",
        "version": 0
      }
    ]
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_ValidateFilesDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

validateTablesUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/tables \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/tables HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/tables',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/tables',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/tables',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/tables', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/tables");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/tables", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/admin/validation/tables

Validate Tables

Validates the tables in the workspace associated with this request. An entity is returned that indicates which tables had to be deleted due to bad state and which had enough state and were repaired.

Example responses

201 Response

{
  "body": {
    "deletedTables": [
      {
        "created": "2019-08-12T13:33:01Z",
        "databaseId": "string",
        "deleted": false,
        "description": "string",
        "id": "string",
        "isShared": false,
        "lastUploaded": "2019-08-12T13:33:01Z",
        "name": "string",
        "parentId": "string",
        "readOnly": false,
        "tableSchema": {
          "columns": [
            {
              "alias": "string",
              "description": "string",
              "metadata": {
                "property1": {},
                "property2": {}
              },
              "mode": "nullable",
              "name": "string",
              "type": "string"
            }
          ]
        },
        "type": "data",
        "updated": "2019-08-12T13:33:01Z",
        "userId": "string",
        "version": 0
      }
    ],
    "repairedTables": [
      {
        "created": "2019-08-12T13:33:01Z",
        "databaseId": "string",
        "deleted": false,
        "description": "string",
        "id": "string",
        "isShared": false,
        "lastUploaded": "2019-08-12T13:33:01Z",
        "name": "string",
        "parentId": "string",
        "readOnly": false,
        "tableSchema": {
          "columns": [
            {
              "alias": "string",
              "description": "string",
              "metadata": {
                "property1": {},
                "property2": {}
              },
              "mode": "nullable",
              "name": "string",
              "type": "string"
            }
          ]
        },
        "type": "data",
        "updated": "2019-08-12T13:33:01Z",
        "userId": "string",
        "version": 0
      }
    ]
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_ValidateTablesDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

File Management


The File Management API endpoints provide an interface for interacting with files and their metadata. Files are imported into a table in the following lifecycle: The Upload File in this API moves a file status to STAGED. The

Import File
endpoint in the Table Management API is called to move a file to IMPORTED. If the file contains an error, the Errors endpoint can be used to download a list of errors. To delete an imported file, it must first be unimported via the Table Management API. Then the file can be deleted via the Delete File endpoint in this API. To update a file, it must first be deleted and then re-imported. Any attempt to upload a file when the same name already exists in that table will result in an error.

getFilesUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file?tableId=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file?tableId=string HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file',
  method: 'get',
  data: '?tableId=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/file?tableId=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file',
  params: {
  'tableId' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/file', params={
  'tableId': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/file?tableId=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/file", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/file

Get Files

Returns a paged list of all files associated with the provided table ID, as well as some metadata associated with each file.

Parameters

Parameter In Type Required Description
tableId query string true The unique table identifier associated with this file
limit query integer(int32) false The number of files to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "columnMappings": {
        "property1": "string",
        "property2": "string"
      },
      "created": "2019-08-12T13:33:01Z",
      "id": "string",
      "key": "string",
      "metadata": {
        "property1": {
          "property1": {},
          "property2": {}
        },
        "property2": {
          "property1": {},
          "property2": {}
        }
      },
      "name": "string",
      "numErrors": 0,
      "numRecords": 0,
      "originalFileSize": 0,
      "source": "string",
      "status": "STAGING",
      "tableId": "string",
      "tags": {
        "property1": "string",
        "property2": "string"
      },
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_FileMetaDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

uploadFileUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/file \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/file HTTP/1.1
Host: h.app.wdesk.com
Content-Type: multipart/form-data
Accept: application/json

var headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "file": "string",
  "tableId": "string",
  "name": "string",
  "url": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/file',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file',
  params: {
  }, headers: headers

p JSON.parse(result)

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/file', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/file");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/file", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/file

Upload File

Accepts CSV/JSON files or a ZIP file with a single CSV or JSON file contained within. The file in the ZIP file must be CSV or JSON file and the name of the CSV or JSON is used to name the imported file. Downloading this file again will download the source. It is also possible to upload a url to a file to be downloaded instead of a file itself. This endpoint will then make a request to get the file using a simple unauthenticated GET request.

An example URL would be an S3 signed url to a file in an S3 bucket. Note that all files uploaded must have a .csv or .json extension. JSON files are expected to have a single json record per line, in other words, a JSON file is a series of JSON objects delimited by a newline character.

Body parameter

file: string
tableId: string
name: string
url: string

Parameters

Parameter In Type Required Description
body body object false none
» file body string(binary) false The physical file to upload
» tableId body string true The unique table identifier associated with this file
» name body string false No longer in use, here only for backwards compatibility
» url body string false No longer in use, here only for backwards compatibility

Example responses

201 Response

{
  "body": {
    "columnMappings": {
      "property1": "string",
      "property2": "string"
    },
    "created": "2019-08-12T13:33:01Z",
    "id": "string",
    "key": "string",
    "metadata": {
      "property1": {
        "property1": {},
        "property2": {}
      },
      "property2": {
        "property1": {},
        "property2": {}
      }
    },
    "name": "string",
    "numErrors": 0,
    "numRecords": 0,
    "originalFileSize": 0,
    "source": "string",
    "status": "STAGING",
    "tableId": "string",
    "tags": {
      "property1": "string",
      "property2": "string"
    },
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_FileMetaDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

deleteFileUsingDELETE

Code samples

# You can also use wget
curl -X DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /api/v1/file/{fileId}

Delete File

Unstages the file matching the provided file ID. The file must have a staged status. If the file is not found, this is a no-op. If the file is not staged, this returns a 409 status.

Parameters

Parameter In Type Required Description
fileId path string true The unique identifier of the file

Example responses

200 Response

{
  "body": "string",
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_string_
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getErrorsUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/error \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/error HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/error',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/error',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/error',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/error', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/error");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/error", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/file/{fileId}/error

Get Errors

Returns a paged list of operation errors for the provided file ID if they exist. These are errors encountered during the upload, import, or tagging processes. This list is immutable, and may be empty if no errors have been encountered.

Parameters

Parameter In Type Required Description
fileId path string true The unique identifier of the file
limit query integer(int32) false The number of errors to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "code": 0,
      "created": "2019-08-12T13:33:01Z",
      "id": "string",
      "lineNumber": 0,
      "message": "string",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_ImportErrorDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

exportFileToSpreadsheetsUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "url": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export',
  params: {
  }, headers: headers

p JSON.parse(result)

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/file/{fileId}/export', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/file/{fileId}/export

Export File To Spreadsheets

Exports the file ID identified in the path to the spreadsheet identified by the url in the payload. If the url string is empty, this endpoint will create a new spreadsheet and return the spreadsheet and sheet ids.

Body parameter

{
  "url": "string"
}

Parameters

Parameter In Type Required Description
fileId path string true The unique identifier of the file
body body ExportFileDto false The representation of the file to export

Example responses

201 Response

{
  "body": {
    "sheetId": "string",
    "workbookId": "string"
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_SpreadsheetInfoDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getFileUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/file/{id}

Get File

Returns the file meta matching the provided ID, or a 404 if an associated file cannot be found.

Parameters

Parameter In Type Required Description
id path string true The unique identifier of the file

Example responses

200 Response

{
  "body": {
    "columnMappings": {
      "property1": "string",
      "property2": "string"
    },
    "created": "2019-08-12T13:33:01Z",
    "id": "string",
    "key": "string",
    "metadata": {
      "property1": {
        "property1": {},
        "property2": {}
      },
      "property2": {
        "property1": {},
        "property2": {}
      }
    },
    "name": "string",
    "numErrors": 0,
    "numRecords": 0,
    "originalFileSize": 0,
    "source": "string",
    "status": "STAGING",
    "tableId": "string",
    "tags": {
      "property1": "string",
      "property2": "string"
    },
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_FileMetaDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

downloadFileUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}/download \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}/download HTTP/1.1
Host: h.app.wdesk.com

Accept: */*

var headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}/download',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}/download',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}/download',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}/download', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}/download");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{id}/download", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/file/{id}/download

Download File

Returns a file with the provided ID. The ID points to a file meta ID.

Parameters

Parameter In Type Required Description
id path string true The unique identifier of the file

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK OK string
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

Folder Management


The Folder Management API endpoints provide an interface for interacting with file folders and their contents.

searchUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/entity \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/entity HTTP/1.1
Host: h.app.wdesk.com

Accept: */*

var headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/entity',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/entity',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/entity',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/entity', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/entity");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/entity", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/entity

Search

Returns a list of all entities that match the provided criteria. Both name and description are fuzzy matches in that they will match any entity that contains the provided string. The type is used to filter the results based on the provided type of entity. The consumer must have READ access on all returned entities.

Parameters

Parameter In Type Required Description
name query string false An entity name to use when fuzzy matching entities
description query string false A description to use when fuzzy matching entities
type query array[integer] false Can be used to filter results to a certain set of entity types
limit query ref false The number of folders to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_FolderableDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

listFoldersUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/folder \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/folder HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/folder");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/folder", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/folder

Get Folders

Returns a paged list of all folders associated with the workspace.

Parameters

Parameter In Type Required Description
limit query integer(int32) false The number of folders to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-08-12T13:33:01Z",
      "description": "string",
      "id": "string",
      "name": "string",
      "parentId": "string",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_FolderDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

createFolderUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/folder \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/folder HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "description": "string",
  "name": "string",
  "parentId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder',
  params: {
  }, headers: headers

p JSON.parse(result)

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/folder', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/folder");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/folder", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/folder

Create Folder

Creates a folder using the provided information and returns the folder meta.

Body parameter

{
  "description": "string",
  "name": "string",
  "parentId": "string"
}

Parameters

Parameter In Type Required Description
body body FolderDto false The representation of the folder to create

Example responses

201 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_FolderDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getFolderUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/folder/{folderId}

Get Folder

Returns a folder matching the provided folder ID. If no matching entity can be found, a 404 status is returned.

Parameters

Parameter In Type Required Description
folderId path string true The unique identifier of the folder

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_FolderDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

updateFolderUsingPUT

Code samples

# You can also use wget
curl -X PUT https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId} HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "description": "string",
  "name": "string",
  "parentId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /api/v1/folder/{folderId}

Update Folder

Updates the folder matching the provided ID with the provided payload.

Body parameter

{
  "description": "string",
  "name": "string",
  "parentId": "string"
}

Parameters

Parameter In Type Required Description
folderId path string true The unique identifier of the folder
body body FolderDto false The representation of the folder to update

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_FolderDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

deleteFolderUsingDELETE

Code samples

# You can also use wget
curl -X DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId} \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId} HTTP/1.1
Host: h.app.wdesk.com

Accept: */*

var headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /api/v1/folder/{folderId}

Delete Folder

Deletes the folder with the provided folder ID. If the folder is not found, this is a no-op. All files and sub-folders are also recursively deleted.

Parameters

Parameter In Type Required Description
folderId path string true The unique identifier of the folder

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_string_
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

listChildrenUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/folder/{folderId}/children

List Folder Contents

Returns a paged list of all of the children whose parent ID is the same as the provided folder ID. If the folder ID in the path is the literal 'NULL' value, a list is returned containing all entities that have no parent.

Parameters

Parameter In Type Required Description
folderId path string true The unique identifier of the folder
limit query integer(int32) false The number of folders to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-08-12T13:33:01Z",
      "description": "string",
      "id": "string",
      "metadata": {},
      "modified": "2019-08-12T13:33:01Z",
      "modifiedBy": "string",
      "name": "string",
      "parentId": "string",
      "type": 0,
      "updated": "2019-08-12T13:33:01Z",
      "updatedBy": "string"
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_FolderableDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

setChildrenUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '[
  {
    "id": "string",
    "type": 0
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children',
  params: {
  }, headers: headers

p JSON.parse(result)

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/folder/{folderId}/children', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/folder/{folderId}/children", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/folder/{folderId}/children

Move Content Into A Folder

Sets the children of a folder using the entities' types and IDs in the provided payload. If the entities previously resided under a folder, including the root folder, they will be moved to the folder with the provided folder ID. If the provided ID is 'NULL' then the entities are moved to the root folder.

Body parameter

[
  {
    "id": "string",
    "type": 0
  }
]

Parameters

Parameter In Type Required Description
folderId path string true The unique identifier of the folder
body body array[object] false The representation of the entities to drop into the folder

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-08-12T13:33:01Z",
      "description": "string",
      "id": "string",
      "metadata": {},
      "modified": "2019-08-12T13:33:01Z",
      "modifiedBy": "string",
      "name": "string",
      "parentId": "string",
      "type": 0,
      "updated": "2019-08-12T13:33:01Z",
      "updatedBy": "string"
    }
  ],
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Collection_FolderableDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

Pivot View Management


The Pivot View Management API endpoints provide an interface for manipulating pivot views.

listPivotViewsUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview?queryId=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview?queryId=string HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview',
  method: 'get',
  data: '?queryId=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview?queryId=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview',
  params: {
  'queryId' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview', params={
  'queryId': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview?queryId=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/pivotview

Get Pivot Views

Returns a paged list of pivot views in the workspace. If queryId is provided in the payload, the results will be limited to a list of results associated with the provided query ID.

Parameters

Parameter In Type Required Description
queryId query string true The unique query identifier to constrain the the pivot views
limit query integer(int32) false The number of pivot views to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "additionalMeta": {
        "property1": {},
        "property2": {}
      },
      "created": "2019-08-12T13:33:01Z",
      "definition": {
        "columns": [
          {
            "name": "string"
          }
        ],
        "decimalPlaces": 0,
        "filters": [
          {
            "betweenValue": "string",
            "columnType": "TEXT",
            "exclude": false,
            "filter": "EQUAL",
            "filterValues": [
              "string"
            ],
            "name": "string",
            "value": "string"
          }
        ],
        "grandTotalEnabled": "ENABLED",
        "pivotViewType": "CLASSIC",
        "rows": [
          {
            "name": "string"
          }
        ],
        "subtotalEnabled": "ENABLED",
        "values": [
          {
            "active": true,
            "aggregation": "sum",
            "name": "string"
          }
        ]
      },
      "description": "string",
      "id": "string",
      "name": "string",
      "parentId": "string",
      "primaryPivotResultId": "string",
      "queryId": "string",
      "queryResultId": "string",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_PivotViewDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

createPivotViewUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "additionalMeta": {
    "property1": {},
    "property2": {}
  },
  "definition": {
    "columns": [
      {
        "name": "string"
      }
    ],
    "decimalPlaces": 0,
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "TEXT",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "pivotViewType": "CLASSIC",
    "rows": [
      {
        "name": "string"
      }
    ],
    "subtotalEnabled": "ENABLED",
    "values": [
      {
        "active": true,
        "aggregation": "sum",
        "name": "string"
      }
    ]
  },
  "description": "string",
  "name": "string",
  "primaryPivotResultId": "string",
  "queryId": "string",
  "queryResultId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview',
  params: {
  }, headers: headers

p JSON.parse(result)

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/pivotview', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/pivotview

Create Pivot View

Creates a pivot view from the provided information. Currently, we simply persist the provided "additionalMetadata" field which can be used to store any arbitrary JSON definition of a pivot table view. This pivot table must be associated with a query and can optionally be associated with a query result. When a query is deleted, the associated pivot views are also deleted.

Body parameter

{
  "additionalMeta": {
    "property1": {},
    "property2": {}
  },
  "definition": {
    "columns": [
      {
        "name": "string"
      }
    ],
    "decimalPlaces": 0,
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "TEXT",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "pivotViewType": "CLASSIC",
    "rows": [
      {
        "name": "string"
      }
    ],
    "subtotalEnabled": "ENABLED",
    "values": [
      {
        "active": true,
        "aggregation": "sum",
        "name": "string"
      }
    ]
  },
  "description": "string",
  "name": "string",
  "primaryPivotResultId": "string",
  "queryId": "string",
  "queryResultId": "string"
}

Parameters

Parameter In Type Required Description
body body PivotViewDto false The representation of the pivot view to create

Example responses

201 Response

{
  "body": {
    "additionalMeta": {
      "property1": {},
      "property2": {}
    },
    "created": "2019-08-12T13:33:01Z",
    "definition": {
      "columns": [
        {
          "name": "string"
        }
      ],
      "decimalPlaces": 0,
      "filters": [
        {
          "betweenValue": "string",
          "columnType": "TEXT",
          "exclude": false,
          "filter": "EQUAL",
          "filterValues": [
            "string"
          ],
          "name": "string",
          "value": "string"
        }
      ],
      "grandTotalEnabled": "ENABLED",
      "pivotViewType": "CLASSIC",
      "rows": [
        {
          "name": "string"
        }
      ],
      "subtotalEnabled": "ENABLED",
      "values": [
        {
          "active": true,
          "aggregation": "sum",
          "name": "string"
        }
      ]
    },
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "primaryPivotResultId": "string",
    "queryId": "string",
    "queryResultId": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_PivotViewDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getPivotViewUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/pivotview/{pivotViewId}

Get Pivot View

Returns a pivot view matching the provided pivot view ID. If no matching entity can be found, a 404 status is returned.

Parameters

Parameter In Type Required Description
pivotViewId path string true The unique identifier of the pivot view

Example responses

200 Response

{
  "body": {
    "additionalMeta": {
      "property1": {},
      "property2": {}
    },
    "created": "2019-08-12T13:33:01Z",
    "definition": {
      "columns": [
        {
          "name": "string"
        }
      ],
      "decimalPlaces": 0,
      "filters": [
        {
          "betweenValue": "string",
          "columnType": "TEXT",
          "exclude": false,
          "filter": "EQUAL",
          "filterValues": [
            "string"
          ],
          "name": "string",
          "value": "string"
        }
      ],
      "grandTotalEnabled": "ENABLED",
      "pivotViewType": "CLASSIC",
      "rows": [
        {
          "name": "string"
        }
      ],
      "subtotalEnabled": "ENABLED",
      "values": [
        {
          "active": true,
          "aggregation": "sum",
          "name": "string"
        }
      ]
    },
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "primaryPivotResultId": "string",
    "queryId": "string",
    "queryResultId": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_PivotViewDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

updatePivotViewUsingPUT

Code samples

# You can also use wget
curl -X PUT https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId} HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "additionalMeta": {
    "property1": {},
    "property2": {}
  },
  "definition": {
    "columns": [
      {
        "name": "string"
      }
    ],
    "decimalPlaces": 0,
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "TEXT",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "pivotViewType": "CLASSIC",
    "rows": [
      {
        "name": "string"
      }
    ],
    "subtotalEnabled": "ENABLED",
    "values": [
      {
        "active": true,
        "aggregation": "sum",
        "name": "string"
      }
    ]
  },
  "description": "string",
  "name": "string",
  "primaryPivotResultId": "string",
  "queryId": "string",
  "queryResultId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /api/v1/pivotview/{pivotViewId}

Update Pivot View

Updates the pivot view matching the provided ID with the provided payload. The associated query cannot be updated, so providing the query ID in the payload has no effect.

Body parameter

{
  "additionalMeta": {
    "property1": {},
    "property2": {}
  },
  "definition": {
    "columns": [
      {
        "name": "string"
      }
    ],
    "decimalPlaces": 0,
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "TEXT",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "pivotViewType": "CLASSIC",
    "rows": [
      {
        "name": "string"
      }
    ],
    "subtotalEnabled": "ENABLED",
    "values": [
      {
        "active": true,
        "aggregation": "sum",
        "name": "string"
      }
    ]
  },
  "description": "string",
  "name": "string",
  "primaryPivotResultId": "string",
  "queryId": "string",
  "queryResultId": "string"
}

Parameters

Parameter In Type Required Description
pivotViewId path string true The unique identifier of the pivot view
body body PivotViewDto false The representation of the pivot view to create

Example responses

200 Response

{
  "body": {
    "additionalMeta": {
      "property1": {},
      "property2": {}
    },
    "created": "2019-08-12T13:33:01Z",
    "definition": {
      "columns": [
        {
          "name": "string"
        }
      ],
      "decimalPlaces": 0,
      "filters": [
        {
          "betweenValue": "string",
          "columnType": "TEXT",
          "exclude": false,
          "filter": "EQUAL",
          "filterValues": [
            "string"
          ],
          "name": "string",
          "value": "string"
        }
      ],
      "grandTotalEnabled": "ENABLED",
      "pivotViewType": "CLASSIC",
      "rows": [
        {
          "name": "string"
        }
      ],
      "subtotalEnabled": "ENABLED",
      "values": [
        {
          "active": true,
          "aggregation": "sum",
          "name": "string"
        }
      ]
    },
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "primaryPivotResultId": "string",
    "queryId": "string",
    "queryResultId": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_PivotViewDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

deletePivotViewUsingDELETE

Code samples

# You can also use wget
curl -X DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /api/v1/pivotview/{pivotViewId}

Delete Pivot View

Deletes a pivot view matching the provided ID. This is presently an administrative method, and should be assumed to be a hard delete given that no capability to restorea deleted pivot view is available. This is a no-op if no such pivot view exists.

Parameters

Parameter In Type Required Description
pivotViewId path string true The unique identifier of the pivot view

Example responses

200 Response

{
  "body": "string",
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_string_
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

downloadPivotViewUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/download \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/download HTTP/1.1
Host: h.app.wdesk.com

Accept: */*

var headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/download',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/download',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/download',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/download', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/download");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/download", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/pivotview/{pivotViewId}/download

Download Pivot View

Downloads the pivot view data if it exists and has a query result attached to it. If not, a 404 status is returned.

Parameters

Parameter In Type Required Description
pivotViewId path string true The unique identifier of the pivot view

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK OK string
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

downloadPivotViewTokenUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/token \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/token HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/token',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/token',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/token',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/token', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/token");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/pivotview/{pivotViewId}/token", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/pivotview/{pivotViewId}/token

Download Pivot View Token

Instead of downloading the binary directly, this endpoint can be used to download a limited-lifetime token that can be used in conjunction with the token endpoint to download files. This is useful for AJAX requests.

Parameters

Parameter In Type Required Description
pivotViewId path string true The unique identifier of the pivot view

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "id": "string",
    "objectId": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_TokenDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

Query Management


The Query Management API endpoints provide an interface for CRUD operations on queries and executing them. Running queries is an asynchronous operation. Creating or previewing a query will create a query object that can be executed separately. Query execution results in the creation of an entity with a status that can be polled upon. A status of COMPLETED or ERROR indicates the query has completed. To download a CSV file with the query results, a token must be obtained first.

listQueriesUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/query \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/query HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/query',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/query', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/query");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/query", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/query

Get Queries

Returns a list of all non-temporary queries associated with the workspace. By default, these queries are ordered by their names in ascending order.

Parameters

Parameter In Type Required Description
limit query integer(int32) false The number of queries to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-08-12T13:33:01Z",
      "description": "string",
      "id": "string",
      "lastRun": "2019-08-12T13:33:01Z",
      "lastRunBy": "string",
      "name": "string",
      "parameters": [
        {
          "choices": [
            {}
          ],
          "mode": "scalar",
          "name": "string",
          "selectListId": "string",
          "type": "string",
          "value": {}
        }
      ],
      "parentId": "string",
      "primaryQueryResultId": "string",
      "queryText": "string",
      "temporary": false,
      "type": "string",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_QueryDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

createQueryUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/query \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/query HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "description": "string",
  "name": "string",
  "parameters": [
    {
      "mode": "scalar",
      "name": "string",
      "selectListId": "string",
      "type": "string",
      "value": {}
    }
  ],
  "primaryQueryResultId": "string",
  "queryText": "string",
  "temporary": false,
  "type": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/query',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query',
  params: {
  }, headers: headers

p JSON.parse(result)

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/query', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/query");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/query", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/query

Create Query

Creates a query object but does not execute the query. Full permissions are validated to ensure the requestor has access to all of the data sources being queried against. Execute the query by calling the POST /queryresult method.

Body parameter

{
  "description": "string",
  "name": "string",
  "parameters": [
    {
      "mode": "scalar",
      "name": "string",
      "selectListId": "string",
      "type": "string",
      "value": {}
    }
  ],
  "primaryQueryResultId": "string",
  "queryText": "string",
  "temporary": false,
  "type": "string"
}

Parameters

Parameter In Type Required Description
body body QueryDto false The representation of the query to create

Example responses

201 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "lastRun": "2019-08-12T13:33:01Z",
    "lastRunBy": "string",
    "name": "string",
    "parameters": [
      {
        "choices": [
          {}
        ],
        "mode": "scalar",
        "name": "string",
        "selectListId": "string",
        "type": "string",
        "value": {}
      }
    ],
    "parentId": "string",
    "primaryQueryResultId": "string",
    "queryText": "string",
    "temporary": false,
    "type": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_QueryDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

previewQueryUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/query/preview/{tableId}

Preview Query

Creates a limited scope query object but does not execute this query. The query is on the rails and selects all values against the provided table with a limit of 10 rows. Full permissions are not validated to ensure the requestor has access to the data source. This allows unpermissioned users to preview the table data.

Parameters

Parameter In Type Required Description
tableId path string true The identifier of the table against which to query
limit query integer(int32) false The number of rows to return
fileName query string false The name of the file to create

Example responses

201 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "lastRun": "2019-08-12T13:33:01Z",
    "lastRunBy": "string",
    "name": "string",
    "parameters": [
      {
        "choices": [
          {}
        ],
        "mode": "scalar",
        "name": "string",
        "selectListId": "string",
        "type": "string",
        "value": {}
      }
    ],
    "parentId": "string",
    "primaryQueryResultId": "string",
    "queryText": "string",
    "temporary": false,
    "type": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_QueryDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getQueryUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/query/{queryId}

Get Query

Returns a query matching the provided query ID. If no matching entity can be found, a 404 status is returned.

Parameters

Parameter In Type Required Description
queryId path string true The unique identifier of the query

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "lastRun": "2019-08-12T13:33:01Z",
    "lastRunBy": "string",
    "name": "string",
    "parameters": [
      {
        "choices": [
          {}
        ],
        "mode": "scalar",
        "name": "string",
        "selectListId": "string",
        "type": "string",
        "value": {}
      }
    ],
    "parentId": "string",
    "primaryQueryResultId": "string",
    "queryText": "string",
    "temporary": false,
    "type": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_QueryDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

updateQueryUsingPUT

Code samples

# You can also use wget
curl -X PUT https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId} HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "description": "string",
  "name": "string",
  "parameters": [
    {
      "mode": "scalar",
      "name": "string",
      "selectListId": "string",
      "type": "string",
      "value": {}
    }
  ],
  "primaryQueryResultId": "string",
  "queryText": "string",
  "temporary": false,
  "type": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /api/v1/query/{queryId}

Update Query

Updates the query matching the provided ID in the provided payload.

Body parameter

{
  "description": "string",
  "name": "string",
  "parameters": [
    {
      "mode": "scalar",
      "name": "string",
      "selectListId": "string",
      "type": "string",
      "value": {}
    }
  ],
  "primaryQueryResultId": "string",
  "queryText": "string",
  "temporary": false,
  "type": "string"
}

Parameters

Parameter In Type Required Description
queryId path string true The unique identifier of the query
body body QueryDto false The representation of the query to update

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "lastRun": "2019-08-12T13:33:01Z",
    "lastRunBy": "string",
    "name": "string",
    "parameters": [
      {
        "choices": [
          {}
        ],
        "mode": "scalar",
        "name": "string",
        "selectListId": "string",
        "type": "string",
        "value": {}
      }
    ],
    "parentId": "string",
    "primaryQueryResultId": "string",
    "queryText": "string",
    "temporary": false,
    "type": "string",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_QueryDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

deleteQueryUsingDELETE

Code samples

# You can also use wget
curl -X DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId} \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId} HTTP/1.1
Host: h.app.wdesk.com

Accept: */*

var headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /api/v1/query/{queryId}

Delete Query

Deletes the query with the provided query ID. If the query is not found, this is a no-op.

Parameters

Parameter In Type Required Description
queryId path string true The unique identifier of the query

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_string_
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getDependenciesUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}/dependencies \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}/dependencies HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}/dependencies',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}/dependencies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}/dependencies',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}/dependencies', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}/dependencies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}/dependencies", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/query/{queryId}/dependencies

Get Dependencies

Returns an unordered collection of all tables the matching query relies upon. This may return tables outside of this OAuth token's workspace in the case where the dependency is a shared table. The user associated with this context is verified to have read permissions on this query, but not on the returned tables.

Parameters

Parameter In Type Required Description
queryId path string true The unique identifier of the query
limit query integer(int32) false The number of folders to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-08-12T13:33:01Z",
      "databaseId": "string",
      "deleted": false,
      "description": "string",
      "id": "string",
      "isShared": false,
      "lastUploaded": "2019-08-12T13:33:01Z",
      "name": "string",
      "parentId": "string",
      "readOnly": false,
      "tableSchema": {
        "columns": [
          {
            "alias": "string",
            "description": "string",
            "metadata": {
              "property1": {},
              "property2": {}
            },
            "mode": "nullable",
            "name": "string",
            "type": "string"
          }
        ]
      },
      "type": "data",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_TableDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

listQueryResultsUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/queryresult

Get Query Results

Returns a paged list of query results matching the provided query ID. Returns an empty list if a matching query cannot be found.

Parameters

Parameter In Type Required Description
queryId query string false The unique identifier of the query
cursor query string false A paging cursor; if included the limit is ignored
limit query integer(int32) false The number of folders to return, must be between 1 and 1000, will default to 1000
offset query integer(int64) false THe item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "bytesScanned": 0,
      "columns": [
        {
          "name": "string",
          "type": "string"
        }
      ],
      "created": "2019-08-12T13:33:01Z",
      "duration": 0,
      "error": "string",
      "id": "string",
      "parameters": {
        "property1": {},
        "property2": {}
      },
      "queryId": "string",
      "queryParameters": [
        {
          "choices": [
            {}
          ],
          "mode": "scalar",
          "name": "string",
          "selectListId": "string",
          "type": "string",
          "value": {}
        }
      ],
      "queryText": "string",
      "size": 0,
      "status": "NOT_STARTED",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_QueryResultDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

runQueryUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "parameters": {
    "property1": {},
    "property2": {}
  },
  "queryId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult',
  params: {
  }, headers: headers

p JSON.parse(result)

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/queryresult', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/queryresult

Execute Query

Runs a query and immediately returns a query result entity. This entity has an ID that can be used to poll the status from the GET /queryresult method. A status of COMPLETED or ERROR indicates the query has completed.

Body parameter

{
  "parameters": {
    "property1": {},
    "property2": {}
  },
  "queryId": "string"
}

Parameters

Parameter In Type Required Description
body body QueryResultDto false The representation of the created query

Example responses

201 Response

{
  "body": {
    "bytesScanned": 0,
    "columns": [
      {
        "name": "string",
        "type": "string"
      }
    ],
    "created": "2019-08-12T13:33:01Z",
    "duration": 0,
    "error": "string",
    "id": "string",
    "parameters": {
      "property1": {},
      "property2": {}
    },
    "queryId": "string",
    "queryParameters": [
      {
        "choices": [
          {}
        ],
        "mode": "scalar",
        "name": "string",
        "selectListId": "string",
        "type": "string",
        "value": {}
      }
    ],
    "queryText": "string",
    "size": 0,
    "status": "NOT_STARTED",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_QueryResultDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getQueryResultUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/queryresult/{queryResultId}

Get Query Result

Returns a single query result matching the provided query result ID. Returns a 404 if an associated query result cannot be found.

Parameters

Parameter In Type Required Description
queryResultId path string true The unique identifier of the query result

Example responses

200 Response

{
  "body": {
    "bytesScanned": 0,
    "columns": [
      {
        "name": "string",
        "type": "string"
      }
    ],
    "created": "2019-08-12T13:33:01Z",
    "duration": 0,
    "error": "string",
    "id": "string",
    "parameters": {
      "property1": {},
      "property2": {}
    },
    "queryId": "string",
    "queryParameters": [
      {
        "choices": [
          {}
        ],
        "mode": "scalar",
        "name": "string",
        "selectListId": "string",
        "type": "string",
        "value": {}
      }
    ],
    "queryText": "string",
    "size": 0,
    "status": "NOT_STARTED",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_QueryResultDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

cancelQueryUsingDELETE

Code samples

# You can also use wget
curl -X DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId} \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId} HTTP/1.1
Host: h.app.wdesk.com

Accept: */*

var headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /api/v1/queryresult/{queryResultId}

Cancel Query

Cancels a running query associated with the provided query result ID and returns a cancelled query result unless query already in a COMPLETED state.

Parameters

Parameter In Type Required Description
queryResultId path string true The unique identifier of the query result

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_QueryResultDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

downloadQueryResultUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download HTTP/1.1
Host: h.app.wdesk.com

Accept: */*

var headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'*/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/queryresult/{queryResultId}/download

Download Query Result

Use the Token Management API to create a token with the query result ID and use the token to download the CSV file containing the query results

Parameters

Parameter In Type Required Description
queryResultId path string true The unique identifier of the query result

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK The results of query run string
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

exportQueryResultToSpreadsheetsUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/export \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/export HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/export',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "url": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/export',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/export',
  params: {
  }, headers: headers

p JSON.parse(result)

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/queryresult/{queryResultId}/export', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/export");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/export", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/queryresult/{queryResultId}/export

Export Query Result To Spreadsheets

Exports a query result matching the provided ID to Spreadsheets. In order to determine where to export the results, the request body should include a URL that is copied and pasted from the Spreadsheets UI. Returns a 404 if no matching query result can be found.

Body parameter

{
  "url": "string"
}

Parameters

Parameter In Type Required Description
queryResultId path string true The unique identifier of the query result
body body ExportQueryResultDto false The representation of the export query result

Example responses

201 Response

{
  "body": "string",
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_string_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

Select List Management


The Select List Management API endpoints provide an interface for interacting with select lists.

listSelectListsUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/selectlist

Get Select Lists

Returns a list of select lists associated with the workspace.

Parameters

Parameter In Type Required Description
limit query integer(int32) false The number of folders to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-08-12T13:33:01Z",
      "description": "string",
      "id": "string",
      "name": "string",
      "type": "static",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "valueType": "string",
      "values": [
        {}
      ],
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_SelectListDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

createSelectListUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "description": "string",
  "name": "string",
  "valueType": "string",
  "values": [
    {}
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist',
  params: {
  }, headers: headers

p JSON.parse(result)

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/selectlist', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/selectlist

Create Select List

Creates a select list using the provided information and returns the select list meta.

Body parameter

{
  "description": "string",
  "name": "string",
  "valueType": "string",
  "values": [
    {}
  ]
}

Parameters

Parameter In Type Required Description
body body SelectListDto false The representation of the select list to create

Example responses

201 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "type": "static",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "valueType": "string",
    "values": [
      {}
    ],
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_SelectListDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getSelectListUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/selectlist/{selectListId}

Get Select List

Returns a select list matching the provided select list ID. If no matching entity can be found, a 404 status is returned.

Parameters

Parameter In Type Required Description
selectListId path string true The unique identifier of the select list

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "type": "static",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "valueType": "string",
    "values": [
      {}
    ],
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_SelectListDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

updateSelectListUsingPUT

Code samples

# You can also use wget
curl -X PUT https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId} HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "description": "string",
  "name": "string",
  "valueType": "string",
  "values": [
    {}
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /api/v1/selectlist/{selectListId}

Update Select List

Updates the select list matching the provided ID with the provided payload.

Body parameter

{
  "description": "string",
  "name": "string",
  "valueType": "string",
  "values": [
    {}
  ]
}

Parameters

Parameter In Type Required Description
selectListId path string true The unique identifier of the select list
body body SelectListDto true The representation of the select list to update

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "type": "static",
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "valueType": "string",
    "values": [
      {}
    ],
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_SelectListDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

deleteUsingDELETE

Code samples

# You can also use wget
curl -X DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://h.app.wdesk.com/s/wdata/prep/api/v1/selectlist/{selectListId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /api/v1/selectlist/{selectListId}

Delete Select List

Deletes a select list matching the provided ID. This is a no-op if no such select list exists.

Parameters

Parameter In Type Required Description
selectListId path string true The unique identifier of the select list

Example responses

200 Response

{
  "body": "string",
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_string_
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

Shared Table Management


The Shared Table Management API endpoints provide an interface for interacting with shared tables.

listSharedTablesUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/sharedtable

Get Shared Tables

Returns a list of shared tables associated with the workspace making the request.

Parameters

Parameter In Type Required Description
tableId query string false The unique table identifier associated with the shared table
sharedWithMe query boolean false If set to true, this endpoint returns a list of shared tables that have been shared TO it rather than shared FROM it. The entities contain both the shared table entity and the table being shared itself. If sharedWithMe is set to true, the optional table id parameter is ignored.
limit query integer(int32) false The number of shared files to return, must be between 1 and 1000, will default to 1000
cursor query string false A paging cursor; if included the limit is ignored
offset query integer(int64) false The item to start with on the page, must be greater than or equal to 0, will default to 0

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-08-12T13:33:01Z",
      "destinationWorkspaceId": "string",
      "id": "string",
      "parentId": "string",
      "sourceTableId": "string",
      "table": {
        "created": "2019-08-12T13:33:01Z",
        "databaseId": "string",
        "deleted": false,
        "description": "string",
        "id": "string",
        "isShared": false,
        "lastUploaded": "2019-08-12T13:33:01Z",
        "name": "string",
        "parentId": "string",
        "readOnly": false,
        "tableSchema": {
          "columns": [
            {
              "alias": "string",
              "description": "string",
              "metadata": {
                "property1": {},
                "property2": {}
              },
              "mode": "nullable",
              "name": "string",
              "type": "string"
            }
          ]
        },
        "type": "data",
        "updated": "2019-08-12T13:33:01Z",
        "userId": "string",
        "version": 0
      },
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK OK PagedResponse_SharedTableDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

createSharedTableUsingPOST

Code samples

# You can also use wget
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "destinationWorkspaceId": "string",
  "sourceTableId": "string",
  "table": {
    "description": "string",
    "name": "string",
    "tableSchema": {
      "columns": [
        {
          "alias": "string",
          "description": "string",
          "metadata": {
            "property1": {},
            "property2": {}
          },
          "mode": "nullable",
          "name": "string",
          "type": "string"
        }
      ]
    },
    "type": "data"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable',
  params: {
  }, headers: headers

p JSON.parse(result)

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/sharedtable', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /api/v1/sharedtable

Create Shared Table

Creates a shared table instance between the workspace associated with this request and a workspace defined in the request payload.

Body parameter

{
  "destinationWorkspaceId": "string",
  "sourceTableId": "string",
  "table": {
    "description": "string",
    "name": "string",
    "tableSchema": {
      "columns": [
        {
          "alias": "string",
          "description": "string",
          "metadata": {
            "property1": {},
            "property2": {}
          },
          "mode": "nullable",
          "name": "string",
          "type": "string"
        }
      ]
    },
    "type": "data"
  }
}

Parameters

Parameter In Type Required Description
body body SharedTableDto false The representation of the shared table to create

Example responses

201 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "destinationWorkspaceId": "string",
    "id": "string",
    "parentId": "string",
    "sourceTableId": "string",
    "table": {
      "created": "2019-08-12T13:33:01Z",
      "databaseId": "string",
      "deleted": false,
      "description": "string",
      "id": "string",
      "isShared": false,
      "lastUploaded": "2019-08-12T13:33:01Z",
      "name": "string",
      "parentId": "string",
      "readOnly": false,
      "tableSchema": {
        "columns": [
          {
            "alias": "string",
            "description": "string",
            "metadata": {
              "property1": {},
              "property2": {}
            },
            "mode": "nullable",
            "name": "string",
            "type": "string"
          }
        ]
      },
      "type": "data",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    },
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
201 Created Created BaseResponse_SharedTableDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
409 Conflict Collision SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

getSharedTableUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v1/sharedtable/{sharedTableId}

Get Shared Table

Returns a shared table matching the provided shared table ID. If no matching entity can be found, a 404 status is returned.

Parameters

Parameter In Type Required Description
sharedTableId path string true The unique identifier of the shared table
sharedWithMe query boolean false If set to true, this endpoint returns a shared table matching the provided id that has been shared TO rather than FROM the workspace associated with this request.

Example responses

200 Response

{
  "body": {
    "created": "2019-08-12T13:33:01Z",
    "destinationWorkspaceId": "string",
    "id": "string",
    "parentId": "string",
    "sourceTableId": "string",
    "table": {
      "created": "2019-08-12T13:33:01Z",
      "databaseId": "string",
      "deleted": false,
      "description": "string",
      "id": "string",
      "isShared": false,
      "lastUploaded": "2019-08-12T13:33:01Z",
      "name": "string",
      "parentId": "string",
      "readOnly": false,
      "tableSchema": {
        "columns": [
          {
            "alias": "string",
            "description": "string",
            "metadata": {
              "property1": {},
              "property2": {}
            },
            "mode": "nullable",
            "name": "string",
            "type": "string"
          }
        ]
      },
      "type": "data",
      "updated": "2019-08-12T13:33:01Z",
      "userId": "string",
      "version": 0
    },
    "updated": "2019-08-12T13:33:01Z",
    "userId": "string",
    "version": 0
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_SharedTableDto_
400 Bad Request Invalid request MultiError
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
404 Not Found Not found SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

deleteSharedTableUsingDELETE

Code samples

# You can also use wget
curl -X DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId} HTTP/1.1
Host: h.app.wdesk.com

Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://h.app.wdesk.com/s/wdata/prep/api/v1/sharedtable/{sharedTableId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /api/v1/sharedtable/{sharedTableId}

Delete Shared Table

Deletes a shared table matching the provided ID. What is being deleted is thelinkages between the source and destination. The actual table itself is left intact. This is a no-op if no such shared table exists.

Parameters

Parameter In Type Required Description
sharedTableId path string true The unique identifier of the shared table

Example responses

200 Response

{
  "body": "string",
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_string_
401 Unauthorized Unauthorized SingleError
403 Forbidden Forbidden SingleError
429 Too Many Requests Rate limit exceeded SingleError
500 Internal Server Error Server error SingleError

Table Management


The Table Management API endpoints provide an interface for interacting with data tables. Due to the nature of our data store,columns can only ever be added. A column is considered new if no existing column can be found with an identical name. This equality check is case insensitive. No columns are ever deleted or modified by this endpoint. Any new columns will appear after other user-defined columns but before any meta columns (columns that start with _).

getTablesUsingGET

Code samples

# You can also use wget
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/table \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/table HTTP/1.1
Host: h.app.wdesk.com
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://h.app.wdesk.com/s/wdata/prep/api/v1/table',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = 'string';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://h.app.wdesk.com/s/wdata/prep/api/v1/table',
{
  method: 'GET',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://h.app.wdesk.com/s/wdata/prep/api/v1/table',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/table', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/table");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://h.app.wdesk.com/s/wdata/prep/api/v1/table", data)
    req.Header = headers

    client