Skip to content

Components

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

Every component the project’s Storybooks show now, at its current version: one per Storybook title, read from the index.json of each Storybook deployed to a site, with a new version whenever a deploy changes it.

Scope: read.

Components

Media typeapplication/json
object
data
required
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
address
required

Its address without @n: in artbucket.site.json, the version current when the build is made

string
versions
required

How many versions it has had

integer
>= -9007199254740991 <= 9007199254740991
Example
{
"data": [
{
"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"
}
}