Skip to content

A component's versions

GET
/api/v1/components/{ref}
curl --request GET \
--url http://localhost:3000/api/v1/components/example \
--header 'Authorization: Bearer <token>'

Every version of a component at its mount, newest first, each with its story’s preview while a kept build holds it and the sites whose artbucket.site.json names it in components.

Scope: read.

ref
required
string

An id, or an address

Component

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
address
required
string
name
required
string
title
required
string
site
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
slug
required
string
name
required
string
path
required
string
versions
required

Newest first

Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
slug
required

Storybook’s id for it, e.g. ui-button

string
name
required
string
title
required

Its Storybook title, e.g. UI/Button

string
version
required
integer
>= -9007199254740991 <= 9007199254740991
story
required

Its first story’s id

string
stories
required

Its stories’ names, in order

Array<string>
files
required

Its stories’ and source files, as Storybook’s index.json names them

Array<string>
path
required

Where its Storybook is mounted on the site

string
createdAt
required
string
createdBy
required

Who deployed the build it came in

string
status
required

Current: in the live build; replaced: a newer version is; archived: gone from it

string
Allowed values: draft in_review current replaced archived
site
required
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
slug
required
string
name
required
string
preview
required

Its story alone (Storybook’s iframe.html), on the site’s own address; null once no kept build holds it

string | null
storybook
required

Its story in Storybook’s own UI

string | null
usedBy
required

Sites built with this version that you reach

Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
name
required
string
address
required
string
project
required
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
slug
required
string
name
required
string
Example
{
"data": {
"versions": [
{
"status": "draft"
}
]
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}