A component's versions
const url = 'http://localhost:3000/api/v1/components/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”An id, or an address
Responses
Section titled “Responses”Component
object
object
object
Newest first
object
Storybook’s id for it, e.g. ui-button
Its Storybook title, e.g. UI/Button
Its first story’s id
Its stories’ names, in order
Its stories’ and source files, as Storybook’s index.json names them
Where its Storybook is mounted on the site
Who deployed the build it came in
Current: in the live build; replaced: a newer version is; archived: gone from it
object
Its story alone (Storybook’s iframe.html), on the site’s own address; null once no kept build holds it
Its story in Storybook’s own UI
Sites built with this version that you reach
object
object
Example
{ "data": { "versions": [ { "status": "draft" } ] }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}