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/
This endpoint is paginated by default, including a maximum of 1000 datasource entries in the response. Learn more under Pagination.
Query Parameters
-
token
required stringA preview or public access token configured in a space.
-
datasource
required stringDatasource
slug
-
dimension
stringA dimension that is defined for a datasource (eg.
dimension=en
) -
page
numberDefault:
1
. Learn more under Pagination. -
per_page
numberDefault:
25
. Max:1000
. Learn more under Pagination.
Response Properties
-
datasource_entries
The Datasource Entry Object[]An array of datasource entry objects.
-
id
numberThe numeric ID
-
name
stringThe complete name provided for the datasource entry
-
value
stringGiven value in the default dimension
-
dimension_value
stringGiven value in the requested dimension
-
curl "https://api.storyblok.com/v2/cdn/datasource_entries/?datasource=product-labels&dimension=de&token=ask9soUkv02QqbZgmZdeDAtt" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json"
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.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();
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.datasource_entries({:params => {
"datasource" => "product-labels",
"dimension" => "de"
}})
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 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.shared
let 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()
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)
{
"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"
}
]
}