Skip to content

Apply a registry document

PUT
/orgs/{org}/config/registry
curl --request PUT \
--url https://api.sloose.com/orgs/org_9f3c/config/registry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "version": 1, "modules": [ { "key": "example", "apiName": "example", "label": "example", "singular": "example", "color": "example", "defaultEnabled": true, "uniqueFields": [ "example" ], "defaultDuplicateCheck": { "searchField": "example", "searchMethod": "example", "expression": "example" }, "excludedFields": [ "example" ], "seedMappings": { "additionalProperty": { "mode": "column", "source": "example", "staticValue": "example", "transform": "example", "skip": true, "searchField": "example", "searchMethod": "example", "searchExpression": "example", "patch": { "when": [ "pending" ], "overwrite": "always" } } } } ], "expressionContext": "example", "apiDelayMs": 1, "systemExcludedFields": [ "example" ], "dateFormat": "DMY" }'

Replaces the org’s curation with the document, in one step. Every module it names must exist in the latest discovery. Bumps registryVersion, which is how a client knows a project was saved against an older shape.

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.

Media typeapplication/json
object
version
integer
modules
required
Array<object>
object
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$]*$/
color
string
defaultEnabled
boolean
uniqueFields
Array<string>
defaultDuplicateCheck
object
searchField
string
searchMethod
string
expression
string
excludedFields
Array<string>
seedMappings
object
key
additional properties
object
mode
string
Allowed values: column static expression search skip
source
string | null
staticValue
string | null
transform
string | null
skip
boolean
searchField
string | null
searchMethod
string | null
searchExpression
string | null
patch
object
when
Array<string>
Allowed values: pending created updated exists skipped filtered guarded dryrun error blocked
overwrite
string
Allowed values: always if-absent
expressionContext
string
/^[A-Za-z_$][\w$]*$/
apiDelayMs
integer
systemExcludedFields
Array<string>
dateFormat
string
Allowed values: DMY MDY YMD

Applied.

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

The request body did not match the schema. issues carries the Zod issue list.

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 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 plan’s module limit would be exceeded (code: LIMIT_MODULES), or the org is suspended.

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"
}