zeppelin/docs/usage/rest_api/zeppelin_server.md
cuspymd 9a6fac8b46 [ZEPPELIN-5341] Apply syntax highlight for sample JSON in REST API documents
### What is this PR for?
Apply syntax highlight for sample JSON in REST API documents

### What type of PR is it?
[Documentation]

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5341

### How should this be tested?
* Checked updated documents locally

### Screenshots (if appropriate)
Before
![image](https://user-images.githubusercontent.com/8870299/116114020-f43f8780-a6f3-11eb-8d5f-7074adc307c0.png)

After
![image](https://user-images.githubusercontent.com/8870299/116114055-fc97c280-a6f3-11eb-9270-69795da0e82b.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: cuspymd <cuspymd@gmail.com>

Closes #4101 from cuspymd/improve-rest-doc and squashes the following commits:

def642512 [cuspymd] Apply syntax highlight for sample JSON in REST API documents
2021-05-03 16:04:26 +08:00

2.9 KiB

layout title description group
page Apache Zeppelin Server REST API This page contains Apache Zeppelin Server REST API information. usage/rest_api

{% include JB/setup %}

Apache Zeppelin Server REST API

Overview

Apache Zeppelin provides several REST APIs for interaction and remote activation of zeppelin functionality. All REST APIs are available starting with the following endpoint http://[zeppelin-server]:[zeppelin-port]/api. Note that Apache Zeppelin REST APIs receive or return JSON objects, it is recommended for you to install some JSON viewers such as JSONView.

If you work with Apache Zeppelin and find a need for an additional REST API, please file an issue or send us an email.

Zeppelin Server REST API list

Get Zeppelin version

Description This ```GET``` method returns Zeppelin version
URL ```http://[zeppelin-server]:[zeppelin-port]/api/version```
Success code 200
Fail code 500
sample JSON response
{
  "status": "OK",
  "message": "Zeppelin version",
  "body": [
    {
      "version": "0.8.0",
      "git-commit-id": "abc0123",
      "git-timestamp": "2017-01-02 03:04:05"
    }
  ]
}

Change the log level of Zeppelin Server

Description This ```PUT``` method is used to update the root logger's log level of the server.
URL ```http://[zeppelin-server]:[zeppelin-port]/api/log/level/```
Success code 200
Fail code 406
sample JSON response
{
  "status": "OK"
}
sample error JSON response
{
  "status":"NOT_ACCEPTABLE",
  "message":"Please check LOG level specified. Valid values: DEBUG, ERROR, FATAL, INFO, TRACE, WARN"
}