System preferences
On this page:
GET[base]/preferences |
|
GET[base]/preferences/{preferenceId} |
|
POST[base]/preferences |
|
PUT[base]/preferences/{preferenceId} |
|
DELETE[base]/preferences/{preferenceId} |
Get a list of system preferences
Use this method to obtain a list of system preferences.
To obtain detailed information about a specified system preference, use a separate method to get system preference details.
Request
Header parameters:
Authorization: Bearer <token>
GET[base]/preferences
curl --location --request GET 'https://your.base-url.here/preferences?limit=10&offset=0&sort_by=key&sort_order=desc' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of Preference objects providing key-value pairs of set system preferences.
{
"total": 1,
"preferences": [
{
"key": "app.timezone",
"value": "UTC"
}
]
}
Get system preference details
Use this method to obtain detailed information about a specified system preference.
To obtain a list of system preferences, use a separate method to get a list of system preferences.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- preferenceId required
The system preference name.
GET[base]/preferences/{preferenceId}
curl --location --request GET 'https://your.base-url.here/preferences/app.timezone' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a Preference object providing information about the specified system preference.
{
"key": "app.timezone",
"value": "UTC"
}
Add a new system preference
Use this method to add a new system preference.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Body:
- key string required
The name of the system preference.
- value string required
The value of the system preference.
POST[base]v1/preferences
curl --location --request POST 'https://your.base-url.here/preferences' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"key": "app.timezone",
"value": "UTC"
}'
Response
Body:
In case of success, the response body contains a Preference object providing information about the newly created system preference.
{
"key": "app.timezone",
"value": "UTC"
}
Update a system preference
Use this method to update system preferences.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Path parameters:
- preferenceId required
The system preference identifier.
Body:
- value string
The value of the system preference.
PUT[base]/preferences/{preferenceId}
curl --location --request PUT 'https://your.base-url.here/preferences/app.timezone' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"value": "UTC"
}'
Response
Body:
In case of success, the response body contains a Preference object providing information about the updated system preference.
{
"key": "app.timezone",
"value": "UTC"
}
Delete a system preference
Use this method to delete a specified system preference.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- preferenceId required
The system preference identifier.
DELETE[base]/preferences/{preferenceId}
curl --location --request DELETE 'https://your.base-url.here/preferences/app.timezone' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, no response body is returned.