Retrieve Multiple Stories
https://mapi.storyblok.com/v1/spaces/:space_id/storiesThis endpoint returns an array of story objects without content. Stories can be filtered with the parameters below. The response is paged.
With the query parameter of with_summary=1, it allows you to get the root-level or same-level attributes from multiple stories. If there is no flag set, content_summary objects on stories will be empty. It can be used to access some field-types inside the content that are served with the multiple stories.
Path parameters
Section titled “Path parameters”- :space_id required number
Numeric ID of a space
Query parameters
Section titled “Query parameters”- page number
Current page of stories
- contain_component string
Filters by component in all levels of the content. Allows comma separated value for multiple components
- text_search string
Filter by a term using full text search
- sort_by string
Sort entries by specific attribute and order with
content.YOUR_FIELD:ascandcontent.YOUR_FIELD:desc. To sort integers append:int. To sort floats append:float.Possible values are all root attributes of the entry (position and parent_position are special invisible attributes) and all fields of your content type inside
contentwith a dot as seperator.Example:
position:asc,parent_position:asc,content.your_custom_field:asc,content.your_number_field:asc:int,created_at:desc. - pinned boolean
Filter by pinned stories if
1 - excluding_ids string
Exclude specific stories by providing their IDs as a comma-separated string. Example:
excluding_ids=335015953,335015954 - by_ids string
Filter by ids (comma separated)
- by_uuids string
Retrieve specific stories by providing their UUIDs as a comma-separated string. Example:
by_uuids=a78b2116-c26d-4d23-9cbe-fec477847b0e,9683820e-fc17-429e-ba23-eb41f26c0776 - with_tag string
Filter by specific tag(s). Multiple tags can be provided as a comma-separated string (treated like an OR operator). Examples:
with_tag=featured
with_tag=featured,editors_choice - folder_only boolean
Filter by folders only
- story_only boolean
Filter by stories only
- with_parent number
Filter by parent
id - starts_with string
Filter stories starting with a specific slug
- in_trash boolean
Filter by items in the trash folder
- search string
Filter by search term
- filter_query string
Filter by specific attribute(s) of your content type. See Content Delivery API Documentation.
- in_release number
Filter items by the release id
- is_published boolean
truefor entries that are currently published;falsefor those that are currently not published or unpublished - by_slugs string
Retrieve stories by comma-separated
full_slug. It is possible to specify wildcards by using*. Examples:by_slugs=posts/my-third-post,posts/my-second-postby_slugs=posts/* - mine boolean
Filters all the stories assigned to the current user whose token is being used
- excluding_slugs string
Exclude stories by specifying comma-separated values of
full_slug. It is possible to specify wildcards by using*. Examples:excluding_slugs=posts/my-third-post,posts/my-second-postexcluding_slugs=posts* - in_workflow_stages number
Retrieve stories that are in a particular workflow stage by providing a comma-separated list of workflow stage IDs. Workflow stage IDs can be retrieved via the Management API. Example:
in_workflow_stages=325604,325605 - by_uuids_ordered string
Retrieve specific stories by providing their UUIDs as a comma-separated string. The order of the stories in the response matches the order in which the UUIDs are listed. Example:
by_uuids_ordered=a78b2116-c26d-4d23-9cbe-fec477847b0e,9683820e-fc17-429e-ba23-eb41f26c0776 - with_slug string
Filter by exact slug. Make sure to use the full slug.
- with_summary number
If added, returns content_summary object with relevant information. Default: 0
- scheduled_at_gt string
Filter stories that are scheduled after the provided date (Format:
yyyy-MM-dd'T'HH:mm:ssZ) - scheduled_at_lt string
Filter stories that are scheduled before the provided date (Format:
yyyy-MM-dd'T'HH:mm:ssZ) - favourite boolean
Filter by your favourites.
- reference_search string
Filter by references. Can be used for text (partial search supported) and other references, like assets and stories. Examples: Stories with a specific asset: For stories with a specific asset, the complete URL of the asset is recommended for specific results. Names are also valid, but the results found with the content search will also be included.
Stories referencing other stories: To search for stories that reference specific stories, pass the complete
uuidof the referenced story.
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/606/stories/" \ -H "Authorization: YOUR_OAUTH_TOKEN"// Using the Universal JavaScript Client:// https://github.com/storyblok/storyblok-js-clientStoryblok.get('spaces/606/stories/', {}) .then(response => { console.log(response) }).catch(error => { console.log(error) })$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
$client->get('spaces/606/stories/')->getBody();HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/606/stories/") .header("Authorization", "YOUR_OAUTH_TOKEN") .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/606/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/606/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/606/stories/')import Foundation
let headers = [ "Authorization": "YOUR_OAUTH_TOKEN"]
let request = NSMutableURLRequest(url: NSURL(string: "https://mapi.storyblok.com/v1/spaces/606/stories/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.method = "GET"request.allHTTPHeaderFields = headers
let session = URLSession.sharedlet 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()Example Request with search_term
curl "https://mapi.storyblok.com/v1/spaces/606/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/606/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/606/stories/', [ "text_search" => "My fulltext search"])->getBody();HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/606/stories/?text_search=My+fulltext+search") .header("Authorization", "YOUR_OAUTH_TOKEN") .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/606/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/606/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/606/stories/', {:params => { "text_search" => "My fulltext search"}})import Foundation
let headers = [ "Authorization": "YOUR_OAUTH_TOKEN"]
let request = NSMutableURLRequest(url: NSURL(string: "https://mapi.storyblok.com/v1/spaces/606/stories/?text_search=My+fulltext+search")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.method = "GET"request.allHTTPHeaderFields = headers
let session = URLSession.sharedlet 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()Example Request with by_uuids
curl "https://mapi.storyblok.com/v1/spaces/606/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/606/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/606/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/606/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/606/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/606/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/606/stories/', {:params => { "by_uuids" => "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"}})import Foundation
let headers = [ "Authorization": "YOUR_OAUTH_TOKEN"]
let request = NSMutableURLRequest(url: NSURL(string: "https://mapi.storyblok.com/v1/spaces/606/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac%2C81fb81fb-e9fa-42b5-b952-c7d96ab6099d")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.method = "GET"request.allHTTPHeaderFields = headers
let session = URLSession.sharedlet 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()Get in touch with the Storyblok community