Back to blog
Blog

Introducing Metadata

Tony Spiro's avatar

Tony Spiro

December 19, 2016

cover image

Extendible Objects is one of the most powerful features of Cosmic.  And this powerful feature just became more intuitive with a new property added to all endpoint responses: Metadata.

The new Metadata property provides you with the quickest way to get the value from your Metafields.  It gives you the key / value pair for the extended data on your Object.  For example, before you had to go into Metafields to get values, and this required you to sort through the array of Metafields. Now you would simply go into Metadata to get the value.

Metafields = Form Building, Metadata = Value Fetching

Metafields is the way the form is rendered in the Cosmic Dashboard and includes title, key and type.  Metadata extracts only the value of the data that you need.  Metafields are still available on every endpoint, but now you can hide them by adding hide_metafields=true to the end of your endpoint URL.  This will be the default behavior for future major API releases.

Benefits

With Metadata available on all Cosmic API endpoints, building and extending your content is faster and easier than ever before. Plus each endpoint has a much smaller data payload with Metafields hidden. If you have any questions, please reach out to us on our Slack Channel or on Twitter.