Retrieve Multiple Data Sources
Retrieve all data sources from your Storyblok space with pagination support.
https://api.storyblok.com/v2/cdn/datasourcesQuery parameters
Section titled “Query parameters”versionstringFilter by the story’s publication status.
cvintegerCached version Unix timestamp. Learn more in the Caching concept.
searchstringSearch string.
by_idsstringRetrieve items by
id. Supports a comma-separated string.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”datasourcesarray<Datasource>An array of data source objects.
Show child properties
idintegerData source ID.
namestringData source name.
slugstringData source
slug.dimensionsarray<Dimension>An array listing the dimensions defined for the data source.
Show child properties
idintegerDimension ID.
namestringDimension name.
entry_valuestringDimension value.
datasource_idintegerThe
idof the data source that contains this dimension.created_atstringCreation timestamp. Supports ISO 8601.
updated_atstringLatest update timestamp. Supports ISO 8601.
created_atstringCreation timestamp. Supports ISO 8601.
updated_atstringLatest update timestamp. Supports ISO 8601.
cvinteger | nullCached version Unix timestamp. Learn more in the Caching concept.
Examples
Section titled “Examples”curl "https://api.storyblok.com/v2/cdn/datasources\?token=ask9soUkv02QqbZgmZdeDAtt"// storyblok-js-client@>=7, node@>=18import Storyblok from "storyblok-js-client";
const storyblok = new Storyblok({ accessToken: "krcV6QGxWORpYLUWt12xKQtt",});
try { const response = await storyblok.get('cdn/datasources', {}) console.log({ response })} catch (error) { console.log(error)}$client = new \Storyblok\Client('YOUR_STORYBLOK_SPACE_ACCESS_TOKEN');
$client->get('datasources')->getBody();HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/datasources?token=ask9soUkv02QqbZgmZdeDAtt") .asString();var client = new RestClient("https://api.storyblok.com/v2/cdn/datasources?token=ask9soUkv02QqbZgmZdeDAtt");var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);import requests
url = "https://api.storyblok.com/v2/cdn/datasources"
querystring = {"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.get('datasources')let storyblok = URLSession(storyblok: .cdn(accessToken: "ask9soUkv02QqbZgmZdeDAtt"))let request = URLRequest(storyblok: storyblok, path: "datasources")let (data, _) = try await storyblok.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(Storyblok(CDN)) { accessToken = "ask9soUkv02QqbZgmZdeDAtt" }}
val response = client.get("datasources")
println(response.body<JsonElement>()){"datasources": [ { "id": 1123, "name": "Labels", "slug": "labels", "dimensions": [ { "id": 1, "name": "en", "entry_value": "en", "datasource_id": 1123 } ], "created_at": "2025-02-10T08:12:00.000Z", "updated_at": "2025-02-10T08:12:00.000Z" }, { "id": 1124, "name": "Colors", "slug": "colors", "dimensions": [], "created_at": "2025-02-11T09:00:00.000Z", "updated_at": "2025-02-11T09:00:00.000Z" }],"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