Almost EVERYONE who tried headless systems said they saw benefits. Download the state of CMS now!

Storyblok now on AWS Marketplace: Read more

O’Reilly Report: Decoupled Applications and Composable Web Architectures - Download Now

Empower your teams & get a 582% ROI: See Storyblok's CMS in action

Skip to main content

How can I create a new datasource dimension with the management api?

  • FAQ
  • How can I create a new datasource dimension with the management api?

To create a new datasource dimension for a datasource you need to pass a new object, during a PUT on a datasource of your choice, in the dimension and dimensions_attributes arrays.

curl 'https://mapi.storyblok.com/v1/spaces/YOUR_SPACE_ID/datasources/YOUR_DATASOURCE_ID' -X PUT -H 'authorization: YOUROAUTHTOKEN' -H 'content-type: application/json' -H 'accept: application/json' --data-binary '{"datasource":{"id":123,"name":"test","slug":"test","dimensions":[{"id":242,"name":"English","entry_value":"en","datasourceid":123,"createdate":"2019-05-06T15:23:09.396Z","updatedate":"2019-05-06T15:23:09.396Z"},{"name":"New Dimension","entry_value":"newdimension"}],"dimensions_attributes":[{"id":242,"name":"English","entry_value":"en","datasourceid":123,"createdate":"2019-05-06T15:23:09.396Z","updatedate":"2019-05-06T15:23:09.396Z"},{"name":"New Dimension","entry_value":"new_dimension"}]}}' --compressed