<services uri>/status[.<format>]
Update service status in batch, including Enable, Stop. Only administrator has the permission to update the service status in batch.
Supported Methods:
Supported formats: rjson, json, html, xml.
Implement the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.
http://supermapiportal:8090/iportal/web/services/status.rjson
Update service status in batch, including Enable, Stop.
Execute PUT request for servicesStatus resource, enable or stop services in batch. It is composed by following fields:
Name | Type | Description |
serviceIds | Integer[] | Service ID |
isEnable | Boolean | Service is available or not. |
The structure of the response resource representation is as follows:
Field | Type | Description |
succeed | boolean | Whether service status are updated in batch successfully or not. |
error | Httperror | Error information. The field will not display if the services are updated in batch successfully. |
1. Enable services in batch
Exectue PUT request for servicesStatus resource http://localhost:8090/iportal/web/services/status.rjson, and enable services in batch. The request body is as follows:
{
"serviceIds": [
4,
5
],
"isEnable": true
}
The returned resource representation in rjson format is as follows:
{"succeed": true}
2. Stop services in batch
Exectue PUT request for servicesStatus resource http://localhost:8090/iportal/web/services/status.rjson, and stop services in batch. The request body is as follows:
{
"serviceIds": [
4,
5
],
"isEnable": false
}
The returned resource representation in rjson format is as follows:
{"succeed": true}