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

cURL

curl "https://api.storyblok.com/v1/spaces/889/datasource_entries?datasource_id=64&page=0" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNzQ4LCJ0aW1lc3RhbXAiOjE1MzkzMzM5NzN9.g874W3-0bT2ndKbCVECpu7IxL33VYQ9xBo0LkcYnLJo" \

Response

Body

{
  "datasource_entries": [
    {
      "id": 32,
      "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/888/datasource_entries/31" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNzQ3LCJ0aW1lc3RhbXAiOjE1MzkzMzM5NzN9.IgIPyenlVc94RUBgwZfERq0QBy24s9RGPCUDh6tpNgw" \

Response

Body

{
  "datasource_entry": {
    "id": 31,
    "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/890/datasource_entries" -d '{"datasource_entry":{"name":"key","value":"value"}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNzQ5LCJ0aW1lc3RhbXAiOjE1MzkzMzM5NzN9.OXv1kPoJzWObmiGDRP_RmKnxH_y_nrAimr8YDelnkIQ" \

Response

Body

{
  "datasource_entry": {
    "id": 33,
    "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/891/datasource_entries/34" -d '{"datasource_entry":{"name":"key","value":"value"}}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNzUwLCJ0aW1lc3RhbXAiOjE1MzkzMzM5NzR9.gSBXFWl9nlxFG5gN9PJ9SiWWJ4ypiSH9S6VYGid5pvo" \

Response

Body

Deleting a datasource entry

Endpoint

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

Request

cURL

curl "https://api.storyblok.com/v1/spaces/892/datasource_entries/35" -d '' -X DELETE \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNzUxLCJ0aW1lc3RhbXAiOjE1MzkzMzM5NzR9.OSKB5lJpaE9InCwjXjZAGosMHOfGQTRaBIlF5cSnEOM" \

Response

Body

Documentation