...
| Description | Get the server status: UP, DOWN (generally for database connection failures), SETUP (if the server must be upgraded), MIGRATION_RUNNING (the upgrade process is currently running) |
URL | /api/server |
| HTTP Method | GET |
| Response Formats | json | xml |
Security | None |
Examples
| Use Case | Example Request |
|---|---|
| Get the server status |
...
...
| language | none |
|---|
|
...
Response Format
| Code Block | ||||
|---|---|---|---|---|
| ||||
{
"id":"20121008095121",
"version":"3.2",
"status":"UP"
} |
Parameters
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
| format | Response formatsformat. Possible values: xml or | json | No | xmlNone | json |
Get the System Properties, Server Info, etc.
| Description | Get the system properties, server info (Java, OS), database configuration, JVM statistics and installed plugins |
URL | /api/server/system |
| HTTP Method | GET |
| Response Formats | json |
Security | Requires Global Administrator role |
Examples
| Use Case | Example Request |
|---|---|
| Get the system properties, server info, etc. |
...
...
| language | none |
|---|
|
...
...
Response Format
| Code Block | ||||
|---|---|---|---|---|
| ||||
[
{
"system_info":
{
"System date":"Wed Oct 10 19:15:20 CEST 2012",
"JVM Vendor":"Sun Microsystems Inc.",
"JVM Name":"Java HotSpot(TM) Client VM",
...
}
"system_statistics":
{
...
}
"sonar_info":
{
...
}
"sonar_plugins":
{
...
}
"system_properties":
{
...
}
}
] |
Parameters
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
| format | Response formatsformat: json | Yes | None | json |
Upgrade the Sonar Database
| Description | Upgrade the Sonar database |
URL | /api/server/setup |
| HTTP Method | POST |
Security | None |
Examples
| Use Case | Example Request |
|---|---|
| Upgrade the Sonar database |
...
...
| language | none |
|---|
|
...
|
...
|
...
|
Response Format
| Code Block | ||||
|---|---|---|---|---|
| ||||
{
"status":"ok",
"migration_status":"NO_MIGRATION",
"message":"Database is up-to-date, no migration needed."
} |
Parameters
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
| format | Response formatsformat. Possible values: xml or | json or | txt | No | xmlNone | json |

