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://app.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","entryvalue":"en","datasourceid":123,"createdat":"2019-05-06T15:23:09.396Z","updatedat":"2019-05-06T15:23:09.396Z"},{"name":"New Dimension","entryvalue":"newdimension"}],"dimensions_attributes":[{"id":242,"name":"English","entryvalue":"en","datasourceid":123,"createdat":"2019-05-06T15:23:09.396Z","updatedat":"2019-05-06T15:23:09.396Z"},{"name":"New Dimension","entryvalue":"new_dimension"}]}}' --compressed