Product Updates

DatoCMS changelog for new features and general improvements
API Clients

Released v0.5.4 of JS client

June 27th, 2018

We just rolled version 0.5.4 of our JS client!

The big change is that the methods the client makes available are generated at runtime based on the JSON Schema of our CMA. This means any new API endpoint — or changes to existing ones — will instantly be reflected to the client, without the need to upgrade to the latest client version.

We also added a new deserializeResponse option to every call, that you can use if you want to retrieve the exact payload the DatoCMS returns:

import { SiteClient } from 'datocms-client';
const client = new SiteClient("YOUR-API-KEY")
// `deserializeResponse` is true by default:
const accessToken = client.accessTokens.create({
name: "New token",
role: "34"
})
// {
// id: "312",
// hardcodedType: null,
// name: "New token",
// token: "XXXX",
// role: "34"
// }
// if `deserializeResponse` is false, this will be the result
const accessToken = client.accessTokens.create(
{
name: "New token",
role: "34"
},
{
deserializeResponse: false
}
)
// {
// data: {
// type: "access_token",
// id: "312",
// attributes: {
// name: "New token",
// token: "XXXX",
// hardcoded_type: nil
// },
// relationships: {
// role: {
// data: {
// type: "role",
// id: "34"
// }
// }
// }
// }
// }

In our doc pages we also added some examples for the super-handy allPages option which was already present since v0.3.29:

// if you want to fetch all the pages with just one call:
client.items.all({ "filter[type]" => "44" }, { allPages: true })
New

Added ability to destroy your account

June 17th, 2018

You can now decide to completely delete your DatoCMS account from the "My account" section of the dashboard.

Docs, Guides and Demos

Custom assets domain documentation page

June 17th, 2018

(Updated Dec 2024)

By default, DatoCMS uses the shared domain www.datocms-assets.com to serve your project's asset files (such as images and PDFs). On Enterprise plans, you can choose to use your own cloud storage and domain name instead.

To get started, please follow the instructions in one of these plugins, and then reach out to support@datocms.com to complete the setup:

DatoCMS External Asset Storage & Custom Domain Options

On an Enterprise plan, you can host your DatoCMS assets (files) on third-party cloud providers with your own domain name. The following providers are supported:

Content Delivery API

Query batching

June 12th, 2018

We just enabled query batching support to our GraphQL Content Delivery API.

This means you can combine multiple GraphQL operations into a single HTTP request, reducing HTTP overheads. If you use Apollo Client, you can enable batch queries with the apollo-link-batch-http package:

import { ApolloClient } from 'apollo-client';
import { setContext } from 'apollo-link-context';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { BatchHttpLink } from 'apollo-link-batch-http';
const httpLink = new BatchHttpLink({
uri: 'https://graphql.datocms.com/',
});
const authLink = setContext((_, { headers }) => {
return {
headers: {
...headers,
'Authorization': `Bearer ${process.env.DATO_API_TOKEN}`,
}
}
});
const client = new ApolloClient({
link: authLink.concat(httpLink),
cache: new InMemoryCache(),
});
export default client;
API Clients Content Management API

Released v0.6 of Ruby client

June 10th, 2018

We just rolled version 0.6 of our Ruby client!

The big change is that the methods the client makes available are generated at runtime based on the JSON Schema of our CMA. This means any new API endpoint — or changes to existing ones — will instantly be reflected to the client, without the need to upgrade to the latest client version.

We also added a new deserialize_response option to every call, that you can use if you want to retrieve the exact payload the DatoCMS returns:

require "dato"
client = Dato::Site::Client.new("YOUR-API-KEY")
# `deserialize_response` is true by default:
access_token = client.access_tokens.create(name: "New token", role: "34")
# {
# "id" => "312",
# "hardcoded_type" => nil,
# "name" => "New token",
# "token" => "XXXX",
# "role" => "34"
# }
# if `deserialize_response` is false, this will be the result
access_token = client.access_tokens.create(
{ name: "New token", role: "34" },
deserialize_response: false
)
# {
# "data": {
# "type": "access_token",
# "id": "312",
# "attributes": {
# "name": "New token",
# "token": "XXXX",
# "hardcoded_type": nil
# },
# "relationships": {
# "role": {
# "data": {
# "type": "role",
# "id": "34"
# }
# }
# }
# }
# }

In our doc pages we also added some examples for the super-handy all_pages option which was already present since v0.3.29:

# if you want to fetch all the pages with just one call:
client.items.all({ "filter[type]" => "44" }, all_pages: true)
New

Better project transfer flow

June 3rd, 2018

We just published some changes to the way DatoCMS manages project transfers between two accounts.

When you transfer a site, the destination account will receive a request that will have to be manually accepted or declined. If the site is on a paying plan, the destination account will have to specify which billing profile will be used from now on to generate invoices.

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