Update a workbook from a code representation (Beta)

This endpoint replaces a workbook with a workbook defined in a code representation. You can programmatically update the workbook's structure, metadata, and contents. This creates a new version of the workbook, which is accessible from the Sigma UI.

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

System and user requirements

  • To perform this operation, you must use API credentials owned by a user assigned an account type with Create, edit, and publish workbooks permission.
  • To perform this operation, you must use API credentials owned by a user with Can edit access for the workbook.

Usage notes

  • The default format of the representation is YAML. To use JSON, add the header Content-Type: application/json.
  • You can define the layout of contents on the workbook page using XML in the layout field. For more information, see Customize the layout of a workbook in code representation.
  • You can combine multiple YAML documents to create one workbook representation. For more information, see Prepare a representation from multiple YAML documents.
  • To retrieve the representation of an existing workbook, use the /v2/workbooks/{workbookId}/spec endpoint.
  • To create a new workbook from code, use the /v2/workbooks/spec endpoint.
  • The endpoint only supports updates to the pages array and its contents. Additional fields are not required and are ignored in the request body.
  • Partial updates are not supported. You must provide the entire representation of the workbook in the request body.

Usage scenarios

  • Agentic workflows: Agents can use these endpoints to directly manage workbook contents in code.
  • Automation: If you want to update several workbooks across one or more organizations, or in response to external events, you can use this endpoint to programmatically update the workbooks.
  • Integration: Using this endpoint, you can update workbooks based on external data sources or integrate Sigma with other tools and platforms.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique identifier of the workbook.

Body Params

The request body.

number
enum
required

The schema version used by this representation of the workbook.

Allowed:
pages
array of objects
required

The pages of the workbook spec and their contents.

pages*

Grid layout as XML.

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