Server REST Settings Update
Updates server REST API settings.
Request
| Property | Value |
|---|---|
| Method | PATCH |
| URL | /api/server/settings/rest |
| Content-Type | application/json |
| Authentication | Bearer Token |
Request
curl -X PATCH "{BASE_URL}/api/server/settings/rest" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Request Body
| 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 |
Request Body
{
"data": {
"attributes": {
"apiKey": "my-secret-api-key",
"ipWhiteList": [],
"corsSettings": {
"enabled": false
}
}
}
}
Response Body
REST Settings
| 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 |
Metadata
| Parameter | Type | Description |
|---|---|---|
meta.executionTime | integer | Request processing time in milliseconds |
meta.generatedAt | integer | Response generation timestamp (Unix timestamp in ms) |
Successful Response (200)
{
"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"
}
Error Response (4xx/5xx)
| Parameter | Type | Description |
|---|---|---|
message | string | Human-readable error message |
Error Response
{
"message": "Error message"
}
Support Needed?
Create a free ticket and our support team will provide you necessary assistance.