POST /setup/api/maintenance
| Name | Type | Description |
|---|---|---|
maintenance |
string |
Required. A JSON string with the attributes enabled and when. |
The possible values for enabled are true and false. When it's false,
the attribute when is ignored and the maintenance mode is turned off. when defines the time period when the maintenance was enabled.
The possible values for when are now or any date parseable by
mojombo/chronic.
curl -L -X POST 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance' -d 'maintenance={"enabled":true, "when":"now"}'
Status: 200 OK
{
"status": "scheduled",
"scheduled_time": "Tuesday, January 22 at 15 => 34 -0800",
"connection_services": [
{
"name": "git operations",
"number": 0
},
{
"name": "mysql queries",
"number": 233
},
{
"name": "resque jobs",
"number": 54
}
]
}