Get the code representation of a workbook (Beta)

This endpoint returns a code representation of a workbook, including metadata and contents. The response can be formatted as either JSON or YAML, and contains the workbook's pages, elements, columns, sources, and more. The representation can be used to store, copy, or modify the workbook programmatically.

Beta: This documentation describes a private beta feature and is subject to the Beta features disclaimer.

For more information on managing workbooks programmatically, see Manage workbooks as code. For more information on using this endpoint, including end-to-end instructions, see Get the code representation of a workbook.

Usage notes

  • Retrieve the workbookId by calling the /v2/workbooks endpoint.
  • The response includes references to the data sources and metadata necessary to recreate the workbook. The data itself is not included in the response.
  • To create a new workbook from code, use the /v2/workbooks/spec endpoint.
  • To update an existing workbook from code, use the /v2/workbooks/{workbookId}/spec endpoint.
  • The default format of the representation is YAML. To receive JSON, add the query parameter ?format=json or the header Accept: application/json.

Usage scenarios

  • Backup and restore: Developers can use this endpoint to programmatically back up workbooks and restore them if needed.
  • Version control: Developers can use this endpoint to programmatically manage, update, and version control workbooks between several organizations or tenants.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique identifier of the workbook.

Query Params
integer
enum
Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json