Skip to content

One version of a library

GET
/orgs/{org}/libraries/{namespace}/versions/{number}
curl --request GET \
--url https://api.sloose.com/orgs/org_9f3c/libraries/acme/versions/2 \
--header 'Authorization: Bearer <token>'

What that publish held: its manifest, its source, and the program compiled from it — the text every runtime runs, as the resolved configuration carries the current version’s — so a page can run an older version an import keeps (#559). id names this publish and no other: a library removed and published again starts its numbers at 1, and an id is never reused. libraryId is the library the publish belongs to — the one a pin names (LibraryPin.library) — so a page asking for a kept version runs it only when it is still that library’s: the name can have been removed and published again since the page read its configuration (#1040).

org
required

The org id the session was issued for. A token for one org can never read another.

string
Example
org_9f3c

The org id the session was issued for. A token for one org can never read another.

namespace
required

The library namespace, as it appears in expressions.

string
Example
acme

The library namespace, as it appears in expressions.

number
required

Which publish: 1 for v1.

string
Example
2

Which publish: 1 for v1.

The version.

Media typeapplication/json
object
version
required
object
id
required
string
libraryId
required
string
number
required
number
current
required
boolean
origin
required
string
Allowed values: browser push restore
restoredFrom
required
number | null
publishedAt
required
string
manifest
required
object
key
additional properties
source
required
string
program
required
string
Example
{
"version": {
"origin": "browser"
}
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low, or it was issued for a different org.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such library or version, or it is not visible to this session.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Report a problem with this page