Setting
A Setting is a configurable value a Thing inherits from its nearest holder, Studio to Startup to Product, unless it sets its own.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
key | string | required | The name of the choice. |
value | json | required | The chosen value. |
locked | boolean | True when no holder below may override it. |
Object
{
"$id": "https: //api.sb/ tutorloop.com/ settings/ setting_1",
"$type": "Setting",
"key": "Example key",
"value": {},
"locked": true
}Relationships
- A Setting configures one Thing: the Thing whose choice a Setting holds; everything below it inherits the value unless it sets its own.
configures, inverseconfiguredBy.
Verbs
createCreates a Setting.POST /{namespace}/settingsgetReturns one Setting by id.GET /{namespace}/settings/{id}listReturns Settings, newest first, one page at a time.GET /{namespace}/settingsupdateChanges the given properties of a Setting.PATCH /{namespace}/settings/{id}deleteDeletes a Setting; its history is kept.DELETE /{namespace}/settings/{id}
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Setting.create | Yes | Yes | No | No |
Setting.get | Yes | Yes | Yes | Yes |
Setting.list | Yes | Yes | Yes | Yes |
Setting.update | Yes | Yes | No | No |
Setting.delete | Yes | Yes | No | No |
Call it
Add a setting to QuietCopy.Example
The Studio sets the default currency to USD. A Startup selling in euros overrides it with EUR, and its Products inherit EUR.