Retrieve a Single Data Source
Retrieve a single data source by id.
https://api.storyblok.com/v2/cdn/datasources/:idPath parameters
Section titled “Path parameters”:idrequired stringThe data source’s ID. Examples:
labels(Full slug),66252740648132(Numeric ID).
Query parameters
Section titled “Query parameters”versionstringFilter by the story’s publication status.
cvintegerCached version Unix timestamp. Learn more in the Caching concept.
tokenrequired stringA preview or public access token configured in a space.
Response properties
Section titled “Response properties”datasourceDatasourceShow 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/:id\?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/:id', {}) console.log({ response })} catch (error) { console.log(error)}$client = new \Storyblok\Client('YOUR_STORYBLOK_SPACE_ACCESS_TOKEN');
$client->get('datasources/:id')->getBody();HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/datasources/:id?token=ask9soUkv02QqbZgmZdeDAtt") .asString();var client = new RestClient("https://api.storyblok.com/v2/cdn/datasources/:id?token=ask9soUkv02QqbZgmZdeDAtt");var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);import requests
url = "https://api.storyblok.com/v2/cdn/datasources/:id"
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/:id')let storyblok = URLSession(storyblok: .cdn(accessToken: "ask9soUkv02QqbZgmZdeDAtt"))let request = URLRequest(storyblok: storyblok, path: "datasources/:id")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/:id")
println(response.body<JsonElement>()){"datasource": { "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"},"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