Check UDT existence
To check if your UDT exists as expected after creation, use a GET
request
to /v2/schemas/keyspaces/{keyspace_name}/types
.
curl --location --request GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace/types \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H 'accept: application/json' \
-H 'content-type: application/json'
{
"data":[
{
"name":"address_type",
"keyspace":"users_keyspace",
"fields":[
{
"name":"street",
"typeDefinition":"varchar"
},
{
"name":"city",
"typeDefinition":"varchar"
},
{
"name":"state",
"typeDefinition":"varchar"
},
{
"name":"zip",
"typeDefinition":"varchar"
}
]
}
]
}