Skip to content

Update a Datasource

Terminal window
https://mapi.storyblok.com/v1/spaces/:space_id/datasources/:datasource_id

Update a datasource using it numeric ID.

  • :space_id required number

    Numeric ID of a space

  • :datasource_id required number

    Numeric id of a datasource

curl "https://mapi.storyblok.com/v1/spaces/656/datasources/91" \
-X PUT \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"datasource\":{\"name\":\"Labels for Website\",\"slug\":\"labels_for_website\"}}"

Request for updating values in a specific dimension.

curl "https://mapi.storyblok.com/v1/spaces/656/datasources/91" \
-X PUT \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"datasource\":{\"dimensions_attributes\":[{\"entry_value\":\"another_slug\",\"name\":\"Another Name\"}],\"name\":\"Labels for Website\",\"slug\":\"label\"}}"