Delete a helper library
const url = 'https://api.sloose.com/orgs/org_9f3c/libraries/acme';const options = { method: 'DELETE', headers: {'If-Match': '"7"', 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 DELETE \ --url https://api.sloose.com/orgs/org_9f3c/libraries/acme \ --header 'Authorization: Bearer <token>' \ --header 'If-Match: "7"'Removes the organisation’s library and every version of it. What that does to imports is decided per HELPER, not per library.
A helper Sloose also ships under the same namespace falls back to Sloose’s implementation: assembleHelpers (packages/core/src/helpers/index.ts) assigns by namespace in list order, globals first, so an organisation library SHADOWS a global of the same name and removing yours uncovers theirs. Expressions calling it keep working and may behave differently — the quieter outcome, and the easier one to miss.
A helper only your library supplies stops working: an expression calling it fails on the next RUN, not merely on the next save, because every template and import uses each library as it currently is — and a version an import kept goes with the library it was kept of.
Both can happen at once, for different helpers in the same library. Publishing it again restores everything — as a new library, from v1. Removing needs no plan feature.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation id the session was issued for. A token for one organisation can never read another.
Example
org_9f3cThe organisation id the session was issued for. A token for one organisation can never read another.
The library namespace, as it appears in expressions.
Example
acmeThe library namespace, as it appears in expressions.
Query Parameters
Section titled “Query Parameters”The token of the POST …/impact { remove: true } answer the person confirmed. Sent, the removal checks what it would break again as it is made, and is refused 409 IMPACT_CHANGED — with the new answer — when that has changed, as a publish’s impactToken does (#1633). A caller that asked nothing sends none and is not checked.
The token of the POST …/impact { remove: true } answer the person confirmed. Sent, the removal checks what it would break again as it is made, and is refused 409 IMPACT_CHANGED — with the new answer — when that has changed, as a publish’s impactToken does (#1633). A caller that asked nothing sends none and is not checked.
Header Parameters
Section titled “Header Parameters”The registryVersion this change was made against, as "7" or 7 — a weak tag (W/"7") is refused, since If-Match uses strong comparison. Sent, the write is refused with 409 (code: REGISTRY_CONFLICT, the current version in the body) when the organisation has moved since, and otherwise answers the version it made: one past the version sent for a write made in one transaction, or the version sent itself for a request that asks for no change (an empty PATCH /config/writing), since it makes none. A bundle (POST /config/bundle) is several transactions and only its first waits on this version: it answers the version its own bumps took the organisation to — each part bumps only when it writes something, so a push of what is already there answers the version sent — and none — nor an etag — when another write landed between them; one landing after them, while its templates are saved, withholds the etag alone. Omitted, there is no condition, and * is no condition either — and a write with no condition answers no registryVersion (nor, from a bundle, an etag), since nothing says which version it was made from. A value that is neither is 400 (code: BAD_IF_MATCH) rather than ignored — a precondition silently dropped looks like conflict detection and is not.
Example
"7"The registryVersion this change was made against, as "7" or 7 — a weak tag (W/"7") is refused, since If-Match uses strong comparison. Sent, the write is refused with 409 (code: REGISTRY_CONFLICT, the current version in the body) when the organisation has moved since, and otherwise answers the version it made: one past the version sent for a write made in one transaction, or the version sent itself for a request that asks for no change (an empty PATCH /config/writing), since it makes none. A bundle (POST /config/bundle) is several transactions and only its first waits on this version: it answers the version its own bumps took the organisation to — each part bumps only when it writes something, so a push of what is already there answers the version sent — and none — nor an etag — when another write landed between them; one landing after them, while its templates are saved, withholds the etag alone. Omitted, there is no condition, and * is no condition either — and a write with no condition answers no registryVersion (nor, from a bundle, an etag), since nothing says which version it was made from. A value that is neither is 400 (code: BAD_IF_MATCH) rather than ignored — a precondition silently dropped looks like conflict detection and is not.
Responses
Section titled “Responses”Deleted, and — when the delete was sent with If-Match — the registry version it produced.
object
The version the organisation is at after this write, to send as the next write’s If-Match: one past the version you sent in If-Match for a write made in one transaction (a bundle, several, answers the version its own bumps took the organisation to, or none when another write landed between them), or that version itself for a request that asks for no change (an empty PATCH /config/writing, which writes nothing and makes no version; sending the value the organisation already has still writes, and moves it). Only a write sent with a version in If-Match answers one. Without (no header, or *), the write lands on whatever version the organisation is at, and nothing on the server knows which version your picture of the configuration was built from: another administrator’s change may be inside the number, and sent back as If-Match it would let your next write overwrite that change unseen. So it is left out. To write again, read the configuration first (its GET answers the version), or send If-Match.
Example
{ "ok": true}No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The bearer’s role is too low (code: ROLE_REQUIRED), or it was issued for a different organisation; the organisation has been closed (code: ORG_CLOSED, either kind of bearer); the person is banned (code: BANNED, a session); or it is a session that is signed in but in no organisation (code: NO_ORG): one that never joined one, or whose person was taken out of the one it was in, or left it. Signing in again changes nothing for NO_ORG; choosing or making an organisation does.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No such library, or it is not visible to this session.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The organisation’s configuration has changed since the version in If-Match (REGISTRY_CONFLICT, the current one in the body); with impactToken, what the removal would break is no longer what the person confirmed (IMPACT_CHANGED, the new answer in impact); or the library is published by the other publisher (LIBRARY_MANAGED, which says who in managedBy): a person is refused one the configuration repository publishes — remove it from the repository, or take it over first, since removed here its next push would make it again as a new library — and an API token, which publishes as the repository, one taken over in the browser. Neither moves the version.
object
object
object
The organisation’s templates, which each run whichever version is current.
object
How many call one of its functions by name.
How many may reach it without naming the function (helpers[name], or the library read whole), or could not be read: never counted as not using it.
Its imports not finished.
object
How many call one of its functions by name.
How many may reach it without naming the function (helpers[name], or the library read whole), or could not be read: never counted as not using it.
Its connections, by their own defaults: a module’s default match rule and a field’s default mapping, which a run takes from the connection rather than its recipe. A connection that is somebody else’s own is counted, never named.
object
How many call one of its functions by name.
How many may reach it without naming the function (helpers[name], or the library read whole), or could not be read: never counted as not using it.
The organisation’s runs in progress.
object
The version of this library the run started with, which it keeps until it ends — 0 for what came before v1 (the one Sloose ships, or one stored before versions were kept); null when the run did not say which libraries it holds. A run that said, and named no version of this one, holds none of it and is not listed.
True when what the run holds is of a library since removed — its record names another library’s id — so version is no version of this one.
Imports not finished that keep an older version of this library instead of the current one (“Keep v3 for this import”): counted in no use of the current version, and broken by no publish.
object
The version it keeps.
Only on the answer to a removal where Sloose ships a library under the same name: the functions this import calls that the Sloose library also has, which it will use instead of the version it keeps.
The functions the version current now has and the manifest sent does not.
object
object
The functions it calls that the new version does not have, and where.
object
object
In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.
The flow, for a place in a recipe.
object
In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.
The flow, for a place in a recipe.
object
The functions it calls that the new version does not have, and where.
object
object
In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.
The flow, for a place in a recipe.
object
In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.
The flow, for a place in a recipe.
Connections whose own defaults call a function taken away, or may.
object
The functions it calls that the new version does not have, and where.
object
object
In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.
The flow, for a place in a recipe.
object
In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.
The flow, for a place in a recipe.
How many more break that are not the caller’s to see: templates private to somebody else, connections that are somebody else’s own. Counted, never described.
object
What was found to break, as one string. Sent back as impactToken with the publish, it is checked again as the publish is made, and a publish that would now break something this answer did not name is refused (409 IMPACT_CHANGED) — saving a template moves no configuration version, so If-Match alone cannot see one saved while the person was deciding.
object
Who publishes the library: sdk when the configuration repository does (a person was refused), null when it was taken over in the browser (an API token was refused).
Example
{ "code": "REGISTRY_CONFLICT"}The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).