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.

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.

Wdata preparation API.

Base URLs:

Email: Scout Team Web: Scout Team

Authentication

Scope Scope Description

Administrative Tasks

Admin Controller

deleteAccountUsingDELETE

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

Deletes all of the information in the account. THIS IS A FINAL OPERATION AND CANNOT BE UNDONE. Any state left in the account 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

exportAccountUsingGET

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

exportAccount

Example responses

200 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "id": "string",
    "objectId": "string",
    "updated": "2019-06-13T02:18:57Z",
    "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

Deletes all of the information in the account. THIS IS A FINAL OPERATION AND CANNOT BE UNDONE. Any state left in the account 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, Imports the tables, tags, and queries in the provided cb file into the account. 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) true file

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

getWorkspaceFilesBySizeUsingGET

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

getWorkspaceFilesBySize

Parameters

Parameter In Type Required Description
clientAddress.canonicalHostName query string false none
roles query array[string] false none
scopes query array[string] false none
licenses query array[string] false none
userId query string false none
organizationId query string false none
workspaceId query string false none
membershipId query string false none
contextId query string false none
timestamp query string(date-time) false none
token query string false none
workspaceName query string false none
orgName query string false none

Example responses

200 Response

{
  "body": [
    {
      "columnMappings": {
        "property1": "string",
        "property2": "string"
      },
      "created": "2019-06-13T02:18:57Z",
      "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-06-13T02:18:57Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_List_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

getWorkspaceQueryUsage

Parameters

Parameter In Type Required Description
startDate query string false startDate
stopDate query string false stopDate

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

getWorkspaceUploadUsage

Parameters

Parameter In Type Required Description
startDate query string false startDate
stopDate query string false stopDate

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

nameUsingPOST

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

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 true validateFilesDto

Example responses

201 Response

{
  "body": {
    "deletedFiles": [
      {
        "columnMappings": {
          "property1": "string",
          "property2": "string"
        },
        "created": "2019-06-13T02:18:57Z",
        "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-06-13T02:18:57Z",
        "userId": "string",
        "version": 0
      }
    ],
    "repairedFiles": [
      {
        "columnMappings": {
          "property1": "string",
          "property2": "string"
        },
        "created": "2019-06-13T02:18:57Z",
        "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-06-13T02:18:57Z",
        "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

Validates the tables in the workspace associated with this request. Returned is an entity 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-06-13T02:18:57Z",
        "databaseId": "string",
        "deleted": false,
        "description": "string",
        "id": "string",
        "isShared": false,
        "lastUploaded": "2019-06-13T02:18:57Z",
        "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-06-13T02:18:57Z",
        "userId": "string",
        "version": 0
      }
    ],
    "repairedTables": [
      {
        "created": "2019-06-13T02:18:57Z",
        "databaseId": "string",
        "deleted": false,
        "description": "string",
        "id": "string",
        "isShared": false,
        "lastUploaded": "2019-06-13T02:18:57Z",
        "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-06-13T02:18:57Z",
        "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

This API provides an interface for interacting with files and their metadata. Files are imported into a table in the following lifecycle: this upload file method in this controller moves a file status to STAGED. Then the import method in the table controller is called to move a file to IMPORTED. If the file contains an error, the file is moved back to STAGED and numerrors will be greater than zero. The import error endpoints can be used to download a list of errors. To delete an imported file, it must first be unimported via the table controller. Then the file can be deleted via the delete file method in this controller. 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

getFiles

Parameters

Parameter In Type Required Description
tableId query string true associated table id
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

Example responses

200 Response

{
  "body": [
    {
      "columnMappings": {
        "property1": "string",
        "property2": "string"
      },
      "created": "2019-06-13T02:18:57Z",
      "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-06-13T02:18:57Z",
      "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

uploadUsingPOST

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

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 file
» tableId body string true associated table id
» name body string false No longer in use, here only for backwards compatiblity.
» 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-06-13T02:18:57Z",
    "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-06-13T02:18:57Z",
    "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}

deleteFile

Parameters

Parameter In Type Required Description
fileId path string true fileId

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

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

getErrors

Parameters

Parameter In Type Required Description
fileId path string true file id
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

Example responses

200 Response

{
  "body": [
    {
      "code": 0,
      "created": "2019-06-13T02:18:57Z",
      "id": "string",
      "lineNumber": 0,
      "message": "string",
      "updated": "2019-06-13T02:18:57Z",
      "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

exportFileToSpreadsheets

Body parameter

{
  "url": "string"
}

Parameters

Parameter In Type Required Description
fileId path string true fileId
body body ExportFileDto true exportFileDto

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}

getFile

Parameters

Parameter In Type Required Description
id path string true id

Example responses

200 Response

{
  "body": {
    "columnMappings": {
      "property1": "string",
      "property2": "string"
    },
    "created": "2019-06-13T02:18:57Z",
    "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-06-13T02:18:57Z",
    "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

downloadFile

Parameters

Parameter In Type Required Description
id path string true id

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK the file if it exists string

Folder Management

Folder Controller

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

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 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 name to use when fuzzy matching entities
description query string false 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

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

listFolders

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

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-06-13T02:18:57Z",
      "description": "string",
      "id": "string",
      "name": "string",
      "parentId": "string",
      "updated": "2019-06-13T02:18:57Z",
      "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

createFolder

Body parameter

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

Parameters

Parameter In Type Required Description
body body FolderDto true folderDto

Example responses

201 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "updated": "2019-06-13T02:18:57Z",
    "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}

getFolder

Parameters

Parameter In Type Required Description
folderId path string true folderId

Example responses

200 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "updated": "2019-06-13T02:18:57Z",
    "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}

updateFolder

Body parameter

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

Parameters

Parameter In Type Required Description
folderId path string true folderId
body body FolderDto true folderDto

Example responses

200 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "parentId": "string",
    "updated": "2019-06-13T02:18:57Z",
    "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}

deleteFolder

Parameters

Parameter In Type Required Description
folderId path string true folderId

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

Returns paged list of children objects for folder id provided, if 'NULL' this returns all objects with no parent folder

Parameters

Parameter In Type Required Description
folderId path string true id of the folder parent
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

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-06-13T02:18:57Z",
      "description": "string",
      "id": "string",
      "metadata": {},
      "modified": "2019-06-13T02:18:57Z",
      "modifiedBy": "string",
      "name": "string",
      "parentId": "string",
      "type": 0,
      "updated": "2019-06-13T02:18:57Z",
      "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

Sets the children of a folder using an entity's type and id. If the entity previous lived somewhere else it is moved (including folderless items). If id is 'NULL' then the items are move to the base directory

Body parameter

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

Parameters

Parameter In Type Required Description
folderId path string true folderId
body body array[object] true children

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-06-13T02:18:57Z",
      "description": "string",
      "id": "string",
      "metadata": {},
      "modified": "2019-06-13T02:18:57Z",
      "modifiedBy": "string",
      "name": "string",
      "parentId": "string",
      "type": 0,
      "updated": "2019-06-13T02:18:57Z",
      "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

Health

Health Controller

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

healthCheck

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Map_string_string_

Identity Management

Iam Controller

meUsingGET

Code samples

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

GET https://h.app.wdesk.com/s/wdata/prep/iam/v1/me 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/iam/v1/me',
  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/iam/v1/me',
{
  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/iam/v1/me',
  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/iam/v1/me', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/iam/v1/me");
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/iam/v1/me", data)
    req.Header = headers

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

GET /iam/v1/me

This endpoint is deprecated and should no longer be used. It will always return admin rights for the user no matter who makes the call. The admin value return is no longer used for any access checks.

Example responses

200 Response

{
  "body": {
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "role": "admin",
    "userId": "string",
    "username": "string",
    "workspaceId": "string"
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_MembershipDto_

getMembershipsUsingGET

Code samples

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

GET https://h.app.wdesk.com/s/wdata/prep/iam/v1/membership 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/iam/v1/membership',
  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/iam/v1/membership',
{
  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/iam/v1/membership',
  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/iam/v1/membership', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/iam/v1/membership");
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/iam/v1/membership", data)
    req.Header = headers

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

GET /iam/v1/membership

This endpoint is deprecated. This will continue to return a list of memberships, however these memberships have no impact on access control. This exists purely for backwards compatibility.

Parameters

Parameter In Type Required Description
verbose query boolean false verbose

Example responses

200 Response

{
  "body": [
    {
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "role": "admin",
      "userId": "string",
      "username": "string",
      "workspaceId": "string"
    }
  ],
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Collection_MembershipDto_
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

createMembershipUsingPOST

Code samples

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

POST https://h.app.wdesk.com/s/wdata/prep/iam/v1/membership 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/iam/v1/membership',
  method: 'post',

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

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

};

fetch('https://h.app.wdesk.com/s/wdata/prep/iam/v1/membership',
{
  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/iam/v1/membership',
  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/iam/v1/membership', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/iam/v1/membership");
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/iam/v1/membership", data)
    req.Header = headers

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

POST /iam/v1/membership

This endpoint is deprecated and any memberships written will have no effect on any access checks. This is left running only for compatibility purposes.

Body parameter

{
  "role": "admin",
  "userId": "string"
}

Parameters

Parameter In Type Required Description
body body MembershipDto true membershipDto

Example responses

200 Response

{
  "body": {
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "role": "admin",
    "userId": "string",
    "username": "string",
    "workspaceId": "string"
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_MembershipDto_

updateMembershipUsingPUT

Code samples

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

PUT https://h.app.wdesk.com/s/wdata/prep/iam/v1/membership/{workspaceId} 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/iam/v1/membership/{workspaceId}',
  method: 'put',

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

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

};

fetch('https://h.app.wdesk.com/s/wdata/prep/iam/v1/membership/{workspaceId}',
{
  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/iam/v1/membership/{workspaceId}',
  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/iam/v1/membership/{workspaceId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/iam/v1/membership/{workspaceId}");
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/iam/v1/membership/{workspaceId}", data)
    req.Header = headers

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

PUT /iam/v1/membership/{workspaceId}

This endpoint is deprecated and any memberships written will have no effect on any access checks. This is left running only for compatibility purposes.

Body parameter

{
  "role": "admin",
  "userId": "string"
}

Parameters

Parameter In Type Required Description
workspaceId path string true workspaceId
body body MembershipDto true membershipDto

Example responses

200 Response

{
  "body": {
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "role": "admin",
    "userId": "string",
    "username": "string",
    "workspaceId": "string"
  },
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_MembershipDto_

Pivot View Management

Pivot View Controller

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

listPivotViews

Parameters

Parameter In Type Required Description
queryId query string true optional query id filter
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

Example responses

200 Response

{
  "body": [
    {
      "additionalMeta": {
        "property1": {},
        "property2": {}
      },
      "created": "2019-06-13T02:18:57Z",
      "definition": {
        "columns": [
          {
            "name": "string"
          }
        ],
        "filters": [
          {
            "betweenValue": "string",
            "columnType": "TEXT",
            "exclude": false,
            "filter": "EQUAL",
            "filterValues": [
              "string"
            ],
            "name": "string",
            "value": "string"
          }
        ],
        "grandTotalEnabled": "ENABLED",
        "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-06-13T02:18:57Z",
      "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"
      }
    ],
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "TEXT",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "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

createPivotView

Body parameter

{
  "additionalMeta": {
    "property1": {},
    "property2": {}
  },
  "definition": {
    "columns": [
      {
        "name": "string"
      }
    ],
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "TEXT",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "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 true pivotViewDto

Example responses

201 Response

{
  "body": {
    "additionalMeta": {
      "property1": {},
      "property2": {}
    },
    "created": "2019-06-13T02:18:57Z",
    "definition": {
      "columns": [
        {
          "name": "string"
        }
      ],
      "filters": [
        {
          "betweenValue": "string",
          "columnType": "TEXT",
          "exclude": false,
          "filter": "EQUAL",
          "filterValues": [
            "string"
          ],
          "name": "string",
          "value": "string"
        }
      ],
      "grandTotalEnabled": "ENABLED",
      "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-06-13T02:18:57Z",
    "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}

getPivotView

Parameters

Parameter In Type Required Description
pivotViewId path string true pivotViewId

Example responses

200 Response

{
  "body": {
    "additionalMeta": {
      "property1": {},
      "property2": {}
    },
    "created": "2019-06-13T02:18:57Z",
    "definition": {
      "columns": [
        {
          "name": "string"
        }
      ],
      "filters": [
        {
          "betweenValue": "string",
          "columnType": "TEXT",
          "exclude": false,
          "filter": "EQUAL",
          "filterValues": [
            "string"
          ],
          "name": "string",
          "value": "string"
        }
      ],
      "grandTotalEnabled": "ENABLED",
      "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-06-13T02:18:57Z",
    "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"
      }
    ],
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "TEXT",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "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}

updatePivotView

Body parameter

{
  "additionalMeta": {
    "property1": {},
    "property2": {}
  },
  "definition": {
    "columns": [
      {
        "name": "string"
      }
    ],
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "TEXT",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "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 pivotViewId
body body PivotViewDto true pivotViewDto

Example responses

200 Response

{
  "body": {
    "additionalMeta": {
      "property1": {},
      "property2": {}
    },
    "created": "2019-06-13T02:18:57Z",
    "definition": {
      "columns": [
        {
          "name": "string"
        }
      ],
      "filters": [
        {
          "betweenValue": "string",
          "columnType": "TEXT",
          "exclude": false,
          "filter": "EQUAL",
          "filterValues": [
            "string"
          ],
          "name": "string",
          "value": "string"
        }
      ],
      "grandTotalEnabled": "ENABLED",
      "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-06-13T02:18:57Z",
    "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}

deletePivotView

Parameters

Parameter In Type Required Description
pivotViewId path string true pivotViewId

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

downloadPivotView

Parameters

Parameter In Type Required Description
pivotViewId path string true pivotViewId

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK pivot view data string

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

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 pivotViewId

Example responses

200 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "id": "string",
    "objectId": "string",
    "updated": "2019-06-13T02:18:57Z",
    "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

Run Queries

Query Controller

getQueriesUsingGET

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

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

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-06-13T02:18:57Z",
      "description": "string",
      "id": "string",
      "lastRun": "2019-06-13T02:18:57Z",
      "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-06-13T02:18:57Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Collection_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

createQuery

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 true queryDto

Example responses

201 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "lastRun": "2019-06-13T02:18:57Z",
    "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-06-13T02:18:57Z",
    "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}?limit=0 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId}?limit=0 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',
  data: '?limit=0',
  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}?limit=0',
{
  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: {
  'limit' => 'integer(int32)'
}, 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={
  'limit': '0'
}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/query/preview/{tableId}?limit=0");
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}

previewQuery

Parameters

Parameter In Type Required Description
tableId path string true tableId
limit query integer(int32) true limit
fileName query string false fileName

Example responses

201 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "lastRun": "2019-06-13T02:18:57Z",
    "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-06-13T02:18:57Z",
    "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}

getQuery

Parameters

Parameter In Type Required Description
queryId path string true queryId

Example responses

200 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "lastRun": "2019-06-13T02:18:57Z",
    "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-06-13T02:18:57Z",
    "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}

updateQuery

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 queryId
body body QueryDto true queryDto

Example responses

200 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "lastRun": "2019-06-13T02:18:57Z",
    "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-06-13T02:18:57Z",
    "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}

deleteQuery

Parameters

Parameter In Type Required Description
queryId path string true queryId

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

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 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 queryId

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-06-13T02:18:57Z",
      "databaseId": "string",
      "deleted": false,
      "description": "string",
      "id": "string",
      "isShared": false,
      "lastUploaded": "2019-06-13T02:18:57Z",
      "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-06-13T02:18:57Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Collection_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?queryId=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult?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/queryresult',
  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/queryresult?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/queryresult',
  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/queryresult', params={
  'queryId': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult?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/queryresult", data)
    req.Header = headers

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

GET /api/v1/queryresult

listQueryResults

Parameters

Parameter In Type Required Description
queryId query string true queryId

Example responses

200 Response

{
  "body": [
    {
      "bytesScanned": 0,
      "columns": [
        {
          "name": "string",
          "type": "string"
        }
      ],
      "created": "2019-06-13T02:18:57Z",
      "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-06-13T02:18:57Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Collection_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

Runs a query and immediately returns a query result entity. This entity has an id that can be used to poll status from the getQueryResult method.

Body parameter

{
  "parameters": {
    "property1": {},
    "property2": {}
  },
  "queryId": "string"
}

Parameters

Parameter In Type Required Description
body body QueryResultDto true queryResultDto

Example responses

201 Response

{
  "body": {
    "bytesScanned": 0,
    "columns": [
      {
        "name": "string",
        "type": "string"
      }
    ],
    "created": "2019-06-13T02:18:57Z",
    "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-06-13T02:18:57Z",
    "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}

getQueryResult

Parameters

Parameter In Type Required Description
queryResultId path string true queryResultId

Example responses

200 Response

{
  "body": {
    "bytesScanned": 0,
    "columns": [
      {
        "name": "string",
        "type": "string"
      }
    ],
    "created": "2019-06-13T02:18:57Z",
    "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-06-13T02:18:57Z",
    "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 a running query and return a cancelled query result unless query is already in a completed state.

Parameters

Parameter In Type Required Description
queryResultId path string true queryResultId

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

downloadQueryResultsUsingGET

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

downloadQueryResults

Parameters

Parameter In Type Required Description
queryResultId path string true queryResultId

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK the results of query run string

exportQueryResultsToSpreadsheetsUsingPOST

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

exportQueryResultsToSpreadsheets

Body parameter

{
  "url": "string"
}

Parameters

Parameter In Type Required Description
queryResultId path string true queryResultId
body body ExportQueryResultDto true dto

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

Select List Controller

listUsingGET

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

list

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-06-13T02:18:57Z",
      "description": "string",
      "id": "string",
      "name": "string",
      "type": "static",
      "updated": "2019-06-13T02:18:57Z",
      "userId": "string",
      "valueType": "string",
      "values": [
        {}
      ],
      "version": 0
    }
  ],
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Collection_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

createUsingPOST

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

Body parameter

{
  "description": "string",
  "name": "string",
  "valueType": "string",
  "values": [
    {}
  ]
}

Parameters

Parameter In Type Required Description
body body SelectListDto true selectListDto

Example responses

201 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "type": "static",
    "updated": "2019-06-13T02:18:57Z",
    "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

getUsingGET

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

Parameters

Parameter In Type Required Description
selectListId path string true selectListId

Example responses

200 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "type": "static",
    "updated": "2019-06-13T02:18:57Z",
    "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

updateUsingPUT

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

Body parameter

{
  "description": "string",
  "name": "string",
  "valueType": "string",
  "values": [
    {}
  ]
}

Parameters

Parameter In Type Required Description
selectListId path string true selectListId
body body SelectListDto true selectListDto

Example responses

200 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "description": "string",
    "id": "string",
    "name": "string",
    "type": "static",
    "updated": "2019-06-13T02:18:57Z",
    "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

Parameters

Parameter In Type Required Description
selectListId path string true selectListId

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

Shared Table Controller

listUsingGET_1

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

list

Parameters

Parameter In Type Required Description
tableId query string false tableId
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.

Example responses

200 Response

{
  "body": [
    {
      "created": "2019-06-13T02:18:57Z",
      "destinationWorkspaceId": "string",
      "id": "string",
      "parentId": "string",
      "sourceTableId": "string",
      "table": {
        "created": "2019-06-13T02:18:57Z",
        "databaseId": "string",
        "deleted": false,
        "description": "string",
        "id": "string",
        "isShared": false,
        "lastUploaded": "2019-06-13T02:18:57Z",
        "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-06-13T02:18:57Z",
        "userId": "string",
        "version": 0
      },
      "updated": "2019-06-13T02:18:57Z",
      "userId": "string",
      "version": 0
    }
  ],
  "code": 0
}

Responses

Status Meaning Description Schema
200 OK OK BaseResponse_Collection_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

createUsingPOST_1

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

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 true sharedTableDto

Example responses

201 Response

{
  "body": {
    "created": "2019-06-13T02:18:57Z",
    "destinationWorkspaceId": "string",
    "id": "string",
    "parentId": "string",
    "sourceTableId": "string",
    "table": {
      "created": "2019-06-13T02:18:57Z",
      "databaseId": "string",
      "deleted": false,
      "description": "string",
      "id": "string",
      "isShared": false,
      "lastUploaded": "2019-06-13T02:18:57Z",
      "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-06-13T02:18:57Z",
      "userId": "string",
      "version": 0
    },
    "updated": "2019-06-13T02:18:57Z",
    "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

getUsingGET_1

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(