Returns all settings for a domain.
URL : /settings/domain/_id/:id
Method : GET
Authentication required : YES
Query parameters
- id: number (Domain ID)
Query parameters (Optional)
- schema_id: number (Schema ID)
Example
GET /xhr/settings/domain/_id/1
Response Code : 200
[
{
"schema_id": 1,
"settings_schema_default": "medium",
"settings_default": null,
"settings": null
},
{
"schema_id": 2,
"settings_schema_default": null,
"settings_default": {
"id": 21,
"properties": {
"value": [
"{\"value\":\"127.0.0.2\"}"
]
},
"settings_schema_id": 10,
"domain_id": null,
"user_id": null,
"default_id": 1
},
"settings": {
"id": 22,
"properties": {
"value": []
},
"settings_schema_id": 10,
"domain_id": 1,
"user_id": null,
"default_id": null
}
}
]
Response Code :
401 Unauthorized
500 Internal Server Error
Returns all settings for a user.
URL : /settings/user/_id/:id
Method : GET
Authentication required : YES
Query parameters
- id: number (User ID)
Query parameters (Optional)
- schema_id: number (Schema ID)
Example
GET /xhr/settings/user/_id/1
Response Code : 200
Response Code :
401 Unauthorized
500 Internal Server Error
Returns all settings for a default setting.
URL : /settings/default/_id/:id
Method : GET
Authentication required : YES
Query parameters
- id: number (Default ID)
Example
GET /xhr/settings/default/_id/1
Response Code : 200
Response Code :
401 Unauthorized
500 Internal Server Error
URL : GET /xhr/schema/settings/_id/:id
Method : GET
Authentication required : YES
Query parameters
- id: number (Settings ID)
Example
GET /xhr/schema/settings/_id/1
Response Code : 200
{
"id": 1,
"properties": {
"value": true
},
"settings_schema_id": 21,
"domain_id": null,
"user_id": null,
"default_id": 1
}
Response Code :
401 Unauthorized
404 Not Found
500 Internal Server Error
URL : /xhr/schema/_id/:id/settings
Method : POST
Authentication required : YES
Query parameters
- id: number (Schema ID)
- force: "1" | undefined (Force replace any existing value)
- merge: "1" | undefined (Merge with existing value, schema list type only)
Body parameters
- properties: object
- value: string | number | boolean | array (List type must be an array of JSON encoded strings)
- domain_id: number (Domain ID)
- user_id: number (User ID)
- default_id: type (Default ID)
Example
POST /xhr/schema/_id/1/settings
{
"user_id": 1,
"properties": {
"value": "high"
}
}
Response Code : 200
{
"id": number
}
Response Code :
401 Unauthorized
500 Internal Server Error
URL : /xhr/schema/settings/_id/:id
Method : PATCH
Authentication required : YES
Query parameters
- id: number (Settings ID)
Body parameters
- properties: object
- value: string | number | boolean | array (Should respect schema's value type)
Example
PATCH /xhr/schema/settings/_id/2
{
"properties": {
"value": "low"
}
}
Response Code : 204
Response Code :
401 Unauthorized
500 Internal Server Error
URL : /xhr/schema/settings/_id/:id
Method : DELETE
Authentication required : YES
Query parameters
- id: number (Settings ID)
Example
DELETE /xhr/schema/settings/_id/2
Response Code : 204
Response Code :
401 Unauthorized
500 Internal Server Error