Retrieve Multiple Datasource Entries
Returns an array of datasource entry objects for the datasource and dimension defined.
https://api.storyblok.com/v2/cdn/datasource_entries/Query parameters
Section titled “Query parameters”- token required string
A preview or public access token
- datasource string
Datasource
slug - dimension string
A datasource dimension
- page number
Default:
1(See Pagination) - per_page number
Default:
25, Max:1000(See Pagination) - cv number
Cached version Unix timestamp (see Cache Invalidation)
Response properties
Section titled “Response properties”- datasource_entriesAn array of datasource entry objects
- cv number
Cached version Unix timestamp (see Cache Invalidation)
Examples
Section titled “Examples”curl "https://api.storyblok.com/v2/cdn/datasource_entries/?datasource=product-labels&dimension=de&token=ask9soUkv02QqbZgmZdeDAtt"// Using the Universal JavaScript Client:// https://github.com/storyblok/storyblok-js-clientStoryblok.get('cdn/datasource_entries/', { "datasource": "product-labels", "dimension": "de"}) .then(response => { console.log(response) }).catch(error => { console.log(error) })$client = new \Storyblok\Client('YOUR_STORYBLOK_SPACE_ACCESS_TOKEN');
$client->getDatasourceEntries('product-labels', [ "dimension" => "de"])->getBody();HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/datasource_entries/?datasource=product-labels&dimension=de&token=ask9soUkv02QqbZgmZdeDAtt") .asString();var client = new RestClient("https://api.storyblok.com/v2/cdn/datasource_entries/?datasource=product-labels&dimension=de&token=ask9soUkv02QqbZgmZdeDAtt");var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);import requests
url = "https://api.storyblok.com/v2/cdn/datasource_entries/"
querystring = {"datasource":"product-labels","dimension":"de","token":"ask9soUkv02QqbZgmZdeDAtt"}
payload = ""headers = {}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(token: 'YOUR_TOKEN')
client.datasource_entries({:params => { "datasource" => "product-labels", "dimension" => "de"}})import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "https://api.storyblok.com/v2/cdn/datasource_entries/?datasource=product-labels&dimension=de&token=ask9soUkv02QqbZgmZdeDAtt")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.method = "GET"
let session = URLSession.sharedlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) }})
dataTask.resume(){ "datasource_entries":[ { "id":8118432, "name":"Product One", "value":"product-one", "dimension_value":"produkt-eins" }, { "id":8118434, "name":"Product Two", "value":"product-two", "dimension_value":"produkt-zwei" } ], "cv": 1731064694}Get in touch with the Storyblok community