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=83
page=0

cURL

curl "https://api.storyblok.com/v1/spaces/659/datasource_entries?datasource_id=83&page=0" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMDgzLCJ0aW1lc3RhbXAiOjE1NDI0Njg3OTR9.vtuACdOI8s0yeJhKHtDKQYPQ6bfGPqRVe1WExLJuNDc" \

Response

Body

{
  "datasource_entries": [
    {
      "id": 52,
      "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/658/datasource_entries/51" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMDgyLCJ0aW1lc3RhbXAiOjE1NDI0Njg3OTR9.i10dr2J-pxwkcIb2vbcj-ZrJFL41ECpiTuFIhk9MOAo" \

Response

Body

{
  "datasource_entry": {
    "id": 51,
    "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
datasource_entry[datasource_id] required Id of datasource

Request

cURL

curl "https://api.storyblok.com/v1/spaces/660/datasource_entries" -d '{"datasource_entry":{"name":"key_7c31c74329","value":"value","datasource_id":84}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMDg0LCJ0aW1lc3RhbXAiOjE1NDI0Njg3OTV9.8gBr8g2m3EGBTQahPzr58ToOb2dixSom3_CKaSctW8c" \

Response

Body

{
  "datasource_entry": {
    "id": 54,
    "name": "key_7c31c74329",
    "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
datasource_entry[datasource_id] required Id of datasource

Request

cURL

curl "https://api.storyblok.com/v1/spaces/661/datasource_entries/55" -d '{"datasource_entry":{"name":"key_fece380ab9","value":"value","datasource_id":85}}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMDg1LCJ0aW1lc3RhbXAiOjE1NDI0Njg3OTV9.xlAm4LrZa3nrzO1UEVulg87GRQd7setdcTV3o-cnhis" \

Response

Body

Deleting a datasource entry

Endpoint

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

Request

cURL

curl "https://api.storyblok.com/v1/spaces/662/datasource_entries/56" -d '' -X DELETE \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMDg2LCJ0aW1lc3RhbXAiOjE1NDI0Njg3OTV9.DdHVBljf5TxCNTID3tyfsN_ej6Ne36ULTsi9KvjEEf8" \

Response

Body

Documentation