UUID types

Unlike collections, which assign a default _id value to each document, the Data API does not assign default identifiers or default values to rows in tables. Each table’s primary key is the unique identifier for that table’s rows.

To store explicitly-typed UUID data in a table, the Data API fully supports the uuid type and partially supports the timeuuid type.

uuid

The uuid type accepts all UUID versions.

Client behavior:

  • Python: Accepts str, UUID, and astrapy.ids.uuid*. Returns astrapy.ids.UUID, which is an alias for stdlib uuid.UUID.

  • TypeScript: Accepts UUID or strings in UUID format, including dashes, such as "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". Returns UUID.

  • Java: Accepts and returns java.util.UUID.

timeuuid (partial support)

The Data API can’t create columns of timeuuid type. You must use CQL directly instead of the Data API.

The Data API can only read, write, update, and delete values in existing timeuuid columns.

timeuuid is a specific type of UUID that includes timestamp information.

timeuuid data is returned and accepted as a JSON string.

objectId (unsupported)

objectId is not supported in tables. You can store such hexidecimal strings in tables, but they are not recognized or handled as a true objectId.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2025 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM