update rest api

Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3022f280
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3022f280
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3022f280

Branch: refs/heads/document
Commit: 3022f280d30724efc4d99ce6cb100b42d2254eab
Parents: a9f35cb
Author: shaofengshi <shaofeng...@apache.org>
Authored: Tue Nov 29 15:02:24 2016 +0800
Committer: shaofengshi <shaofeng...@apache.org>
Committed: Tue Nov 29 15:02:24 2016 +0800

----------------------------------------------------------------------
 website/_data/docs16-cn.yml                | 20 ++++++++
 website/_data/docs16.yml                   | 61 +++++++++++++++++++++++
 website/_docs16/howto/howto_use_restapi.md | 66 ++++++++++++++++++++-----
 3 files changed, 135 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/3022f280/website/_data/docs16-cn.yml
----------------------------------------------------------------------
diff --git a/website/_data/docs16-cn.yml b/website/_data/docs16-cn.yml
new file mode 100644
index 0000000..f69fbe5
--- /dev/null
+++ b/website/_data/docs16-cn.yml
@@ -0,0 +1,20 @@
+- title: 开始
+  docs:
+  - index
+
+- title: 安装
+  docs:
+  - install/install_guide
+  - install/manual_install_guide
+
+- title: 教程
+  docs:
+  - tutorial/create_cube_cn
+  - tutorial/cube_build_job
+  - tutorial/acl
+  - tutorial/web
+  - tutorial/tableau
+  - tutorial/tableau_91
+  - tutorial/powerbi
+  - tutorial/odbc
+

http://git-wip-us.apache.org/repos/asf/kylin/blob/3022f280/website/_data/docs16.yml
----------------------------------------------------------------------
diff --git a/website/_data/docs16.yml b/website/_data/docs16.yml
new file mode 100644
index 0000000..25be101
--- /dev/null
+++ b/website/_data/docs16.yml
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Docs menu items, for English one, docs15-cn.yml is for Chinese one
+# The docs menu is constructed in docs15_nav.html with these data
+- title: Getting Started
+  docs:
+  - index
+  - release_notes
+  - gettingstarted/faq
+  - gettingstarted/events
+  - gettingstarted/best_practices
+  - gettingstarted/terminology
+  - gettingstarted/concepts
+
+- title: Installation
+  docs:
+  - install/index
+  - install/hadoop_env
+  - install/manual_install_guide
+  - install/kylin_cluster
+  - install/advance_settings
+  - install/kylin_docker
+
+- title: Tutorial
+  docs:
+  - tutorial/kylin_sample
+  - tutorial/create_cube
+  - tutorial/cube_build_job
+  - tutorial/acl
+  - tutorial/web
+  - tutorial/tableau
+  - tutorial/tableau_91
+  - tutorial/powerbi
+  - tutorial/odbc
+
+- title: How To
+  docs:
+  - howto/howto_build_cube_with_restapi
+  - howto/howto_use_restapi_in_js
+  - howto/howto_use_restapi
+  - howto/howto_optimize_cubes
+  - howto/howto_backup_metadata
+  - howto/howto_cleanup_storage
+  - howto/howto_jdbc
+  - howto/howto_upgrade
+  - howto/howto_ldap_and_sso
+  - howto/howto_use_beeline
+  - howto/howto_update_coprocessor

http://git-wip-us.apache.org/repos/asf/kylin/blob/3022f280/website/_docs16/howto/howto_use_restapi.md
----------------------------------------------------------------------
diff --git a/website/_docs16/howto/howto_use_restapi.md 
b/website/_docs16/howto/howto_use_restapi.md
index c3f1d79..ac25f85 100644
--- a/website/_docs16/howto/howto_use_restapi.md
+++ b/website/_docs16/howto/howto_use_restapi.md
@@ -23,6 +23,7 @@ This page lists the major RESTful APIs provided by Kylin.
    * [Enable cube](#enable-cube)
 * JOB
    * [Resume job](#resume-job)
+   * [Pause job](#pause-job)
    * [Discard job](#discard-job)
    * [Get job status](#get-job-status)
    * [Get job step output](#get-job-step-output)
@@ -34,7 +35,7 @@ This page lists the major RESTful APIs provided by Kylin.
 * Cache
    * [Wipe cache](#wipe-cache)
 * Streaming
-   * [Init cube start offset](#init-start-offset)
+   * [Initiate cube start position](#initiate-cube-start-position)
    * [Build stream cube](#build-stream-cube)
    * [Check segment holes](#check-segment-holes)
    * [Fill segment holes](#fill-segment-holes)
@@ -81,14 +82,14 @@ curl -c /path/to/cookiefile.txt -X POST -H "Authorization: 
Basic XXXXXXXXX" -H '
 If login successfully, the JSESSIONID will be saved into the cookie file; In 
the subsequent http requests, attach the cookie, for example:
 
 ```
-curl -b /path/to/cookiefile.txt -X PUT -H 'Content-Type: application/json' -d 
'{"startTime":'1423526400000', "endTime":'1423526400', "buildType":"BUILD"}' 
http://<host>:<port>/kylin/api/cubes/your_cube/rebuild
+curl -b /path/to/cookiefile.txt -X PUT -H 'Content-Type: application/json' -d 
'{"startTime":'1423526400000', "endTime":'1423526400', "buildType":"BUILD"}' 
http://<host>:<port>/kylin/api/cubes/your_cube/build
 ```
 
 Alternatively, you can provide the username/password with option "user" in 
each curl call; please note this has the risk of password leak in shell history:
 
 
 ```
-curl -X PUT --user ADMIN:KYLIN -H "Content-Type: 
application/json;charset=utf-8" -d '{ "startTime": 820454400000, "endTime": 
821318400000, "buildType": "BUILD"}' 
http://localhost:7070/kylin/api/cubes/kylin_sales/rebuild
+curl -X PUT --user ADMIN:KYLIN -H "Content-Type: 
application/json;charset=utf-8" -d '{ "startTime": 820454400000, "endTime": 
821318400000, "buildType": "BUILD"}' 
http://localhost:7070/kylin/api/cubes/kylin_sales/build
 ```
 
 ***
@@ -645,7 +646,7 @@ Get descriptor for specified cube instance.
 ```
 
 ## Build cube
-`PUT /kylin/api/cubes/{cubeName}/rebuild`
+`PUT /kylin/api/cubes/{cubeName}/build`
 
 #### Path Variable
 * cubeName - `required` `string` Cube name.
@@ -858,6 +859,11 @@ Get descriptor for specified cube instance.
    "progress":0.0
 }
 ```
+## Pause Job
+`PUT /kylin/api/jobs/{jobId}/pause`
+
+#### Path variable
+* jobId - `required` `string` Job id.
 
 ## Discard Job
 `PUT /kylin/api/jobs/{jobId}/cancel`
@@ -865,9 +871,6 @@ Get descriptor for specified cube instance.
 #### Path variable
 * jobId - `required` `string` Job id.
 
-#### Response Sample
-(Same as "Resume job")
-
 ## Get Job Status
 `GET /kylin/api/jobs/{jobId}`
 
@@ -1034,33 +1037,72 @@ Get descriptor for specified cube instance.
 
 ***
 
-## Init cube start offset
+## Initiate cube start position
+Set the stream cube's start position to the current latest offsets; This can 
avoid building from the earlist position of Kafka topic (if you have set a long 
retension time); 
+
 `PUT /kylin/api/cubes/{cubeName}/init_start_offsets`
+
 #### Path variable
 * cubeName - `required` `string` Cube name
 
+#### Response Sample
+```sh
+{
+    "result": "success", 
+    "offsets": "{0=246059529, 1=253547684, 2=253023895, 3=172996803, 
4=165503476, 5=173513896, 6=19200473, 7=26691891, 8=26699895, 9=26694021, 
10=19204164, 11=26694597}"
+}
+```
 
 ## Build stream cube
 `PUT /kylin/api/cubes/{cubeName}/build2`
+
+This API is specific for stream cube's building;
+
 #### Path variable
 * cubeName - `required` `string` Cube name
 
 #### Request Body
+
 * sourceOffsetStart - `required` `long` The start offset, 0 represents from 
previous position;
 * sourceOffsetEnd  - `required` `long` The end offset, 9223372036854775807 
represents to the end position of current stream data
 * buildType - `required` Build type, "BUILD", "MERGE" or "REFRESH"
 
-## Init cube start offset
-`PUT /kylin/api/cubes/{cubeName}/init_start_offsets`
-#### Path variable
-* cubeName - `required` `string` Cube name
+#### Request Sample
+
+```sh
+{  
+   "sourceOffsetStart": 0, 
+   "sourceOffsetEnd": 9223372036854775807, 
+   "buildType": "BUILD"
+}
+```
+
+#### Response Sample
+```sh
+{
+    "uuid": "3afd6e75-f921-41e1-8c68-cb60bc72a601", 
+    "last_modified": 1480402541240, 
+    "version": "1.6.0", 
+    "name": "embedded_cube_clone - 1409830324_1409849348 - BUILD - PST 
2016-11-28 22:55:41", 
+    "type": "BUILD", 
+    "duration": 0, 
+    "related_cube": "embedded_cube_clone", 
+    "related_segment": "42ebcdea-cbe9-4905-84db-31cb25f11515", 
+    "exec_start_time": 0, 
+    "exec_end_time": 0, 
+    "mr_waiting": 0, 
+ ...
+}
+```
 
 ## Check segment holes
 `GET /kylin/api/cubes/{cubeName}/holes`
+
 #### Path variable
 * cubeName - `required` `string` Cube name
 
 ## Fill segment holes
 `PUT /kylin/api/cubes/{cubeName}/holes`
+
 #### Path variable
 * cubeName - `required` `string` Cube name

Reply via email to