links
Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/b4f1c643 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/b4f1c643 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/b4f1c643 Branch: refs/heads/gh-pages Commit: b4f1c643601180f6b402cadf87c9842bb53da26c Parents: 104bace Author: Kristine Hahn <[email protected]> Authored: Fri Nov 20 15:16:57 2015 -0800 Committer: Kristine Hahn <[email protected]> Committed: Wed Nov 25 10:13:42 2015 -0800 ---------------------------------------------------------------------- .../035-plugin-configuration-basics.md | 4 +-- _docs/developer-information/009-rest-api.md | 31 +++++++++++++------- 2 files changed, 23 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/b4f1c643/_docs/connect-a-data-source/035-plugin-configuration-basics.md ---------------------------------------------------------------------- diff --git a/_docs/connect-a-data-source/035-plugin-configuration-basics.md b/_docs/connect-a-data-source/035-plugin-configuration-basics.md index 8328e59..e8b5d22 100644 --- a/_docs/connect-a-data-source/035-plugin-configuration-basics.md +++ b/_docs/connect-a-data-source/035-plugin-configuration-basics.md @@ -152,7 +152,7 @@ For example, using uppercase letters in the query after defining the storage plu ## Storage Plugin REST API -If you need to add a storage plugin configuration to Drill and do not want to use a web browser, Drill provides a REST API that you can use to create a storage plugin configuration. Use a POST and pass two properties: +If you need to add a storage plugin configuration to Drill and do not want to use a web browser, you can use the [Drill REST API]({{site.baseurl}}/docs/rest-api/#get-status-threads) to create a storage plugin configuration. Use a POST request and pass two properties: * name The storage plugin configuration name. @@ -164,7 +164,7 @@ For example, this command creates a storage plugin named myplugin for reading fi curl -X POST -H "Content-Type: application/json" -d '{"name":"myplugin", "config": {"type": "file", "enabled": false, "connection": "file:///", "workspaces": { "root": { "location": "/", "writable": false, "defaultInputFormat": null}}, "formats": null}}' http://localhost:8047/storage/myplugin.json -This example assumes HTTPS has not been enabled. For more information about the REST API, see the [REST API]({{base.url}}/docs/rest-api). +This example assumes HTTPS has not been enabled. ## Bootstrapping a Storage Plugin http://git-wip-us.apache.org/repos/asf/drill/blob/b4f1c643/_docs/developer-information/009-rest-api.md ---------------------------------------------------------------------- diff --git a/_docs/developer-information/009-rest-api.md b/_docs/developer-information/009-rest-api.md index 7432b6e..8a4266c 100644 --- a/_docs/developer-information/009-rest-api.md +++ b/_docs/developer-information/009-rest-api.md @@ -21,10 +21,20 @@ Several examples in the document use the donuts.json file. To download this file The following short description of methods link to more information and examples: -* [List information about system/session options]({{site.baseurl}}/docs/rest-api/#get-options-json). -* [Change the value or type of the named option]({{site.baseurl}}/drill/docs/rest-api/#post-option-optionname). -* [Submit a query to Drill and return query results](). -* +* [List information about system/session options]({{site.baseurl}}/docs/rest-api/#get-options-json) +* [Change the value or type of the named option]({{site.baseurl}}/drill/docs/rest-api/#post-option-optionname) +* [Get the profiles of running and completed queries]({{site.baseurl}}/docs/rest-api/#get-profiles-json) +* [Get the profile of the query that has the given queryid]({{site.baseurl}}/drill/docs/rest-api/#get-profiles-queryid-json) +* [Cancel the query that has the given queryid]({{site.baseurl}}/docs/rest-api/#get-profiles-cancel-queryid) +* [Submit a query and return results]({{site.baseurl}}/docs/rest-api/#post-query-json) +* [Get the list of storage plugin names and configurations]({{site.baseurl}}/docs/rest-api/#get-storage-json) +* [Get the definition of the named storage plugin]({{site.baseurl}}/docs/rest-api/#get-storage-name-json) +* [Enable or disable the named storage plugin]({{site.baseurl}}/docs/rest-api/#get-storage-name-enable-val) +* [Create or update a storage plugin configuration]({{site.baseurl}}/docs/rest-api/#post-storage-name-json) +* [Delete a storage plugin configuration]({{site.baseurl}}/docs/rest-api/#delete-storage-name-json) +* [Get Drillbit information, such as ports numbers]({{site.baseurl}}/drill/docs/rest-api/#get-stats-json) +* [Get the current memory metrics]({{site.baseurl}}/docs/rest-api/#get-status-metrics) +* [Get the status of threads]({{site.baseurl}}/docs/rest-api/#get-status-threads) ## Options These methods get and set system options. @@ -94,6 +104,7 @@ Enclose option values of kind STRING in double quotation marks. <!-- Not merged yet, need to test --> **Response Body** + { "result" : "success" } @@ -131,7 +142,7 @@ Get the profiles of running and completed queries. ### GET /profiles/{queryid}.json -Get the profile of given queryid. +Get the profile of the query that has the given queryid. **Parameter** @@ -150,7 +161,7 @@ queryid--The UUID of the query in [standard UUID](https://en.wikipedia.org/wiki/ ### GET /profiles/cancel/{queryid} -Cancel the query having the given queryid. +Cancel the query that has the given queryid. **Parameter** @@ -174,7 +185,7 @@ Using the query method, you can programmatically run queries. ### POST /query.json -Submits a query, waits until the query completes, and then returns the results as single JSON object. +Submit a query and return results. **Parameters** @@ -251,7 +262,7 @@ Get the list of storage plugin names and configurations. ### GET /storage/{name}.json -Get the named storage plugin name and configuration. +Get the definition of the named storage plugin. **Parameter** @@ -356,7 +367,7 @@ Gets metric information. ### GET /stats.json -Returns Drillbit stats such as ports and max direct memory. +Get Drillbit information, such as ports numbers. **Example** @@ -425,7 +436,7 @@ Get the current memory metrics. ### GET /status/threads -Get status of threads. +Get the status of threads. **Example**
