question

secretshardul avatar image
secretshardul asked Erick Ramirez answered

Why can't I create a new Stargate namespace using the document API on Astra?

[FOLLOW UP QUESTION TO #9912]

I'm unable to create a new namespace using `POST /v2/schemas/namespaces` endpoint. I got an error

{"description":"Server error: org.apache.cassandra.stargate.exceptions.UnauthorizedException: User secretuser has no CREATE permission on <all keyspaces> or any of its parents","code":500}%
stargate
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

In DataStax Astra, a database user (CQL ROLE) has permissions to only the keyspace it has been explicitly granted access. In your case, the secretuser role only has access to the keyspace you provisioned when you created the DB instance.

When using the Document API on Astra, you will need to use the web interface to add a new keyspace to your database. You can only use Stargate's create namespace endpoint against a non-Astra hosted Cassandra instance. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.