Explore the SDK Playground

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

    The SDK Playground gives you interactive tutorials that let you try out Couchbase SDK and SQL++ code examples inside the Couchbase Capella UI.

    How to use the SDK Playground

    First ensure you have the travel-sample bucket installed on your Couchbase database. If you don’t, reinstall the trial cluster or Request Support.

    To use the SDK Playground:

    1. From the Start page, click Playground.

    2. Perform any of the following tasks:

      • Select the Node.js, Python, Java, or Go tab above the example code to change the programming language for the generated code samples.

      • Click Run to execute the example code in the SDK Playground – the Response field presents executed code.

      • Click Next to proceed to the following part of the tutorial.

      • Click Previous to return to a previous tutorial.

      • Select a tutorial from the Chapter list to navigate to a specific tutorial.

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

    Small modifications to the code examples are allowed as long as the modified code satisfies certain requirements:

    • Code samples do not try to access the underlying system resources.

    • Modifications are expected to retain the semantics of the original example.

    • Code sample does not try to access resources outside the Capella network.

    If these conditions are not met, the code sample will fail to run.

    How the SDK Playground works

    The code examples are run in an isolated remote execution environment that is deployed in the USA. There are limits on how long code examples can be executed for each language runtime.

    The remote execution environment is firewalled to not access any domains or networks outside of the Couchbase Cloud environment.

    When running any of the examples on the playground, a temporary credential is generated with Read & Write access to the specified bucket.

    Credentials are destroyed immediately after the request is completed. For security, ensure you don’t add your database access credentials to the code examples.

    Similar to the temporary credentials, temporary network access to your database is provided to the remote execution environment as well. This network access gets automatically revoked after one hour.

    Disable the SDK Playground

    We maintain a high level of security in the Couchbase Capella SDK Playground, and continuously implement measures to ensure its ongoing safety. Here are some of our protective features:

    • You can only work with the sample data we provide

    • You only create temporary credentials that expire after each example execution

    If you are using Couchbase Capella in a highly regulated industry, you can disable the Playground by following these steps:

    1. To return to your organization, click the Couchbase Capella logo.

    2. On the Databases tab, select the database where you want to disable the SDK Playground.

    3. Go to Settings  General.

    4. Under Playground, select Disable Playground.

    5. Click Save.

    Next Steps

    If you want to connect to your database:

    1. Generate database credentials to securely connect and control access to your database. For more information, see Configure Database Credentials

    2. Add your current IP address as an allowed IP for your database. For more information, see Configure Allowed IP Addresses

    3. Generate a Code Snippet that helps you 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. From the Start page, go to Settings  Security Certificate.

      2. Click Download.