List user-defined types (UDTs) (HTTP)

Result

The status.types field in the response describes each user-defined type.

Example response:

{
  "status": {
    "types": [
      {
        "type": "userDefined",
        "udtName": "address",
        "definition": {
          "fields": {
            "city": {
              "type": "text"
            },
            "country": {
              "type": "text"
            }
          }
        },
        "apiSupport": {
          "createTable": true,
          "insert": true,
          "read": true,
          "filter": false,
          "cqlDefinition": "demo.address"
        }
      }
    ]
  }
}

Signature

Use the listTypes command.

curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
  "listTypes": {
    "options": {
      "explain": true
    }
  }
}'

Parameters

Name Type Summary

options.explain

true

Must be true to return metadata about the user-defined types. Otherwise, only the names of the user-defined types are returned.

Examples

The following examples demonstrate how to get metadata about user-defined types in a keyspace.

curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME" \
  --header "Token: APPLICATION_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "listTypes": {
    "options": {
      "explain": true
    }
  }
}'

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | 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