Object types
List Object types
Retrieve every Object type in the Bucket, each with its full Metafield model. Use this to discover the content model before creating or querying Objects: the slug of each type is what you pass as type in Object queries, and the metafields array tells you which metadata keys an Object of that type accepts.
get/buckets/{slug}/object-types
Request
- Base URLhttps://api.cosmicjs.com/v3
- AuthAPI key in query parameter read_key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
read_keystring
The Bucket read key. Required unless the Bucket has no read key configured.
prettyboolean
Set to true to indent the JSON response for human reading. Increases response size.
Response
The Object types in the Bucket.
Example response
{
"object_types": [
{
"metafields": [
{
"type": "text",
"media_validation_type": "image"
}
]
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.