Retrieve Multiple Stories
https://mapi.storyblok.com/v1/spaces/:space_id/storiesA paged endpoint that returns an array of story objects.
Path parameters
Section titled “Path parameters”- :space_id required number
Numeric ID of a space.
The following is a subset of the supported parameters.
Query parameters
Section titled “Query parameters”- page number
Indicate the current response’s page.
- contain_component string
Filter by nestable blocks contained in the
content. Use comma-separated values to retrieve multiple blocks. - text_search string
Search for any string in stories. The response contains all stories where the string appears anywhere in the name, slug/full slug, or content object (including UIDs, field values, asset file names, and rich text nodes and attributes, such as “bold”).
- sort_by string
Sort retrieved stories by story object properties or field defined in the content type. For example,
created_at:desc,content.FIELD_NAME:asc, etc. To sort numbers append:int. To sort floats append:float. For example,content.FIELD_NAME:asc:float. - excluding_ids string
Exclude specific stories by their IDs. Use comma-separated values to exclude multiple stories.
- by_ids string
Retrieve specific stories by their IDs. Use comma-separated values to retrieve multiple stories.
- by_uuids string
Retrieve specific stories by their UUIDs. Use comma-separated values to retrieve multiple stories.
- by_uuids_ordered string
Retrieve stories by providing comma-separated UUIDs. The order of the stories in the response matches the order of the UUIDs.
- with_tag string
Retrieve stories with an assigned tag. Use comma-separated values to filter by multiple tags.
- folder_only boolean
Retrieve only folder-type stories.
- story_only boolean
Retrieve only non-folder type stories.
- with_parent number
Filter by the parent ID.
- starts_with string
Filter stories that start with a specific slug.
- in_trash boolean
Retrieve only deleted stories.
- search string
Search stories by name, slug, or full slug.
- filter_query string
Filter by appending supported operations to fields defined in the content type. Use the syntax
stories/?filter_query[field][operation]=string,string2. Learn more about Filter Queries. - in_release number
Retrieve stories grouped in a release. Use the release ID.
- is_published boolean
Retrieve only published stories (
true), or only draft/unpublished stories (false). - with_slug string
Retrieve stories with a specific
full slug. - by_slugs string
Retrieve stories by
full_slug. Use comma-separated values to filter by multiple slugs. The parameter supports wildcard (for example,by_slugs=posts/*). - excluding_slugs string
Exclude stories with specific
full_slug. Use comma-separated values to exclude multiple slugs. The parameter supports wildcard (for example,excluding_slugs=posts*). - mine boolean
Retrieve stories assigned to the current user’s token.
- in_workflow_stages number
Retrieve stories in a specific workflow stage. Use the workflow stage ID. Use comma-separated values to filter by multiple workflow stage IDs.
- with_summary boolean
Include a
content_summaryobject in the response. Thecontent_summaryobject lists several field types inside the story’s content. - scheduled_at_gt string
Filter stories scheduled after the provided date and time (format: ISO UTC timestamp).
- scheduled_at_lt string
Filter stories scheduled before the provided date and time (format: ISO UTC timestamp).
- favourite boolean
Retrieve only stories marked as favorites in the Content section of the UI.
- reference_search string
Search referenced stories and assets by story UUID, story or asset name, or asset URL.
Response properties
Section titled “Response properties”- stories The Story Object
An array of story objects.
Examples
Section titled “Examples”Example Request
curl "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/" \ -H "Authorization: YOUR_OAUTH_TOKEN"// Using the Universal JavaScript Client:// https://github.com/storyblok/storyblok-js-clientStoryblok.get('spaces/288868932106293/stories/', {}) .then(response => { console.log(response) }).catch(error => { console.log(error) })$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
$client->get('spaces/288868932106293/stories/')->getBody();HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/") .header("Authorization", "YOUR_OAUTH_TOKEN") .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/");var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");IRestResponse response = client.Execute(request);import requests
url = "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/"
querystring = {}
payload = ""headers = { 'Authorization': "YOUR_OAUTH_TOKEN"}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.get('spaces/288868932106293/stories/')var request = URLRequest(url: URL(string: "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/")!)request.setValue("YOUR_OAUTH_TOKEN", forHTTPHeaderField: "Authorization")request.httpMethod = "GET"let (data, _) = try await URLSession.shared.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(ContentNegotiation) { json() } install(DefaultRequest) { url { takeFrom("https://mapi.storyblok.com/v1/") headers.append("Authorization", "YOUR_OAUTH_TOKEN") } }}
val response = client.get("spaces/288868932106293/stories/")
println(response.body<JsonElement>())Example Request with text_search
curl "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/\?text_search=My+fulltext+search" \ -H "Authorization: YOUR_OAUTH_TOKEN"// Using the Universal JavaScript Client:// https://github.com/storyblok/storyblok-js-clientStoryblok.get('spaces/288868932106293/stories/', { "text_search": "My fulltext search"}) .then(response => { console.log(response) }).catch(error => { console.log(error) })$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
$client->get('spaces/288868932106293/stories/', [ "text_search" => "My fulltext search"])->getBody();HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?text_search=My+fulltext+search") .header("Authorization", "YOUR_OAUTH_TOKEN") .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?text_search=My+fulltext+search");var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");IRestResponse response = client.Execute(request);import requests
url = "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/"
querystring = {"text_search":"My fulltext search"}
payload = ""headers = { 'Authorization': "YOUR_OAUTH_TOKEN"}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.get('spaces/288868932106293/stories/', {:params => { "text_search" => "My fulltext search"}})var request = URLRequest(url: URL(string: "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?text_search=My+fulltext+search")!)request.setValue("YOUR_OAUTH_TOKEN", forHTTPHeaderField: "Authorization")request.httpMethod = "GET"let (data, _) = try await URLSession.shared.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(ContentNegotiation) { json() } install(DefaultRequest) { url { takeFrom("https://mapi.storyblok.com/v1/") headers.append("Authorization", "YOUR_OAUTH_TOKEN") } }}
val response = client.get("spaces/288868932106293/stories/") { url { parameters.append("text_search", "My fulltext search") }}
println(response.body<JsonElement>())Example Request with by_uuids
curl "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/\?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac%2C81fb81fb-e9fa-42b5-b952-c7d96ab6099d" \ -H "Authorization: YOUR_OAUTH_TOKEN"// Using the Universal JavaScript Client:// https://github.com/storyblok/storyblok-js-clientStoryblok.get('spaces/288868932106293/stories/', { "by_uuids": "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"}) .then(response => { console.log(response) }).catch(error => { console.log(error) })$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
$client->get('spaces/288868932106293/stories/', [ "by_uuids" => "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"])->getBody();HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac%2C81fb81fb-e9fa-42b5-b952-c7d96ab6099d") .header("Authorization", "YOUR_OAUTH_TOKEN") .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac%2C81fb81fb-e9fa-42b5-b952-c7d96ab6099d");var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");IRestResponse response = client.Execute(request);import requests
url = "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/"
querystring = {"by_uuids":"fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"}
payload = ""headers = { 'Authorization': "YOUR_OAUTH_TOKEN"}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.get('spaces/288868932106293/stories/', {:params => { "by_uuids" => "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"}})var request = URLRequest(url: URL(string: "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac%2C81fb81fb-e9fa-42b5-b952-c7d96ab6099d")!)request.setValue("YOUR_OAUTH_TOKEN", forHTTPHeaderField: "Authorization")request.httpMethod = "GET"let (data, _) = try await URLSession.shared.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(ContentNegotiation) { json() } install(DefaultRequest) { url { takeFrom("https://mapi.storyblok.com/v1/") headers.append("Authorization", "YOUR_OAUTH_TOKEN") } }}
val response = client.get("spaces/288868932106293/stories/") { url { parameters.append("by_uuids", "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d") }}
println(response.body<JsonElement>())Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy. Terms of Service apply.
Get in touch with the Storyblok community