Cube Logo0.33.4

Playground

Playground is a web-based tool which allows executing queries and previewing their results.

Playground is available in Cube Cloud on all tiers.

Cube Core and Cube Cloud both provide the Playground experience; however, a few additional features are available in Cube Cloud.

Playground Query and Results Example

Cube Core

Playground is available at http://localhost:4000 when Cube is run in development mode, i.e., when CUBEJS_DEV_MODE is set to true.

Since Playground exposes all data models and allows running all possible queries, it should not be used in production. You can use the JavaScript SDKs to build your own query builder and use it to query your Cube API in a secure way.

Cube Cloud

Playground is available out of the box to authenticated Cube Cloud users.

When editing the data model through the Cube IDE, Playground will switch to the Development API and its status will be visible in the Playground:

Playground during API restart

You can use query tabs to keep results of previous queries while still being able to make new queries. The query tabs can be found at the top of the Developer Playground:

Cube Developer Playground Tabs

The security context used for queries can be modified by clicking Add Security Context:

You can paste in an existing JWT if desired; or create a brand-new one by providing a JSON object that represents the decoded JWT.

Did you find this page useful?