Retrieve Multiple Stories
This endpoint returns an array of story objects without content
. Stories can be filtered with the parameters below. The response is paged.
https://mapi.storyblok.com/v1/spaces/:space_id/stories/
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
-
:space_id
required numberNumeric ID of a space
Query Parameters
-
page
numberCurrent page of stories
-
contain_component
stringFilters by component in all levels of the content. Allows comma separated value for multiple components
-
text_search
stringFilter by a term using full text search
-
sort_by
stringSort entries by specific attribute and order with
content.YOUR_FIELD:asc
andcontent.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 insidecontent
with 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
booleanFilter by pinned stories if '1'
-
excluding_ids
stringExclude specific stories by providing their IDs as a comma-separated string. Example:
excluding_ids=335015953,335015954
-
by_ids
stringFilter by ids (comma separated)
-
by_uuids
stringRetrieve 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
stringFilter 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
booleanFilter by folders only
-
story_only
booleanFilter by stories only
-
with_parent
numberFilter by parent
id
-
starts_with
stringFilter stories starting with a specific slug
-
in_trash
booleanFilter by items in the trash folder
-
search
stringFilter by search term
-
filter_query
string or objectFilter by specific attribute(s) of your content type. See Content Delivery API Documentation.
-
is
stringMatches a value type (
empty
,not_empty
,empty_array
,not_empty_array
,true
,false
,null
,not_null
) -
in
stringMatches all with the exact specified value
-
not_in
stringMatches all without the exact specified value
-
like
stringMatches all with the specified value (wildcard allowed)
-
not_like
stringMatches all without the specified value (wildcard allowed)
-
any_in_array
stringMatches if any of the specified values is contained in the field value (array)
-
all_in_array
stringMatches if all specified values are contained in the field value (array)
-
gt_date
stringGreater than date (Format:
YYYY-mm-dd HH:MM
) -
lt_date
stringLower than date (Format: (Format:
YYYY-mm-dd HH:MM
)) -
gt_int
stringGreater than integer value
-
lt_int
stringLower than integer value
-
gt_float
stringGreater than float value
-
lt_float
stringLower than float value
-
-
in_release
numberFilter items by the release id
-
is_published
booleantrue
for entries that are currently published;false
for those that are currently not published or unpublished -
by_slugs
stringRetrieve stories by comma-separated
full_slug
. It is possible to specify wildcards by using*
. Examples:by_slugs=posts/my-third-post,posts/my-second-post
by_slugs=posts/*
-
mine
booleanFilters all the stories assigned to the current user whose token is being used
-
excluding_slugs
stringExclude 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-post
excluding_slugs=posts*
-
in_workflow_stages
numberRetrieve 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
stringRetrieve 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
stringFilter by exact slug. Make sure to use the full slug.
-
with_summary
numberIf added, returns content_summary object with relevant information. Default: 1
-
scheduled_at_gt
stringFilter stories that are scheduled after the provided date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
scheduled_at_lt
stringFilter stories that are scheduled before the provided date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
favourite
booleanFilter by your favourites.
-
reference_search
stringFilter by references. Can be used for texts (partial search supported) and other references like assets. Example - stories with specific asset. For stories with a specific asset, complete URL of an asset is recommended for specific results. Names are also valid but will include the results found with content search as well.
Response Properties
-
stories
The Story ObjectAn array of story objects
-
id
numberNumeric id of the story
-
name
stringThe complete name provided for the story
-
parent_id
numberID of the parent folder
-
group_id
stringGroup ID (UUID string), shared between stories defined as alternates
-
alternates
object[]An array containing objects that provide basic data of the stories defined as alternates of the current story
-
id
numberThe numeric ID
-
name
stringThe complete name provided for the story
-
slug
stringThe slug specific for the story
-
published
booleantrue
if a story has been published at least once (even if it is currently in draft) -
full_slug
stringThe full slug of the story, combining the parent folder(s) and the designated story slug
-
is_folder
booleantrue
if the instance constitutes a folder
-
-
created_at
stringCreation date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
deleted_at
stringDeleted date (Format: YYYY-mm-dd HH:MM)
-
sort_by_date
stringDate defined in the story's entry configuration (Format:
YYYY-mm-dd
) -
tag_list
string[]Array of tag names
-
updated_at
stringLatest update date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
published_at
stringLatest publishing date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
uuid
stringGenerated UUID string
-
is_folder
booleantrue
if the instance constitutes a folder -
content
objectAn object containing the field data associated with the specific story type's specific content structure. Also includes a
component
property with the story type's technical name. -
published
booleantrue
if a story has been published at least once (even if it is currently in draft) -
slug
stringThe slug specific for the story
-
path
stringValue of the real path defined in the story's entry configuration (usually, this value is only required for Storyblok's Visual Editor)
-
full_slug
stringThe full slug of the story, combining the parent folder(s) and the designated story slug
-
default_root
stringComponent name which will be used as default content type for this folders entries
-
disable_fe_editor
booleanIs side by side editor disabled for all entries in folder
-
parent
objectEssential parent information as object (resolved from
parent_id
) -
is_startpage
booleantrue
if the story is defined as root for the folder -
unpublished_changes
booleanStory has unpublished changes; saved but not published
-
meta_data
objectObject to store non-editable data that is exclusively maintained with the Management API
-
imported_at
stringLatest import date (Format: YYYY-mm-dd HH:MM)
-
preview_token
objectPreview token
-
token
stringThe token passed to the editor as preview parameter to allow edit mode verification
-
timestamp
stringTimestamp passed to the editor as preview parameter to allow edit mode verification
-
-
pinned
booleanTo pin the story in the toolbar
-
breadcrumbs
object[]Array of resolved subset of link objects (one per path segment / parent)
-
id
numberStory ID
-
name
stringThe complete name provided for the story
-
parent_id
numberID of the parent folder
-
disable_fe_editor
booleanIs side by side editor disabled for all entries in folder
-
path
stringValue of the real path defined in the story's entry configuration (usually, this value is only required for Storyblok's Visual Editor)
-
slug
stringThe slug specific for the story
-
translated_slugs
object[]Array of translated slug objects (if the app Translatable Slugs is installed)
-
-
first_published_at
stringFirst publishing date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
last_author
objectLast author
-
id
numberLast author user object numeric id
-
userid
stringLast author userid/username
-
friendly_name
stringFriendly name of last author
-
-
last_author_id
numberId of the last Author
-
translated_slugs
object[]Array of translated slug objects (if the app Translatable Slugs is installed)
-
story_id
numberID of the story
-
lang
stringLanguage code of the current language (can be requested with the
language
API parameter) -
slug
stringThe slug specific for the story
-
name
stringThe complete name provided for the story
-
published
booleantrue
if a story has been published at least once (even if it is currently in draft)
-
-
localized_paths
object[]An array of translated path objects
-
path
stringValue of the real path defined in the story's entry configuration (usually, this value is only required for Storyblok's Visual Editor)
-
name
stringThe complete name provided for the story
-
lang
stringLanguage code of the current language (can be requested with the
language
API parameter) -
published
booleantrue
if a story has been published at least once (even if it is currently in draft)
-
-
position
numberNumeric representation of the story's position in the folder
-
release_id
numberID of the current release (can be requested with the
from_release
API parameter) -
scheduled_dates
stringScheduled publishing date (Format: YYYY-mm-dd HH:MM)
-
favourite_for_user_ids
number[]Array of user IDs who have added the story in their favorites
-
Example Request
curl "https://mapi.storyblok.com/v1/spaces/606/stories/" \
-X GET \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json"
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.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();
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.false('/spaces/606/stories/')
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 Foundation
let headers = [
"Content-Type": "application/json",
"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.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()
import requests
url = "https://mapi.storyblok.com/v1/spaces/606/stories/"
querystring = {}
payload = ""
headers = {
'Content-Type': "application/json",
'Authorization': "YOUR_OAUTH_TOKEN"
}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)
Example Request with search_term
curl "https://mapi.storyblok.com/v1/spaces/606/stories/?text_search=My+fulltext+search" \
-X GET \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json"
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.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();
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.false('/spaces/606/stories/', {:params => {
"text_search" => "My fulltext search"
}})
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 Foundation
let headers = [
"Content-Type": "application/json",
"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.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()
import requests
url = "https://mapi.storyblok.com/v1/spaces/606/stories/"
querystring = {"text_search":"My fulltext search"}
payload = ""
headers = {
'Content-Type': "application/json",
'Authorization': "YOUR_OAUTH_TOKEN"
}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)
Example Request with by_uuids
curl "https://mapi.storyblok.com/v1/spaces/606/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d" \
-X GET \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json"
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.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();
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.false('/spaces/606/stories/', {:params => {
"by_uuids" => "fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-e9fa-42b5-b952-c7d96ab6099d"
}})
HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/606/stories/?by_uuids=fb3afwa58-277f-4690-81fb-e0a080bd39ac,81fb81fb-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,81fb81fb-e9fa-42b5-b952-c7d96ab6099d");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");
IRestResponse response = client.Execute(request);
import Foundation
let headers = [
"Content-Type": "application/json",
"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,81fb81fb-e9fa-42b5-b952-c7d96ab6099d")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.method = "GET"
request.allHTTPHeaderFields = headers
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()
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 = {
'Content-Type': "application/json",
'Authorization': "YOUR_OAUTH_TOKEN"
}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)