Explore the SDK Playground

  • tutorial
    Use the SDK Playground to practice and learn more about Couchbase’s SDKs and SQL++.

    The SDK Playground lets you try out Couchbase SDKs and SQL++ code examples through interactive tutorials inside the Couchbase Capella UI.

    SDK Playground

    The code examples in the SDK Playground run in a remote execution environment deployed in the USA, which imposes limits to the runtime of each programming language. The remote environment has a firewall that prevents access to domains or networks outside of the Couchbase Cloud environment.

    When you run a code example on the SDK Playground, Couchbase Capella:

    • Generates a temporary credential for you with read and write access to the bucket you used for the code example. This temporary credential is destroyed after your code example request is executed.

    • Provides the remote execution environment with temporary network access to your database. This temporary network access is automatically revoked after one hour.

    For security purposes, do not include your database access credentials in your code examples.


    Before you use the SDK playground, make sure that you have access to the travel-sample bucket on your database.

    If you do not have access to the travel-sample bucket, import the sample data or open a support ticket.

    Use the SDK Playground

    To use the SDK Playground:

    1. Go to Playground and select one of the following tutorials:

      • SDKs for Beginners to learn how to use Couchbase SDKs to access your data.

      • SQL++ Tutorial to explore different SQL++ queries and experiment with data.

      • Data API Examples to explore Data API REST calls and available endpoints.

    2. Click Open in Playground.

    3. In the tutorial home page, you can do the following:

      • Select the Node.js, Python, or Go tab above the example code to change the programming language of the code sample.

      • Click Run to execute the example code and generate the response in the Response field.

      • Click Next to go to the next chapter of the tutorial.

      • Click Prev to return to the previous chapter of the tutorial.

      • Select a chapter from the Chapter list to go to a specific chapter.

      • Click Exit Playground to return to the Capella home page.

    To make small changes to the code examples, you must make sure that:

    • Your code examples do not try to access the underlying system resources or resources outside of the Capella network.

    • You keep the semantics of the original code examples.

    Your code examples will not run if they do not meet these requirements.

    Turn off the SDK Playground

    To turn off the SDK Playground:

    1. Go to Databases.

    2. Select the database you want to turn off the SDK Playground for.

    3. Go to Settings  General.

    4. In the Playground section, select Disable Playground.

    5. Click Save.

    Next Steps

    After you explore the SDK Playground, you can:

    If you want to connect to your database:

    1. Generate your database credentials to connect and control access to you database.

    2. Add your current IP address as an allowed IP for you database.

    3. Generate a code snippet to connect your database to your application.

    4. Choose and install a Couchbase SDK.

    5. (Optional) Download the security certificate for your database and add it to your application’s server machine or IDE:

      1. In the Databases tab, select a database.

      2. Go to Settings  Security Certificate.

      3. Click Download.