1. Retrieve Multiple Datasource Entries

Retrieve Multiple Datasource Entries

Returns an array of datasource entry objects for the datasource and dimension defined

/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 string

    A preview or public access token configured in a space.

  • datasource

    required The Datasource Object

    Datasource slug

    • undefined
    • undefined
    • undefined
  • dimension

    string

    A dimension that is defined for a datasource (eg. dimension=en)

  • page

    number

    Default: 1. Learn more under Pagination.

  • per_page

    number

    Default: 25. Max: 1000. Learn more under Pagination.

Response Properties

  • datasource_entries

    The Datasource Entry Object[]
    • id

      number

      The numeric ID

    • name

      string

      The complete name provided for the datasource entry

    • value

      string

      Given value in the default dimension

    • dimension_value

      string

      Given value in the requested dimension

Request
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"
Request
// 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)
  })
Request
$client = new \Storyblok\Client('YOUR_STORYBLOK_SPACE_ACCESS_TOKEN');

$client->getDatasourceEntries('/datasource_entries/', [
  "datasource" =>  "product-labels",
  "dimension" =>  "de"
])->getBody();
Request
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')

client.datasource_entries({:params => {
  "datasource" =>  "product-labels",
  "dimension" =>  "de"
}})
Request
HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/datasource_entries/?datasource=product-labels&dimension=de&token=ask9soUkv02QqbZgmZdeDAtt")
  .asString();
Request
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);
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()
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)
Response
{
  "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"
    }
  ]
}