OneCloud

Workiva Command Reference

Commands

Clear Sheet Data

Clears all data in a sheet.

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

A unique identifier for a spreadsheet

Sheet ID

TextField

A unique identifier for a sheet within a spreadsheet

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Create File

Accepts CSV/JSON file 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.

Inputs

Input
Type
Detail

Table ID

TextField

The ID of the table of which to list the files.

File

FileField

The file to upload. This input is ignored if Download URL is set.

Name

TextField

Sets the name of the downloaded file if url is provided. This defaults to the base name of the URL provided if Download URL is set.

Download URL

TextField

An optional url that points to a file that should be downloaded. This value is required if the file param is not set. This endpoint makes a simple GET request against the URL with no authentication. An example would be an S3 signed url.

Outputs

Output
Output Type

Result

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Create Pivot View

Creates a new pivot view from the given query and query result.

Inputs

Input
Type
Detail

Name

TextField

The name of the pivot view. Must be unique.

Query ID

TextField

The ID of the query to create the view from.

Query Result ID

TextField

The ID of the query result to create the view from.

Additional Metadata

MapField

User-defined metadata to attach to the pivot view. This is any arbitrary JSON object and is not required.

Outputs

Output
Output Type

Pivot View

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

Create Preview Query

Creates a temporary preview query on a table that can then be executed.

Inputs

Input
Type
Detail

Table ID

TextField

The ID of the table to query.

Limit

NumberField

The the maximum number of results.

File

TextField

If specified, the name of the file in the table to query.

Outputs

Output
Output Type

Query

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Create Query

Creates a new query.

Inputs

Input
Type
Detail

Name

TextField

The name of the query. Must be unique.

Description

TextField

The description of the query.

Primary Result ID

TextField

If specified, this is the ID of the result that you would like the results of the query to populate by default.

Query Text

TextField

The query definition as would be defined in Wdata in the Advanced Query Mode. The syntax of the query follows the Presto SQL syntax.

Temporary

BooleanField

If set to true, the query generated will only be temporarily available and will not show up in the queries tab of your Wdata workspace.

Parameters

GroupField

Define the parameters required to run this query.

Outputs

Output
Output Type

Query

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

Create Sheet

Creates a new sheet.

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

A unique identifier for a spreadsheet

Name

TextField

The name of the sheet (Must be unique)

Sheet Index

NumberField

The index of the new sheet in the list of sheets. (Defaults to adding as the top sheet)

Parent Sheet Id

TextField

The ID of the parent sheet you would like this sheet to be created under. Leave blank to add to the root spreadsheet.

Outputs

Output
Output Type

Sheet Metadata

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Create Spreadsheet

Creates a new spreadsheet.

Inputs

Input
Type
Detail

Name

TextField

The name of the sheet (Must be unique)

Outputs

Output
Output Type

Spreadsheet Metadata

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Delete File

Deletes a file in your Wdata workspace.

Inputs

Input
Type
Detail

File ID

TextField

The ID of the file to delete.

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Delete Pivot View

Deletes a pivot view with the specified ID.

Inputs

Input
Type
Detail

ID

TextField

The ID of the pivot view.

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

Delete Query

Deletes a query with the specified ID.

Inputs

Input
Type
Detail

Query ID

TextField

The ID of the query to delete.

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Delete Sheet

Deletes a sheet and all of its child sheets (recursively).

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

The unique identifier of the spreadsheet

Sheet ID

TextField

The unique identifier of the sheet

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Delete Spreadsheet

Deletes a spreadsheet.

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

The unique identifier of the spreadsheet

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Download File

Downloads a file from your Wdata workspace

Inputs

Input
Type
Detail

File ID

TextField

The ID of the file to delete.

Outputs

Output
Output Type

File

File

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Download Pivot View

Downloads the content of a pivot view.

Inputs

Input
Type
Detail

ID

TextField

The ID of the pivot view.

Outputs

Output
Output Type

Pivot View Content

File

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

Download Query Result

Download the contents of a query result to a file.

Inputs

Input
Type
Detail

Query Result ID

TextField

The ID of the query result.

Outputs

Output
Output Type

Query Result

File

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Export File to Spreadsheet

Exports a file in Wdata to the URL of the spreadsheet to export to, if present. If not present, a new spreadsheet will be created.

Inputs

Input
Type
Detail

File ID

TextField

The ID of the file to delete.

Spreadsheet URL

TextField

URL of the spreadsheet to export to, if present. If not present, a new spreadsheet will be created.

Outputs

Output
Output Type

Sheet info

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Export Query Result

Exports a query result to the URL of the spreadsheet to export to, if present. If not present, a new spreadsheet will be created.

Inputs

Input
Type
Detail

Query Result ID

TextField

The ID of the query result.

Spreadsheet URL

TextField

The URL of the spreadsheet to export the query result to.

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Get File Properties

Get the properties of a file in your Wdata workspace.

Inputs

Input
Type
Detail

File ID

TextField

The ID of the file to delete.

Outputs

Output
Output Type

File properties

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Get Pivot View

Gets the metadata of a pivot view.

Inputs

Input
Type
Detail

ID

TextField

The ID of the pivot view.

Outputs

Output
Output Type

Pivot View

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

Get Query Metadata

Gets the metadata of a query.

Inputs

Input
Type
Detail

Query ID

TextField

The ID of the query.

Outputs

Output
Output Type

Query

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Get Sheet Data

Fetches all of the data in the specified region for a sheet.

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

The unique identifier of the spreadsheet

Sheet ID

TextField

The unique identifier of the sheet

Region

TextField

[Start Column][Start Row]:[Stop Column][Stop Row]

A1 style representation of a cell or range. A range may be unbounded in any/all directions by leaving off the corresponding column or row.

Value Style

DropdownField

The style of cell value to return. For example, if a cell's value is =1+:1 Raw value =1+1 or use Calculated to get the calculated value 2

Revision

NumberField

The revision of the sheet to use. (Use the value -1 to get the latest revision)

Outputs

Output
Output Type

Row Count

Integer

Data

File

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Get Sheet Metadata

Gets the sheet metadata in a spreadsheet

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

The unique identifier of the spreadsheet

Sheet ID

TextField

The unique identifier of the sheet

Outputs

Output
Output Type

Sheet Metadata

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Get Spreadsheet Metadata

Returns spreadsheet metadata

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

The unique identifier of the spreadsheet

Outputs

Output
Output Type

Spreadsheet Metadata

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Health Check

Checks the health of the Wdata API.

Inputs

None

Outputs

Output
Output Type

Response

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

List File Errors

Lists the errors associated with a file. These errors are usually do to an import.

Inputs

Input
Type
Detail

File ID

TextField

The ID of the file to delete.

Outputs

Output
Output Type

Error list

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

List Files

Retrieves a list of files and their metadata in the specified table.

Inputs

Input
Type
Detail

Table ID

TextField

The ID of the table of which to list the files.

Outputs

Output
Output Type

Files list

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

List Pivot Views

List the pivot views in your workspace and retrieve the metadata.

Inputs

None

Outputs

Output
Output Type

Pivot Views

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

List Queries

List the queries and their metadata in your workspace.

Inputs

None

Outputs

Output
Output Type

Queries

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

List Query Results

Lists the available results for a query.

Inputs

Input
Type
Detail

Query ID

TextField

The ID of the query.

Outputs

Output
Output Type

Query Results

Json

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

List Spreadsheets

There is no specific command to list Workiva Spreadsheets. To get the Spreadsheet ID of a particular spreadsheet, log into Workiva Wdata, open the spreadsheet and the Spreadsheet ID can be retrieved from the page URL.

List Sheets

Returns a list of all sheets in a spreadsheet and their metadata.

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

The unique identifier of the spreadsheet

Outputs

Output
Output Type

Sheets

Json

No. of Sheets

Integer

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Overwrite Sheet Data

Clears all cells in a sheet and replaces the sheet with the values provided in the file.

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

A unique identifier for a spreadsheet

Sheet ID

TextField

A unique identifier for a sheet within a spreadsheet

Data File

FileField

The CSV data containing the data to populate the sheet

Delimiter

TextField

The delimiter of the CSV data provided

Outputs

Output
Output Type

Rows Written

Integer

Cells Written

Integer

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Run Query

Runs a query and immediately returns a query result entity. This entity has an id that can be used to download to export the results.

Inputs

Input
Type
Detail

Query ID

TextField

The ID of the query

Parameters

MapField

The parameter values. This is only needed if the query has parameters defined.

Run Asynchronously

BooleanField

If this is checked, the query will run asynchronously and will not wait until the query completes to complete this command.

Outputs

Output
Output Type

Query Result

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

Update Pivot View

Updates a pivot view metadata.

Inputs

Input
Type
Detail

ID

TextField

The ID of the pivot view.

Name

TextField

The name of the pivot view. Must be unique.

Query ID

TextField

The ID of the query to create the view from.

Query Result ID

TextField

The ID of the query result to create the view from.

Additional Metadata

MapField

User-defined metadata to attach to the pivot view. This is any arbitrary JSON object and is not required.

Outputs

Output
Output Type

Pivot View

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

Update Query Definition

Updates the properties of an existing query.

Inputs

Input
Type
Detail

Query ID

TextField

The ID of the query to update

Name

TextField

The name of the query. Must be unique.

Description

TextField

The description of the query.

Primary Result ID

TextField

If specified, this is the ID of the result that you would like the results of the query to populate by default.

Query Text

TextField

The query definition as would be defined in Wdata in the Advanced Query Mode. The syntax of the query follows the Presto SQL syntax.

Temporary

BooleanField

If set to true, the query generated will only be temporarily available and will not show up in the queries tab of your Wdata workspace.

Parameters

GroupField

Define the parameters required to run this query.

Outputs

Output
Output Type

Query

Json

Exit Codes

Code
Type
Detail

0

Success

Wdata API is up and running.

1

Error

Error.

Update Sheet Metadata

Updates a sheets metadata.

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

A unique identifier for a spreadsheet

Sheet ID

TextField

The ID of the sheet to update.

Name

TextField

The name of the sheet (Must be unique)

Sheet Index

NumberField

The index of the new sheet in the list of sheets. (Defaults to adding as the top sheet)

Parent Sheet Id

TextField

The ID of the parent sheet you would like this sheet to be created under. Leave blank to add to the root spreadsheet.

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

Update Spreadsheet Metadata

Updates a spreadsheet's metadata

Inputs

Input
Type
Detail

Spreadsheet ID

TextField

A unique identifier for a spreadsheet

Name

TextField

The name of the sheet (Must be unique)

Outputs

None

Exit Codes

Code
Type
Detail

0

Success

Success

1

Error

Error.

FAQ

Question: How do I get the Spreadsheet ID?
Answer: The Workiva spreadsheet ID is in the URL of the page when logged into Workiva Wdata.

Workiva Command Reference


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.