Check a configuration bundle without applying it
const url = 'https://api.sloose.com/orgs/org_9f3c/config/bundle/dry-run?connector=con_8f2a';const options = { method: 'POST', headers: { 'If-Match': '"7"', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"bundleVersion":1,"org":{"dateFormat":"DMY","expressionContext":"example","aiSamples":"allow"},"registry":{"version":1,"modules":[{"seedMappings":"example","key":"example","apiName":"example","label":"example","singular":"example","color":"example","defaultEnabled":true,"uniqueFields":["example"],"defaultDuplicateCheck":{"searchField":"example","searchMethod":"example","expression":"example"},"excludedFields":["example"]}],"expressionContext":"example","apiDelayMs":1,"systemExcludedFields":["example"],"dateFormat":"DMY","timezone":"example"},"fields":{"additionalProperty":[{"apiName":"example","description":"example","format":"example","examples":["example"],"aliases":["example"],"excludeFromAi":true,"derived":true,"defaultMapping":{"mode":"column","source":"example","staticValue":"example","transform":"example","skip":true,"searchField":"example","searchMethod":"example","searchExpression":"example","patch":{"when":["pending"],"overwrite":"always"},"key":true,"keyMethod":"example","keyExpression":"example","onNone":"empty","onSeveral":"ask"},"excluded":true,"requiredForImports":"waivable","writtenAs":"upper","mustBe":{"rule":"example","says":"example"}}]},"libraries":[{"manifest":{"namespace":"example","version":"example","scope":"global","description":"example","functions":[{"name":"example","description":"example","params":[{"name":"example","type":"example","optional":true,"description":"example"}],"returns":"example","examples":[{"call":"example","result":"example"}],"tags":["example"]}]},"source":"example"}],"templates":[{"name":"example","description":"example","config":{"additionalProperty":"example"}}],"projects":[{"name":"example","description":"example","config":{"additionalProperty":"example"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.sloose.com/orgs/org_9f3c/config/bundle/dry-run?connector=con_8f2a' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'If-Match: "7"' \ --data '{ "bundleVersion": 1, "org": { "dateFormat": "DMY", "expressionContext": "example", "aiSamples": "allow" }, "registry": { "version": 1, "modules": [ { "seedMappings": "example", "key": "example", "apiName": "example", "label": "example", "singular": "example", "color": "example", "defaultEnabled": true, "uniqueFields": [ "example" ], "defaultDuplicateCheck": { "searchField": "example", "searchMethod": "example", "expression": "example" }, "excludedFields": [ "example" ] } ], "expressionContext": "example", "apiDelayMs": 1, "systemExcludedFields": [ "example" ], "dateFormat": "DMY", "timezone": "example" }, "fields": { "additionalProperty": [ { "apiName": "example", "description": "example", "format": "example", "examples": [ "example" ], "aliases": [ "example" ], "excludeFromAi": true, "derived": true, "defaultMapping": { "mode": "column", "source": "example", "staticValue": "example", "transform": "example", "skip": true, "searchField": "example", "searchMethod": "example", "searchExpression": "example", "patch": { "when": [ "pending" ], "overwrite": "always" }, "key": true, "keyMethod": "example", "keyExpression": "example", "onNone": "empty", "onSeveral": "ask" }, "excluded": true, "requiredForImports": "waivable", "writtenAs": "upper", "mustBe": { "rule": "example", "says": "example" } } ] }, "libraries": [ { "manifest": { "namespace": "example", "version": "example", "scope": "global", "description": "example", "functions": [ { "name": "example", "description": "example", "params": [ { "name": "example", "type": "example", "optional": true, "description": "example" } ], "returns": "example", "examples": [ { "call": "example", "result": "example" } ], "tags": [ "example" ] } ] }, "source": "example" } ], "templates": [ { "name": "example", "description": "example", "config": { "additionalProperty": "example" } } ], "projects": [ { "name": "example", "description": "example", "config": { "additionalProperty": "example" } } ] }'Checks a bundle exactly as POST …/config/bundle would apply it and writes nothing: every refusal the push makes before it writes (the connection named, the plan, If-Match, the libraries compiling and loading, the registry, the annotations, every template) is made here, in the same words, and the warnings the push would give are answered. No version moves, no row changes and no change is recorded. This is what sloose push --dry-run sends.
A separate route, not a flag on the push, so a client talking to a server that does not have it is refused (404) rather than having its dry run applied.
What it cannot say is what another writer does between this answer and a real push, which a push checks again as it goes (PUSH_OVERTAKEN); If-Match is checked again after the checks, so a write that landed during them is reported REGISTRY_CONFLICT as the push would.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The org id the session was issued for. A token for one org can never read another.
Example
org_9f3cThe org id the session was issued for. A token for one org can never read another.
Query Parameters
Section titled “Query Parameters”The connection this is about, by id: one of the org’s, or your own. REQUIRED: absent or empty is 400 CONNECTION_REQUIRED, listing the connections this bearer may name, because nothing picks one for a request that does not say (design §14.8). Any other — another org’s, or another person’s — is 404 CONNECTION_NOT_FOUND.
Example
con_8f2aThe connection this is about, by id: one of the org’s, or your own. REQUIRED: absent or empty is 400 CONNECTION_REQUIRED, listing the connections this bearer may name, because nothing picks one for a request that does not say (design §14.8). Any other — another org’s, or another person’s — is 404 CONNECTION_NOT_FOUND.
Header Parameters
Section titled “Header Parameters”The registryVersion the bundle was made against, as "7" or 7; a weak tag (W/"7") is refused. Sent, the dry run is refused with 409 (code: REGISTRY_CONFLICT, the current version in the body) when the org has moved since — as the push would be — checked before the checks and again after them. A dry run only validates the precondition: it writes nothing, makes no version and answers no registryVersion. Omitted, or *, there is no condition. A value that is neither is 400 (code: BAD_IF_MATCH).
Example
"7"The registryVersion the bundle was made against, as "7" or 7; a weak tag (W/"7") is refused. Sent, the dry run is refused with 409 (code: REGISTRY_CONFLICT, the current version in the body) when the org has moved since — as the push would be — checked before the checks and again after them. A dry run only validates the precondition: it writes nothing, makes no version and answers no registryVersion. Omitted, or *, there is no condition. A value that is neither is 400 (code: BAD_IF_MATCH).
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
seedMappings is no longer a module setting: a mapping a new import starts from belongs to the field it is about. Set defaultMapping on the field annotation — PATCH /orgs/{org}/config/fields/{module}/{apiName}, or fields/<module>.json in a configuration repository. Values already stored were moved by migration 0035.
object
The org’s IANA timezone, which helpers.today() answers in. Read-only: it is taken from the CRM at sign-in, so a pushed value is ignored.
object
object
object
object
object
object
object
object
object
object
object
object
Deprecated: the older name of templates, read as templates. A bundle may send one or the other, not both.
object
object
Responses
Section titled “Responses”The bundle would be accepted: what it holds, and the warnings a push would give. Nothing was written.
object
object
What a push would store or leave alone and have something to say about, as the push says it (libraries/<name>: …, templates/<name>: …) — present only when there is something.
Example
{ "ok": true, "dryRun": true}The request — its body or its query — did not match the schema (issues carries the Zod issue list), or: The request named no connection (code: CONNECTION_REQUIRED, with connections: the ones this bearer may name). Nothing picks one for a request that does not say (design §14.8).
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 bearer, or one that is expired, revoked or no longer resolves to a member.
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 plan cannot share templates (code: FEATURE_SHARED_TEMPLATES) or publish helper libraries (code: FEATURE_HELPER_LIBRARIES, for a bundle carrying any), the role is too low, or the org is closed (code: ORG_CLOSED).
object
Examplegenerated
{ "error": "example", "code": "example"}?connector= names a connection this person may not use: another org’s, or another person’s (code: CONNECTION_NOT_FOUND).
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 org’s configuration has changed since the version in If-Match (code: REGISTRY_CONFLICT, the current version in the body) — before the checks or while they ran.
object
Example
{ "code": "REGISTRY_CONFLICT"}The push would be refused for what the bundle holds: a module or field this org does not have (UNKNOWN_MODULES, UNKNOWN_FIELDS), a case a field’s kind does not take (WRITTEN_AS_NOT_FOR_KIND), a Must be rule that reaches past the value (INVALID_RULE), a key the registry gives that another module holds (KEY_CLASH), a registry or template that does not read (INVALID_REGISTRY, INVALID_TEMPLATE), or a helper library that cannot be published (GLOBAL_LIBRARY, DUPLICATE_LIBRARY, RESERVED_NAMESPACE, LIBRARY_DOES_NOT_LOAD).
object
UNKNOWN_MODULES only: the template that names a module none holds.
UNKNOWN_MODULES, UNKNOWN_FIELDS: what no one holds.
WRITTEN_AS_NOT_FOR_KIND: each field given a case its kind does not take. INVALID_RULE: each field given a Must be rule that reaches past the value, and why.
object
The field’s kind, as discovery last read it.
The cases this kind takes: none for a website, lower for an email.
object
What the rule reaches that it may not, in words.
Example
{ "fields": [ { "writtenAs": "upper", "takes": [ "upper" ] } ]}A helper library in the bundle could not be checked: the sandbox did not answer (code: SANDBOX_UNAVAILABLE). Nothing was written.
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"}