Product Updates

DatoCMS changelog for new features and general improvements
API Clients Content Management API

Released v2 of Content Management API

May 12th, 2018

We silently released v2 of our Content Management API. The major change is how file uploads are now handled:

  • We no longer have an "Image" and "Image gallery" field. Every existing image field has been converted to a "Single file" field, and every "Image gallery" field has been converted into a "Multiple files" field. We made sure to add a format validation so that only images can be uploaded, so everything should work exactly as before.

  • When fetching records from the API that contain single/multiple file fields, you will no longer receive the complete "Upload" payload, but just its ID. You can fetch all the info regarding an Upload using the GET /uploads/:id endpoint.

  • When creating/updating records that contain single/multiple file fields, you no longer have to pass the complete "Upload" payload, but just its ID (or array of IDs, in case it's a "multiple files" field).

  • We released a new version of all of our clients (JS/Ruby/GatsbyJS/Middleman) to reflect this change, while mantaining the old methods signature.

Despite the big change, we tried not to break sites using our old clients. If no X-Api-Version: 2 header is passed, we assume Version 1 of our API is requested, so the GET /items and GET /items/:id endpoints will keep on returning data in the old format.

Important: Content Management API v1 will be sunsetted on September 1st, and so please upgrade your projects dependencies before this date!

Start using DatoCMS today
According to Gartner 89% of companies plan to compete primarily on the basis of customer experience this year. Don't get caught unprepared.
  • No credit card
  • Easy setup
Subscribe to our newsletter! 📥
One update per month. All the latest news and sneak peeks directly in your inbox.
support@datocms.com ©2024 Dato srl, all rights reserved P.IVA 06969620480