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

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
val id: Long

Story ID.

Link copied to clipboard

True if the story is defined as folder root.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Story name.

Link copied to clipboard

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

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

Link copied to clipboard

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

Link copied to clipboard

Story slug.

Link copied to clipboard
val sortByDate: LocalDate?

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

Link copied to clipboard

Array of tag names.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
val uuid: Uuid

Story UUID.