List user-defined types (UDTs) (HTTP)
|
For details about additional languages, see: |
Gets information about the user-defined types (UDTs) in a keyspace.
|
Ready to write code? See the examples for this method to get started. |
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 |
|---|---|---|
|
|
Must be |
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
}
}
}'