Updates server REST API settings.
| Property | Value |
|---|---|
| Method | PATCH |
| URL | /api/server/settings/rest |
| Content-Type | application/json |
| Authentication | Bearer Token |
| Parameter | Type | Required | Description |
|---|---|---|---|
data.attributes.apiKey |
string | No | API key for authentication |
data.attributes.ipWhiteList |
string[] | No | List of whitelisted IP addresses |
data.attributes.corsSettings.enabled |
boolean | No | CORS enabled |
data.attributes.corsSettings.allowedOrigins |
string[] | No | List of allowed CORS origins |
{
"data": {
"attributes": {
"apiKey": "my-secret-api-key",
"ipWhiteList": [],
"corsSettings": {
"enabled": false
}
}
}
}
| Code | Description |
|---|---|
| 200 | Success - Settings updated |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing token |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
{
"data": {
"attributes": {
"enabled": {
"editable": true,
"value": true
},
"apiKey": {
"editable": true,
"value": "xxxxx"
},
"ipWhiteList": {
"editable": true,
"value": []
},
"corsSettings": {
"enabled": {
"editable": true,
"value": false
},
"allowedOrigins": {
"editable": true,
"value": ["*"]
}
}
}
},
"meta": {
"executionTime": 25,
"generatedAt": 1764852311256
},
"message": "REST Settings have been updated"
}
| Parameter | Type | Description |
|---|---|---|
data.attributes.enabled.value |
boolean | REST API enabled |
data.attributes.enabled.editable |
boolean | Indicates if the field can be modified |
data.attributes.enabled.lockedBy |
string | Locked by environment variable (if present) |
data.attributes.apiKey.value |
string | API key for authentication |
data.attributes.apiKey.editable |
boolean | Indicates if the field can be modified |
data.attributes.apiKey.lockedBy |
string | Locked by environment variable (if present) |
data.attributes.ipWhiteList.value |
string[] | List of whitelisted IP addresses |
data.attributes.ipWhiteList.editable |
boolean | Indicates if the field can be modified |
data.attributes.ipWhiteList.lockedBy |
string | Locked by environment variable (if present) |
data.attributes.corsSettings.enabled.value |
boolean | CORS enabled |
data.attributes.corsSettings.enabled.editable |
boolean | Indicates if the field can be modified |
data.attributes.corsSettings.enabled.lockedBy |
string | Locked by environment variable (if present) |
data.attributes.corsSettings.allowedOrigins.value |
string[] | List of allowed CORS origins |
data.attributes.corsSettings.allowedOrigins.editable |
boolean | Indicates if the field can be modified |
data.attributes.corsSettings.allowedOrigins.lockedBy |
string | Locked by environment variable (if present) |
message |
string | Response status message |
| Parameter | Type | Description |
|---|---|---|
meta.executionTime |
integer | Request processing time in milliseconds |
meta.generatedAt |
integer | Response generation timestamp (Unix timestamp in ms) |
{
"message": "Error message"
}
| Parameter | Type | Description |
|---|---|---|
message |
string | Human-readable error message |