Storyblok Raises $80M Series C - Read News

What’s the True Total Price of Enterprise CMS? Find out here.

Skip to main content

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