Retrieve Multiple Data Source Entries
Retrieve multiple datasource entries with filtering by data source and dimension.
https://api.storyblok.com/v2/cdn/datasource_entriesQuery parameters
Section titled “Query parameters”datasourcestringData source
slug.dimensionstringA datasource dimension.
cvintegerCached version Unix timestamp. Learn more in the Caching concept.
pageintegerPage number in a paginated response.
per_pageintegerThe number of items per page in a paginated response.
tokenrequired stringA preview or public access token configured in a space.
Response properties
Section titled “Response properties”datasource_entriesarray<DatasourceEntry>An array of data source entry objects.
Show child properties
idintegerEntry ID.
namestringEntry name.
valuestringEntry value (default dimension).
dimension_valuestring | nullEntry value (requested dimension).
cvinteger | nullCached version Unix timestamp. Learn more in the Caching concept.
Examples
Section titled “Examples”curl "https://api.storyblok.com/v2/cdn/datasource_entries\?datasource=product-labels\&dimension=de\&token=YOUR_ACCESS_TOKEN"// storyblok-js-client@>=7, node@>=18import Storyblok from "storyblok-js-client";
const storyblok = new Storyblok({ accessToken: "krcV6QGxWORpYLUWt12xKQtt",});
try { const response = await storyblok.get('cdn/datasource_entries', { "datasource": "product-labels", "dimension": "de" }) 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=YOUR_ACCESS_TOKEN") .asString();var client = new RestClient("https://api.storyblok.com/v2/cdn/datasource_entries?datasource=product-labels&dimension=de&token=YOUR_ACCESS_TOKEN");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":"YOUR_ACCESS_TOKEN"}
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"}})let storyblok = URLSession(storyblok: .cdn(accessToken: "YOUR_ACCESS_TOKEN"))var request = URLRequest(storyblok: storyblok, path: "datasource_entries")request.url!.append(queryItems: [ URLQueryItem(name: "datasource", value: "product-labels"), URLQueryItem(name: "dimension", value: "de")])let (data, _) = try await storyblok.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(Storyblok(CDN)) { accessToken = "YOUR_ACCESS_TOKEN" }}
val response = client.get("datasource_entries") { url { parameters.append("datasource", "product-labels") parameters.append("dimension", "de") }}
println(response.body<JsonElement>()){"datasource_entries": [ { "id": 1001, "name": "de", "value": "de", "dimension_value": "en" }, { "id": 1002, "name": "fr", "value": "fr", "dimension_value": null }],"cv": 1541863983}Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community