Skip to content

Keyspace creation vs Keyspace Retrieval Regex #94

Closed
@roybarber

Description

@roybarber

I'm able to create a Keyspace both via REST API and Admin area with the value "2DQJAUtSzzzKP9buDTvUvPk3" but unable to retrieve and use it via the REST api.

const dbAdmin = admin.dbAdmin(dbEndpoint)
await dbAdmin.createKeyspace('2DQJAUtSzzzKP9buDTvUvPk3')

// then i can list: 
const keyspaces = await dbAdmin.listKeyspaces()
console.log(keyspaces)

{
  "existingKeyspaces": [
    "default_keyspace",
    "2DQJAUtSzzzKP9buDTvUvPk3"
  ]
}

Then when trying to use the keyspace:

const collectionNames = await db.listCollections({ nameOnly: true, keyspace: '2DQJAUtSzzzKP9buDTvUvPk3' })
// or 
await db.createCollection('collectionname', { keyspace: '2DQJAUtSzzzKP9buDTvUvPk3' })

This returns:

DataAPIResponseError: Request invalid: field 'keyspace' value "2DQJAUtSzzzKP9buDTvUvPk3" not valid. Problem: must match "[a-zA-Z][a-zA-Z0-9_]*".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Data API issueIssue arises from the Data API, not the client

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions