| 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 |
| Use Case | Example Request |
|---|---|
| Get the server status |
{
"id":"20121008095121",
"version":"3.2",
"status":"UP"
} |
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
| format | Response format can be set through:
If nothing is set, json is used. | No | None | json |
| 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 |
| Use Case | Example Request |
|---|---|
| Get the system properties, server info, etc. |
[
{
"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":
{
...
}
}
] |
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
| format | Response format can be set through:
If nothing is set, json is used. | Yes | None | json |
| Description | Upgrade the SonarQube database |
URL | /api/server/setup |
| HTTP Method | POST |
Security | None |
| Use Case | Example Request |
|---|---|
| Upgrade the SonarQubedatabase |
|
{
"status":"ok",
"migration_status":"NO_MIGRATION",
"message":"Database is up-to-date, no migration needed."
} |
Parameter | Description | Required | Default Value | Example Value |
|---|---|---|---|---|
| format | Response format can be set through:
If nothing is set, json is used. | No | None | json |