You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/01/08 20:30:32 UTC
[27/50] [abbrv] allura git commit: [#7919] API docs for new endpoints;
minor fix for webhooks
[#7919] API docs for new endpoints; minor fix for webhooks
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/90525e75
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/90525e75
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/90525e75
Branch: refs/heads/master
Commit: 90525e757976349e97bf413c434806604d2d101f
Parents: 10b59cc
Author: Dave Brondsema <da...@brondsema.net>
Authored: Mon Dec 14 18:06:21 2015 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Jan 8 14:06:17 2016 -0500
----------------------------------------------------------------------
Allura/allura/ext/admin/admin_main.py | 3 +-
Allura/docs/api-rest/api.raml | 57 +++++++++++++++++++++++++-----
2 files changed, 49 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/90525e75/Allura/allura/ext/admin/admin_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index 236bf96..9c90b58 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -773,14 +773,13 @@ class ProjectAdminRestController(BaseController):
@expose('json:')
@require_post()
- def mount_order(self, subs=None, tools=None, **kw):
+ def mount_order(self, **kw):
if kw:
for ordinal, mount_point in sorted(kw.items(), key=lambda x: int(x[0])):
try:
c.project.app_config(mount_point).options.ordinal = int(ordinal)
except AttributeError as e:
# Handle subproject
- # print("Handle subproject", mount_point)
p = M.Project.query.get(shortname="{}/{}".format(c.project.shortname, mount_point),
neighborhood_id=c.project.neighborhood_id)
if p:
http://git-wip-us.apache.org/repos/asf/allura/blob/90525e75/Allura/docs/api-rest/api.raml
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/api.raml b/Allura/docs/api-rest/api.raml
index 2f54f02..4514a2e 100755
--- a/Allura/docs/api-rest/api.raml
+++ b/Allura/docs/api-rest/api.raml
@@ -558,7 +558,7 @@ documentation:
description: |
Returns status: busy or ready
is: [ bearerAuth ]
- /{project}/webhooks:
+ /{tool}/webhooks:
type: {
typedCollection: {
example: !include examples/webhooks.json,
@@ -604,7 +604,6 @@ documentation:
type: string
description: |
Unique identifier for a webhook.
-
get:
description: |
View a webhook
@@ -667,15 +666,55 @@ documentation:
required: false
description: |
"first", "last", or "alpha_tool" for position with respect to existing tools (or existing tools of the same type for "alpha_tool")
- /tools:
+ /mount_order:
description: |
- Gets a list of installable tools for a project
-
- returns dict with two fields:
- success: False if error is occurred, otherwise True
- info: success or error message
+ Save tool/subproject order for multiple tools at once. *Authentication Required*.
+ post:
+ is: [ bearerAuth ]
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ 1:
+ description: Mount point name for the first position.
+ example: tickets
+ type: string
+ 2:
+ description: Mount point name for the second position.
+ example: our-news
+ type: string
+ 3:
+ description: Mount point name for the third position.
+ example: documentation
+ type: string
+ 4...:
+ description: Etc.
+ /configure_tool_grouping:
+ description: |
+ Set the nav bar grouping threshold. *Authentication Required*.
+ post:
+ is: [ bearerAuth ]
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ grouping_threshold:
+ description: Value for the grouping threshold.
+ example: 1
+ type: number
+ /installable_tools:
+ description: |
+ List of installable tools and their default options. *Authentication Required*.
get:
-
+ is: [ bearerAuth ]
+ /admin_options:
+ description: |
+ List of links to admin pages or modal content, for a specific tool. *Authentication Required*.
+ get:
+ is: [ bearerAuth ]
+ queryParameters:
+ mount_point:
+ type: string
+ description: |
+ The mount point to specify which tool.
/u/{username}:
description: |