Managing Datasource Entries

Getting a list of datasource entries

Endpoint

GET /v1/spaces/:space_id/datasource_entries

Parameters

Name Description
page Current page
per_page Number of items per page
datasource_id required Id of datasource

Request

Query Parameters

datasource_id=106
page=0

cURL

curl "https://api.storyblok.com/v1/spaces/592/datasource_entries?datasource_id=106&page=0" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo4NDAsInRpbWVzdGFtcCI6MTUzMjY4MDQ4Mn0.XQcp98_c1gMqgpSRIcTbMet7ErDZlWmLpzcr0ZYDUsE" \

Response

Body

{
  "datasource_entries": [
    {
      "id": 76,
      "name": "key",
      "value": "Value",
      "dimension_value": ""
    }
  ]
}

Getting a datasource entry

Endpoint

GET /v1/spaces/:space_id/datasource_entries/:id

Request

cURL

curl "https://api.storyblok.com/v1/spaces/591/datasource_entries/75" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo4MzksInRpbWVzdGFtcCI6MTUzMjY4MDQ4Mn0.Lgg-w8Dvmv7ixn5I7D0JJw-PigxIjz7E3_lHvfeW28g" \

Response

Body

{
  "datasource_entry": {
    "id": 75,
    "name": "key",
    "value": "Value",
    "dimension_value": null
  }
}

Creating a datasource entry

Endpoint

POST /v1/spaces/:space_id/datasource_entries

Parameters

Name Description
datasource_entry[name] required Name
datasource_entry[value] required Entry

Request

cURL

curl "https://api.storyblok.com/v1/spaces/593/datasource_entries" -d '{"datasource_entry":{"name":"key","value":"value"}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo4NDEsInRpbWVzdGFtcCI6MTUzMjY4MDQ4Mn0.yOspYVguXSV8J2bckq3mKsRquI5l1qCeKsHS5wksaIw" \

Response

Body

{
  "datasource_entry": {
    "id": 77,
    "name": "key",
    "value": "value",
    "dimension_value": null
  }
}

Updating a datasource entry

Endpoint

PUT /v1/spaces/:space_id/datasource_entries/:id

Parameters

Name Description
datasource_entry[name] required Name of DatasourceEntry
datasource_entry[value] required Entry

Request

cURL

curl "https://api.storyblok.com/v1/spaces/594/datasource_entries/78" -d '{"datasource_entry":{"name":"key","value":"value"}}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo4NDIsInRpbWVzdGFtcCI6MTUzMjY4MDQ4Mn0.hpQDgUHY8F7bO64lBt6hRSLqBAkNv4khBr6ayia-pQ4" \

Response

Body

Deleting a datasource entry

Endpoint

DELETE /v1/spaces/:space_id/datasource_entries/:id

Request

cURL

curl "https://api.storyblok.com/v1/spaces/595/datasource_entries/79" -d '' -X DELETE \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo4NDMsInRpbWVzdGFtcCI6MTUzMjY4MDQ4Mn0.us7jHTZx38wvQyfB2c74MrwXRToHwXVTbLNIlAsTwME" \

Response

Body

Documentation