Skip to content

Create Bucket on Capella #106

Open
@deniswsrosa

Description

@deniswsrosa

Capella has a new management API that allows you to create a bucket via the API https://docs.couchbase.com/cloud/management-api-reference/index.html

To create an API key and secret, you will need to sign in into capella , and go to the org settings:
Screenshot 2023-10-04 at 10 44 16 PM

You should be able to generate keys to use with the rest API mentioned above.

In the New Connection Dialog, we already allow users to store credentials for the management API. All you have to do is to uncomment line 551 on NewConnectionDialog for the UI to appear:

Screenshot 2023-10-04 at 10 41 48 PM

  • When the user saves a connection, if he also provides an API key/secret in the advanced options of the New Connection Dialog, we need to test if they are valid. You could do that by simply trying to read or list the orgs of the user. If it doesn't work, we should tell the user that the management API KEY/Secret is invalid.

  • Change the DataLoader.saveDatabaseCredentials to also receive an API KEY and API secret, and store them in the "SavedCluster" object. This change is enough to also persist it under the hood.

  • on ActiveCluster class, add a get for the API KEY and another for the API Secret

  • The "create bucket" feature currently appears only for provisioned clusters, you will need to change the logic there to make it also appear to Capella clusters, but it should only appear when the user has provided the API KEY/Secret.

  • Finally, when the user clicks on the "Create Bucket" option, if it is a capella cluster, you will need to call the API endpoints to create the bucket.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions