Skip to content

Validate a registry document

POST
/config/validate/registry
curl --request POST \
--url https://api.sloose.com/config/validate/registry \
--header 'Content-Type: application/json' \
--data '{ "version": 1, "modules": [ { "seedMappings": "example", "key": "example", "apiName": "example", "label": "example", "singular": "example", "singularLabel": "example", "color": "example", "defaultEnabled": true, "uniqueFields": [ "example" ], "defaultDuplicateCheck": { "searchField": "example", "searchMethod": "example", "expression": "example" }, "excludedFields": [ "example" ], "child": { "of": "example", "via": "example", "parentNeedsRows": true, "pointer": "example", "maxRows": "off", "layouts": { "additionalProperty": { "name": "example", "maxRows": "off", "required": [ "example" ] } }, "defaultLayout": "example" }, "stockEffect": { "field": "example", "label": "example", "direction": "up" } } ], "expressionContext": "example", "apiDelayMs": 1, "systemExcludedFields": [ "example" ], "dateFormat": "DMY", "timezone": "example" }'

Checks a RegistryDoc against the current schema and reports the module keys it declares. No authentication, no storage, no side effects.

A registry document.

Media typeapplication/json
object
version
integer
modules
required
Array<object>
object
seedMappings

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.

key
required
string
/^[a-z][a-z0-9_]*$/
apiName
required
string
>= 1 characters
label
required
string
>= 1 characters
singular
required
string
/^[A-Za-z_$][\w$]*$/
singularLabel

One record as the CRM names it in words (“Sales Order”), which sentences say; singular is the identifier expressions use (“SalesOrder”). Read-only: discovery takes it from the CRM, so a pushed value is ignored. Absent until a discovery has read it, when a reader says singular.

string
color
string
defaultEnabled
boolean
uniqueFields
Array<string>
defaultDuplicateCheck
object
searchField
string
searchMethod
string
expression
string
excludedFields
Array<string>
child
object
of
required
string
/^[a-z][a-z0-9_]*$/
via
required
string
>= 1 characters
parentNeedsRows
boolean
pointer
string
>= 1 characters
maxRows
Any of:
integer
> 0
layouts
object
key
additional properties
object
name
required
string
maxRows
Any of:
integer
> 0
required
required
Array<string>
defaultLayout
string
>= 1 characters
stockEffect
object
field
required
string
>= 1 characters
label
required
string
>= 1 characters
direction
required
string
Allowed values: up down
expressionContext
string
/^[A-Za-z_$][\w$]*$/
apiDelayMs
integer
<= 60000
systemExcludedFields
Array<string>
dateFormat
string
Allowed values: DMY MDY YMD
timezone

The organisation’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.

string
<= 64 characters

Valid. modules lists the keys it declares, in order.

Media typeapplication/json
object
ok
required
boolean
modules
required
Array<string>
Example
{
"ok": true
}

Not a valid registry document. This route answers { ok: false, issues } rather than the usual error envelope, because the SDK prints the issue list directly.

Media typeapplication/json
object
ok
required
boolean
issues
required
Array
Example
{
"ok": false
}

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.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com