PHP Settings
The PHP Settings API provides endpoints to retrieve and change PHP settings for specific boxes. All endpoints require JWT authentication.
Get PHP settings for selected boxes.
Endpoint
GET /v1/boxes/php/settings
| Parameter |
Location |
Type |
Required |
Description |
Authorization |
Header |
string |
Yes |
Bearer token (JWT) |
Query Parameters
| Parameter |
Location |
Type |
Required |
Description |
ids |
Query |
array |
Yes |
Array of box IDs to retrieve settings for |
Example Query
GET /v1/boxes/php/settings?ids[]=box_id_1&ids[]=box_id_2
Success Response
- Status Code:
200 OK
- Description: Response contains the PHP settings for the specified boxes
- Body:
{
"boxes": [
{
"id": "uuid-of-the-box",
"php_settings": {
"max_php_execution_time": 30,
"memory_limit": 128,
"version": "8.1"
}
}
],
"php_settings": { ...
"max_php_execution_time": {
"available": [15, 30, 60],
"labels": [
{
"label": "30 seconds",
"value": [30]
}
]
},
"memory_limit": {
"available": [128, 256, 512]
},
"version": {
"available": ["7.4", "8.0", "8.1"],
"labels": [
{
"values": ["8.1"],
"label": "Recommended"
}
],
"comments": [
{
"values": ["7.4"],
"comment": "Outdated"
}
]
}
}
}
| Field |
Type |
Description |
boxes |
array |
Array of boxes with their current PHP settings |
boxes[].id |
string |
Box identifier |
boxes[].php_settings |
object |
Current PHP settings for the box |
php_settings |
object |
Available options and constraints for PHP settings |
Error Responses
401 Unauthorized
{
"timestamp": "timestamp",
"path": "/v1/boxes/php/settings",
"request_id": "request-id",
"message": "Unauthenticated."
}
400 Bad Request
{
"timestamp": "timestamp",
"message": "The ids field is required.",
"path": "/v1/boxes/php/settings",
"request_id": "3d4379f2-7ceb-4e1e-aa36-cb45f82dd85f"
}
Update the PHP settings for a specific box.
Endpoint
PATCH /v1/boxes/{id}/php/settings
| Parameter |
Location |
Type |
Required |
Description |
id |
Path |
string |
Yes |
The ID of the box |
Authorization |
Header |
string |
Yes |
Bearer token (JWT) |
Request Body
| Field |
Type |
Required |
Description |
settings |
object |
Yes |
Settings object |
settings.max_execution_time_in_seconds |
integer |
No |
Max execution time in seconds |
settings.memory_limit |
integer |
No |
Memory limit in MB |
settings.version |
string |
No |
PHP version |
Example Request Body
{
"settings": {
"max_execution_time_in_seconds": 30,
"memory_limit": 128,
"version": "8.1"
}
}
Success Response
- Status Code:
204 No Content
- Description: Settings updated successfully
- Body: Empty
Error Responses
401 Unauthorized
{
"timestamp": "timestamp",
"path": "/v1/boxes/{id}/php/settings",
"request_id": "request-id",
"message": "Unauthenticated."
}
400 Bad Request
{
"timestamp": "timestamp",
"message": "Invalid request.",
"path": "/v1/boxes/{id}/php/settings",
"request_id": "3d4379f2-7ceb-4e1e-aa36-cb45f82dd85f"
}