Story

@Serializable
data class Story<T : Component>(val id: Long, val uuid: Uuid, val name: String, val content: T, val slug: String, val fullSlug: String, val createdAt: Instant, val publishedAt: Instant?, val firstPublishedAt: Instant?, val updatedAt: Instant?, val sortByDate: LocalDate?, val position: Int, val tagList: List<String>, val isStartPage: Boolean, val parentId: Long?, val metadata: Map<String, String>?, val groupId: Uuid, val releaseId: Long? = null, val language: String, val path: String?, val alternates: List<Story.Alternate>, val defaultFullSlug: String?, val translatedSlugs: List<Story.TranslatedSlug>?)(source)

Represents a single story retrieved from the Storyblok API.

Constructors

Link copied to clipboard
constructor(id: Long, uuid: Uuid, name: String, content: T, slug: String, fullSlug: String, createdAt: Instant, publishedAt: Instant?, firstPublishedAt: Instant?, updatedAt: Instant?, sortByDate: LocalDate?, position: Int, tagList: List<String>, isStartPage: Boolean, parentId: Long?, metadata: Map<String, String>?, groupId: Uuid, releaseId: Long? = null, language: String, path: String?, alternates: List<Story.Alternate>, defaultFullSlug: String?, translatedSlugs: List<Story.TranslatedSlug>?)

Types

Link copied to clipboard
@Serializable
data class Alternate(val id: Long, val name: String, val slug: String, val published: Boolean, val fullSlug: String, val isFolder: Boolean, val parentId: Long)

Basic data for a story defined as an alternate of the current story.

Link copied to clipboard
@Serializable
data class TranslatedSlug(val path: String, val name: String?, val language: String, val published: Boolean?)

Translated slug information for localized story variants.

Properties

Link copied to clipboard

An array containing objects that provide basic data of the stories defined as alternates of the current story.

Link copied to clipboard
val content: T

An object containing the field data associated with a content type's specific structure. Also includes a component property with the content type's technical name.

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Instant

Creation timestamp (Timestamps follow the ISO 8601 standard in UTC).

Link copied to clipboard
@SerialName(value = "default_full_slug")
val defaultFullSlug: String?

Contains the complete slug of the default language (if the Translatable Slugs app is installed).

Link copied to clipboard
@SerialName(value = "first_published_at")
val firstPublishedAt: Instant?

First publication timestamp (Timestamps follow the ISO 8601 standard in UTC).

Link copied to clipboard
@SerialName(value = "full_slug")
val fullSlug: String

Story full slug, combining the parent folder(s) and the story slug.

Link copied to clipboard
@SerialName(value = "group_id")
val groupId: Uuid

Group ID (UUID string), shared between stories defined as alternates.

Link copied to clipboard
val id: Long

Story ID.

Link copied to clipboard
@SerialName(value = "is_startpage")
val isStartPage: Boolean

True if the story is defined as folder root.

Link copied to clipboard
@SerialName(value = "lang")
val language: String

Language code of the current language version (if requested via the language parameter).

Link copied to clipboard
@SerialName(value = "meta_data")
val metadata: Map<String, String>?

Object to store non-editable data that is exclusively maintained with the Management API.

Link copied to clipboard

Story name.

Link copied to clipboard
@SerialName(value = "parent_id")
val parentId: Long?

Parent folder ID.

Link copied to clipboard
val path: String?

Real path defined in the story's entry configuration (see Visual Editor).

Link copied to clipboard

Numeric representation of the story's position in the folder. Users can change this property in the Content tab.

Link copied to clipboard
@SerialName(value = "published_at")
val publishedAt: Instant?

Latest publication timestamp (Timestamps follow the ISO 8601 standard in UTC).

Link copied to clipboard
@SerialName(value = "release_id")
val releaseId: Long?

Current release ID (if requested via the from_release parameter).

Link copied to clipboard

Story slug.

Link copied to clipboard
@SerialName(value = "sort_by_date")
val sortByDate: LocalDate?

Date defined in the story's entry configuration (Format: YYYY-mm-dd).

Link copied to clipboard
@SerialName(value = "tag_list")
val tagList: List<String>

Array of tag names.

Link copied to clipboard
@SerialName(value = "translated_slugs")
val translatedSlugs: List<Story.TranslatedSlug>?

Array of translated slug objects (if the Translatable Slugs app is installed).

Link copied to clipboard
@SerialName(value = "updated_at")
val updatedAt: Instant?

Latest update timestamp (Timestamps follow the ISO 8601 standard in UTC).

Link copied to clipboard
val uuid: Uuid

Story UUID.