[KYUUBI #4199][Followup] Reformat rest-api.md with markdown style rules

### _Why are the changes needed?_

- Reformat markdown file `rest-api.md` with changes from  (https://github.com/apache/kyuubi/pull/4199) in with  ( https://github.com/apache/kyuubi/pull/4200)

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4210 from bowenliang123/4199-followup.

Closes #4199

f66cf8ee [liangbowen] reformat changes in markdown files

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
This commit is contained in:
liangbowen 2023-01-30 12:38:44 +08:00
parent 69d625a1be
commit b6a1a376bf

View File

@ -357,6 +357,7 @@ Returns all the batches.
Create a new batch.
#### Request Body
- Media type: `application-json`
- JSON structure:
@ -377,7 +378,8 @@ The created [Batch](#batch) object.
Create a new batch with uploading resource file.
Example of using `curl` command to send POST request to `/v1/batches` in `multipart-formdata` media type with uploading resource file from local path.
Example of using `curl` command to send POST request to `/v1/batches` in `multipart-formdata` media type with uploading resource file from local path.
```shell
curl --location --request POST 'http://localhost:10099/api/v1/batches' \
--form 'batchRequest="{\"batchType\":\"SPARK\",\"className\":\"org.apache.spark.examples.SparkPi\",\"name\":\"Spark Pi\"}";type=application/json' \
@ -385,12 +387,13 @@ curl --location --request POST 'http://localhost:10099/api/v1/batches' \
```
#### Request Body
- Media type: `multipart-formdata`
- Request body structure in multiparts:
| Name | Description | Media Type |
|:-------------|:-------------------------------------------------------------------------------------------------|:-----------------|
| batchRequest | The batch request in JSON format as request body requried in [POST /batches](#post-batches) | application/json |
| Name | Description | Media Type |
|:-------------|:--------------------------------------------------------------------------------------------------|:-----------------|
| batchRequest | The batch request in JSON format as request body requried in [POST /batches](#post-batches) | application/json |
| resourceFile | The resource to upload and execute, which will be cached on server and cleaned up after execution | File |
#### Response Body