You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/08/14 18:11:14 UTC
[04/13] allura git commit: [#6797] initial RAML, written by Heith
[#6797] initial RAML, written by Heith
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/459af1ba
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/459af1ba
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/459af1ba
Branch: refs/heads/hs/6797
Commit: 459af1ba0ee05ae78a3814fe748c525609880c4e
Parents: 2f144a9
Author: Dave Brondsema <da...@brondsema.net>
Authored: Fri Aug 7 16:05:56 2015 -0400
Committer: Heith Seewald <hs...@hsmb.local>
Committed: Fri Aug 14 09:35:28 2015 -0400
----------------------------------------------------------------------
Allura/docs/api-rest/api.raml | 617 +++++++++++++++++++
Allura/docs/api-rest/examples/blog.json | 19 +
Allura/docs/api-rest/examples/blogPost.json | 20 +
Allura/docs/api-rest/examples/discussion.json | 58 ++
Allura/docs/api-rest/examples/link.json | 1 +
Allura/docs/api-rest/examples/page.json | 18 +
Allura/docs/api-rest/examples/project.json | 144 +++++
.../docs/api-rest/examples/searchedTickets.json | 126 ++++
Allura/docs/api-rest/examples/ticket.json | 65 ++
Allura/docs/api-rest/examples/tickets.json | 150 +++++
Allura/docs/api-rest/examples/user.json | 75 +++
Allura/docs/api-rest/examples/userProfile.json | 56 ++
Allura/docs/api-rest/examples/webhook.json | 7 +
Allura/docs/api-rest/examples/webhooks.json | 24 +
Allura/docs/api-rest/examples/wiki.json | 28 +
Allura/docs/api-rest/resourceTypes.yaml | 150 +++++
Allura/docs/api-rest/schemas/blog.json | 37 ++
Allura/docs/api-rest/schemas/blogPost.json | 75 +++
Allura/docs/api-rest/schemas/discussion.json | 103 ++++
Allura/docs/api-rest/schemas/hasPermission.json | 12 +
Allura/docs/api-rest/schemas/link.json | 12 +
Allura/docs/api-rest/schemas/page.json | 63 ++
Allura/docs/api-rest/schemas/project.json | 179 ++++++
.../docs/api-rest/schemas/searchedTickets.json | 210 +++++++
Allura/docs/api-rest/schemas/ticket.json | 180 ++++++
Allura/docs/api-rest/schemas/tickets.json | 163 +++++
Allura/docs/api-rest/schemas/user.json | 196 ++++++
Allura/docs/api-rest/schemas/userProfile.json | 266 ++++++++
Allura/docs/api-rest/schemas/webhook.json | 34 +
Allura/docs/api-rest/schemas/webhooks.json | 57 ++
Allura/docs/api-rest/schemas/wiki.json | 16 +
Allura/docs/api-rest/securitySchemes.yaml | 8 +
Allura/docs/api-rest/traits.yaml | 80 +++
33 files changed, 3249 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/api.raml
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/api.raml b/Allura/docs/api-rest/api.raml
new file mode 100755
index 0000000..b22c117
--- /dev/null
+++ b/Allura/docs/api-rest/api.raml
@@ -0,0 +1,617 @@
+#%RAML 0.8
+---
+title: Apache Allura
+version: 1
+baseUri: https://{domain}/rest
+
+resourceTypes: !include resourceTypes.yaml
+traits: !include traits.yaml
+securitySchemes: !include securitySchemes.yaml
+
+baseUriParameters:
+ domain:
+ description: "The website domain"
+ example: "forge-allura.apache.org"
+ default: "forge-allura.apache.org"
+
+
+/{neighborhood}:
+ description: |
+ Neighborhoods are groups of logically related projects, which have the same default options.
+
+ uriParameters:
+ neighborhood:
+ example: p
+ description: |
+ Allura has two default neighborhoods: **“Projects”** `/p` and **“Users”** `/u`.
+ More information can be found [here](https://forge-allura.apache.org/docs/getting_started/using.html?highlight=neighborhood#what-are-neighborhoods)
+
+ /has_access:
+ type: permission
+
+ /{project}:
+ description: |
+ Get or modify existing projects.
+ uriParameters:
+ project:
+ description: "The Apache Allura Project."
+ example: "allura"
+ pattern: ([a-zA-Z]+)
+
+ type: {
+ project: {
+ schema: !include schemas/project.json,
+ example: !include examples/project.json
+ }
+ }
+
+ /has_access:
+ type: permission
+
+ /{link}:
+ description: |
+ Represents the External Link tool.
+ type: {
+ tool: {
+ example: !include examples/link.json,
+ schema: !include schemas/link.json
+ }
+ }
+
+ get:
+ description: |
+ Returns the existing url.
+
+ post:
+ description: |
+ Updates the url. *authentication required*.
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ url:
+ description: |
+ The url you would like to update to.
+ type: string
+ example: http://google.com
+
+ /{blog}:
+ type: {
+ tool: {
+ example: !include examples/blog.json,
+ schema: !include schemas/blog.json
+ }
+ }
+ description: |
+ Represents the **Blog tool**
+
+ displayName: Blog
+ uriParameters:
+ blog:
+ displayName: Blog Name
+ type: string
+ example: blog
+
+ get:
+ description: |
+ Returns a list of posts, including title and API url.
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: !include schemas/blog.json
+ example: !include examples/blog.json
+ post:
+ description: |
+ Creates a new blog post.
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ title:
+ description: |
+ The title of the post.
+ type: string
+ example: New API docs released!
+ text:
+ description: |
+ The text of the post.
+ type: string
+ example: Lots of text here describing apis!\nThat is all.
+ labels:
+ description: |
+ Labels of the post -- comma seperated strings
+ type: string
+ example: api,development
+ state:
+ description: |
+ Draft or published.
+ enum: [draft, published]
+ type: string
+ example: published
+
+ /{year}/{month}/{title}:
+ type: {
+ tool: {
+ example: !include examples/blogPost.json,
+ schema: !include schemas/blogPost.json
+ }
+ }
+ displayName: Blog Post
+ uriParameters:
+ year:
+ displayName: Year
+ type: number
+ example: 2015
+ month:
+ displayName: Month
+ type: number
+ example: 04
+ title:
+ displayName: Title
+ type: string
+ example: project-insights
+
+ post:
+ description: |
+ Updates an existing blog post.
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ title:
+ description: |
+ The title of the post.
+ type: string
+ text:
+ description: |
+ The text of the post.
+ type: string
+ labels:
+ description: |
+ Labels of the post -- comma seperated strings
+ type: string
+ state:
+ description: |
+ Draft or published.
+ enum: [draft, published]
+ type: string
+
+ /has_access:
+ type: permission
+
+ /{forum}:
+ description: |
+ A list of forums
+ type: {
+ tool: {
+ example: !include examples/page.json,
+ schema: !include schemas/page.json
+ }
+ }
+
+ displayName: forum
+ uriParameters:
+ forum:
+ displayName: Forum Name
+ type: string
+ example: general
+ description: |
+ Returns a list of forums, including name, description, num_posts, API URL, and last_post details
+
+ To view more than 100 threads, or 100 posts in a thread, use the pagination support of the API by adding ?page=1 etc. to the URL.
+
+ /forum:
+ description: |
+ returns a limited list of topics in the forum, with fields for subject, num_replies, API URL, and last_post
+ /{slug}:
+ description: |
+ returns a limited list of posts in the thread, with fields for author, text, and timestamp. Nested posts (i.e. a reply to a post) can be determined by the slug structure. For example, "slug": "0a0b/9f00" is a reply to the post with "slug": "0a0b"
+
+ /has_access:
+ type: permission
+
+ /{discussion}:
+ description: |
+ Represents the **Discussion Tool**.
+ type: {
+ tool: {
+ schema: !include schemas/discussion.json,
+ example: !include examples/discussion.json
+
+ }
+ }
+
+ displayName: Discussion
+ uriParameters:
+ discussion:
+ displayName: Discussion Name
+ type: string
+ example: "discussion"
+
+ /{forum}:
+ type: {
+ tool: {
+ example: !include examples/page.json,
+ schema: !include schemas/page.json
+ }
+ }
+
+ displayName: forum
+ uriParameters:
+ forum:
+ displayName: Forum Name
+ type: string
+ example: general
+
+ /has_access:
+ type: permission
+
+ /{wiki}:
+ description: |
+ Represents the **Wiki Tool**.
+ type: {
+ tool: {
+ example: !include examples/wiki.json,
+ schema: !include schemas/wiki.json
+ }
+ }
+
+ displayName: Wiki
+ uriParameters:
+ wiki:
+ displayName: Wiki Name
+ type: string
+ example: wiki
+
+
+ /{title}:
+ type: {
+ tool: {
+ example: !include examples/page.json,
+ schema: !include schemas/page.json
+ }
+ }
+
+ displayName: Title
+ uriParameters:
+ title:
+ displayName: Wiki Title
+ type: string
+ example: Extensions
+ get:
+ description: |
+ returns a JSON representation of a page
+ post:
+ description: |
+ Creates or updates the titled page.
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ text:
+ description: |
+ Page text.
+ type: string
+ labels:
+ description: |
+ Comma-separated list of page labels.
+ type: string
+
+
+ /has_access:
+ type: permission
+
+ /{tracker}:
+ description: |
+ Represents the **Ticket Tracker Tool**.
+ type: {
+ tool: {
+ example: !include examples/tickets.json,
+ schema: !include schemas/ticket.json
+ }
+ }
+ is: [pageable]
+
+ displayName: Tracker Url
+ uriParameters:
+ tracker:
+ displayName: Tracker Name
+ type: string
+ example: tickets
+
+ get:
+ is: [pageable]
+ description: |
+ Get a list of tickets
+
+ /_discuss:
+ description: |
+ returns summary information about the tool discussion, including the threads in the discussion (there is one thread per ticket)
+ get:
+
+ /thread/{threadId}:
+ uriParameters:
+ threadId:
+ displayName: Thread ID
+ type: string
+ example: f78b98a0
+
+ get:
+ description: |
+ returns summary information about a thread, including the posts in a thread
+ /{slug}:
+ uriParameters:
+ slug:
+ displayName: Slug
+ type: string
+ example: 9133
+ get:
+ description: |
+ returns detailed information about a post
+ /reply:
+ description: |
+ create a threaded reply to the given post
+ post:
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ text:
+ description: the text of the reply
+ example: |
+ I *agree* with you.
+ required: true
+ type: string
+ /new:
+ description: |
+ create a post in the given thread
+ post:
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ text:
+ description: The text of the new post
+ example: |
+ This is a new post!
+ required: true
+ type: string
+
+ /search:
+ type: {
+ searchableCollection: {
+ queryParamName: q,
+ schema: !include schemas/searchedTickets.json,
+ example: !include examples/searchedTickets.json
+ }
+ }
+ is: [ pageable]
+
+ /new:
+ description: |
+ Creates a new ticket.
+ post:
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ access_token:
+ description: "The access token provided by the authentication application"
+ required: true
+ type: string
+ ticket_form.summary:
+ description: Ticket title
+ type: string
+ required: false
+ ticket_form.description:
+ description: ticket description
+ type: string
+ required: false
+ ticket_form.assigned_to::
+ type: string
+ required: false
+ description: username of ticket assignee
+ ticket_form.labels:
+ type: string
+ required: false
+ description: comma-separated list of ticket labels
+ ticket_form.attachment:
+ type: file
+ description: (optional) attachment
+ required: false
+ ticket_form.custom field name:
+ description: custom field value
+ type: string
+ required: false
+
+ /{ticketNumber}:
+ type: {
+ tool: {
+ example: !include examples/ticket.json,
+ schema: !include schemas/ticket.json
+
+ }
+ }
+ displayName: Ticket Number
+ uriParameters:
+ ticketNumber:
+ example: 1
+ description: |
+ Get a details of a ticket.
+
+ /save:
+ description: |
+ updates an existing ticket
+ parameters are the same as /rest/p/project_name/mount_point/new
+
+ post:
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ access_token:
+ description: "The access token provided by the authentication application"
+ required: true
+ type: string
+ ticket_form.summary:
+ description: Ticket title
+ type: string
+ required: false
+ ticket_form.description:
+ description: ticket description
+ type: string
+ required: false
+ ticket_form.assigned_to::
+ type: string
+ required: false
+ description: username of ticket assignee
+ ticket_form.labels:
+ type: string
+ required: false
+ description: comma-separated list of ticket labels
+ ticket_form.attachment:
+ type: file
+ description: (optional) attachment
+ required: false
+ ticket_form.custom field name:
+ description: custom field value
+ type: string
+ required: false
+
+ /has_access:
+ type: permission
+
+
+ /admin:
+ description: |
+ Endpoints for **project exporting** and managing **webhooks**
+
+ /export:
+ description: |
+ Generates a full bulk export of your tool(s) in the same format as the API for individual access. Authentication required. Here is an [example shell](https://forge-allura.apache.org/p/allura/git/ci/master/tree/scripts/project_export) script using these APIs, suitable to run as a cron job.
+ post:
+ description: |
+ Submits an export job
+
+ **400 Bad Request:** tools parameter not provided or is invalid
+ **503 Service Unavailable:** an export job is already running
+ **200 OK:** job submitted. Body will be: *{"status": "in progress", "filename": FILENAME}*
+ /export_status:
+ description: |
+ Check status of a bulk export job
+ get:
+ description: |
+ Returns status: busy or ready
+
+ /{project}/webhooks:
+ type: {
+ typedCollection: {
+ example: !include examples/webhooks.json,
+ schema: !include schemas/webhook.json
+ }
+ }
+ is: [secured]
+ description: |
+ This is to manage webhooks programatically. See the [Webhook docs](https://forge-allura.apache.org/p/allura/wiki/Webhooks/) for more information.
+
+ The webhook payloads and signature verification method are documented at https://forge-allura.apache.org/p/allura/wiki/Webhooks/
+
+
+ /{type}:
+ uriParameters:
+ type:
+ example: repo-push
+ enum: [repo-push]
+ description: |
+ Allura supports one type of webhook for the moment - repo-push, triggered when a repository receives new commits. It is supported for Git, Mercurial and SVN repositories.
+ post:
+ description: |
+ Create a new webhook.
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ url:
+ description: |
+ The url to call when the the webhook is triggered.
+ required: true
+ type: string
+ /{id}:
+ uriParameters:
+ id:
+ type: string
+ description: |
+ Unique identifier for a webhook.
+
+ get:
+ description: |
+ View a webhook
+ post:
+ description: |
+ Update an existing webhook
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ url:
+ description: |
+ The url to call when the the webhook is triggered.
+ required: true
+ type: string
+ secret:
+ description: |
+ Optionally supply your own secret.
+
+ Note: DO NOT ever expose your secret!
+ required: false
+ type: string
+ delete:
+ description: |
+ Delete an existing webhook
+ /install_tool:
+ description: |
+ Adds a new tool to the project. *Authentication Required*.
+
+ returns dict with two fields:
+ success: False if error is occurred, otherwise True
+ info: success or error message
+ post:
+ body:
+ application/x-www-form-urlencoded:
+ formParameters:
+ tool:
+ description: Tool name that you want to install.
+ example: tickets
+ enum: [tickets, link, git, svn, mercurial, blog, discussion, subproject, wiki]
+ required: true
+ type: string
+ mount_point:
+ description: |
+ The section of the url relitive to your project. For example: /p/your_project/{mount_point}
+ example: git
+ type: string
+ required: true
+ mount_label:
+ description: |
+ How your tool will be displayed in your project (like a "nice name" for the tool).
+ example: Git
+ type: string
+ required: true
+ order:
+ type: string
+ enum: [first, last, alpha_tool]
+ 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")
+
+ /{username}:
+ description: |
+ Represents a user (returns a project-like response).
+
+ Most often you'll use the /profile suffix to return user data.
+ type: {
+ tool:{
+ example: !include examples/user.json,
+ schema: !include schemas/user.json
+ }
+ }
+ /profile:
+ description: |
+ A user profile
+ type: {
+ tool:{
+ example: !include examples/userProfile.json,
+ schema: !include schemas/userProfile.json
+ }
+ }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/blog.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/blog.json b/Allura/docs/api-rest/examples/blog.json
new file mode 100755
index 0000000..5eb25dd
--- /dev/null
+++ b/Allura/docs/api-rest/examples/blog.json
@@ -0,0 +1,19 @@
+{
+ "count": 3,
+ "limit": 10,
+ "page": 0,
+ "posts": [
+ {
+ "title": "Project Insights",
+ "url": "http://localhost:8080/rest/p/finna/blog/2015/07/project-insights/"
+ },
+ {
+ "title": "New blog",
+ "url": "http://localhost:8080/rest/p/finna/blog/2015/07/new-blog/"
+ },
+ {
+ "title": "Old News",
+ "url": "http://localhost:8080/rest/p/finna/blog/2015/07/old-news/"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/blogPost.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/blogPost.json b/Allura/docs/api-rest/examples/blogPost.json
new file mode 100755
index 0000000..d3a41da
--- /dev/null
+++ b/Allura/docs/api-rest/examples/blogPost.json
@@ -0,0 +1,20 @@
+{
+ "_id": "55ad27204d21224d82656b45",
+ "author": "root",
+ "discussion_thread": {
+ "_id": "afb74fce",
+ "discussion_id": "55ad26e94d21224d82656b31",
+ "posts": [],
+ "subject": "New blog discussion"
+ },
+ "discussion_thread_url": "http://localhost:8080/rest/p/finna/blog/_discuss/thread/afb74fce/",
+ "labels": [
+ "general"
+ ],
+ "mod_date": "2015-07-20 16:51:44.589000",
+ "related_artifacts": [],
+ "state": "published",
+ "text": "Just made a new blog here",
+ "title": "New blog",
+ "url": "http://localhost:8080/rest/p/finna/blog/2015/07/new-blog/"
+}
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/discussion.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/discussion.json b/Allura/docs/api-rest/examples/discussion.json
new file mode 100755
index 0000000..128269b
--- /dev/null
+++ b/Allura/docs/api-rest/examples/discussion.json
@@ -0,0 +1,58 @@
+{
+ "count": 3,
+ "forums": [
+ {
+ "num_topics": 1,
+ "name": "Dev Only",
+ "url": "http://localhost:8080/rest/p/finna/discussion/devs/",
+ "shortname": "devs",
+ "_id": "55ad23c34d21224d82656add",
+ "last_post": {
+ "flagged_by": [],
+ "status": "ok",
+ "last_edited": "2015-07-20 16:39:53.290000",
+ "author": "root",
+ "timestamp": "2015-07-20 16:39:46.083000",
+ "thread_id": "2adb0c35",
+ "text": "checking into it.",
+ "author_id": "55687b5f4d2122410c76eb92",
+ "_id": "83aa16ca9db9f811d68ba47285c3d4c65b4f60d7.discussion@finna.p.localhost",
+ "slug": "c5af",
+ "subject": "Potential issue"
+ },
+ "description": "not open to public!"
+ },
+ {
+ "num_topics": 2,
+ "name": "General Discussion",
+ "url": "http://localhost:8080/rest/p/finna/discussion/general/",
+ "shortname": "general",
+ "_id": "5568f6684d212236d1eaed07",
+ "last_post": {
+ "flagged_by": [],
+ "status": "ok",
+ "last_edited": null,
+ "author": "root",
+ "timestamp": "2015-07-20 16:36:18.019000",
+ "thread_id": "a7528751",
+ "text": "How to fix anything!",
+ "author_id": "55687b5f4d2122410c76eb92",
+ "_id": "b248780c7fa265106dc91e6004107dd4a601afe8.discussion@finna.p.localhost",
+ "slug": "c920",
+ "subject": "Tech Support"
+ },
+ "description": "Forum about anything you want to talk about."
+ },
+ {
+ "num_topics": 0,
+ "name": "Off Topic",
+ "url": "http://localhost:8080/rest/p/finna/discussion/off-topic/",
+ "shortname": "off-topic",
+ "_id": "55ad23a44d21224d82656ada",
+ "last_post": null,
+ "description": "anything else...."
+ }
+ ],
+ "limit": 25,
+ "page": 0
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/link.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/link.json b/Allura/docs/api-rest/examples/link.json
new file mode 100755
index 0000000..f0f351c
--- /dev/null
+++ b/Allura/docs/api-rest/examples/link.json
@@ -0,0 +1 @@
+{"url": "https://google.com"}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/page.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/page.json b/Allura/docs/api-rest/examples/page.json
new file mode 100755
index 0000000..e40e9d8
--- /dev/null
+++ b/Allura/docs/api-rest/examples/page.json
@@ -0,0 +1,18 @@
+{
+ "related_artifacts": [
+ "/p/allura/wiki/Home/"
+ ],
+ "attachments": [],
+ "title": "Extensions",
+ "text": "The following extensions for Allura are available as separate packages:\r\n\r\nType | Title | License | Notes\r\n----- | ------------- | ----- | Notes\r\nTool | [ForgeHg](http://pypi.python.org/pypi/ForgeHg) | GPLv2 | Maintained by the Allura developers.\u003Cbr> Separate package due to Hg GPL license.\r\nTool | [Pastebin](https://sourceforge.net/p/forgepastebin/) | Apache 2 | Maintained by the Allura developers.\u003Cbr> Example of writing a simple tool.\r\nTool | [Donay Incentify](http://docs.donay.com/display/Dosense/Installing+Incentify+in+Allura) | Apache 2\r\nTool | [Bitergia metrics](https://github.com/Bitergia/AlluraBitergiaMetrics) | Apache 2\r\nTool | [Perforce SCM](https://sourceforge.net/p/p4allura/allura-fork/ci/master/tree/ForgeP4/)\r\nTool | [Django Allura](https://github.com/rick446/DjangoAllura)\r\nImporter | [Google Code Wiki Importer](http://pypi.python.org/pypi/googlecodewikiimporter/) | GPLv3 | Maintained by the Allura developers.\u003C
br> Separate package due to `html2text` GPL.\r\nImporter | [Trac Wiki Importer](http://pypi.python.org/pypi/tracwikiimporter/) | GPLv3 | Maintained by the Allura developers.\u003Cbr> Separate package due to `html2text` GPL.\r\nImporter | [Mediawiki data importer](http://pypi.python.org/pypi/mediawikiimporter/) | GPLv3 | Maintained by the Allura developers.\u003Cbr> Separate package due to `html2text` GPL.\r\nExternal Integration | [TeamCity](https://github.com/Vampire/teamcity-sourceforge) | Apache 2 | Targeted at SourceForge.net but APIs are the same, so base domain could be changed to any Allura host.\r\n",
+ "labels": [],
+ "discussion_thread": {
+ "_id": "9d181a1d",
+ "posts": [],
+ "discussion_id": "523331da6d19cd54e56931db",
+ "subject": ""
+ },
+ "mod_date": "2015-07-07 17:30:01.607000",
+ "_id": "523332d96d19cd54e569322b",
+ "discussion_thread_url": "https://forge-allura.apache.org/rest/p/allura/wiki/_discuss/thread/9d181a1d/"
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/project.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/project.json b/Allura/docs/api-rest/examples/project.json
new file mode 100755
index 0000000..6744d30
--- /dev/null
+++ b/Allura/docs/api-rest/examples/project.json
@@ -0,0 +1,144 @@
+{
+ "status": "active",
+ "preferred_support_tool": "",
+ "preferred_support_url": "",
+ "labels": [],
+ "private": false,
+ "creation_date": "2013-02-12",
+ "socialnetworks": [
+ {
+ "accounturl": "",
+ "socialnetwork": "Twitter"
+ },
+ {
+ "accounturl": null,
+ "socialnetwork": "Facebook"
+ }
+ ],
+ "tools": [
+ {
+ "mount_point": "activity",
+ "name": "activity",
+ "label": "Activity"
+ },
+ {
+ "mount_point": "git",
+ "name": "git",
+ "label": "Git"
+ },
+ {
+ "mount_point": "allura-dev",
+ "name": "link",
+ "label": "Mailing List (dev)"
+ },
+ {
+ "mount_point": "wiki",
+ "name": "wiki",
+ "label": "Wiki"
+ },
+ {
+ "mount_point": "docs",
+ "name": "link",
+ "label": "Docs"
+ },
+ {
+ "mount_point": "license",
+ "name": "link",
+ "label": "License"
+ },
+ {
+ "mount_point": "apache",
+ "name": "link",
+ "label": "Apache.org"
+ },
+ {
+ "mount_point": "security",
+ "name": "link",
+ "label": "Security"
+ },
+ {
+ "mount_point": "thanks",
+ "name": "link",
+ "label": "Thanks"
+ },
+ {
+ "mount_point": "sponsorship",
+ "name": "link",
+ "label": "Sponsorship"
+ },
+ {
+ "mount_point": "tickets",
+ "name": "tickets",
+ "label": "Tickets"
+ },
+ {
+ "mount_point": "AlluraSite",
+ "name": "git",
+ "label": "Allura Site Repo"
+ },
+ {
+ "mount_point": "pastebin",
+ "name": "pastebin",
+ "label": "Pastebin"
+ }
+ ],
+ "categories": {
+ "developmentstatus": [],
+ "environment": [],
+ "language": [],
+ "license": [],
+ "database": [],
+ "topic": [],
+ "audience": [],
+ "translation": [],
+ "os": []
+ },
+ "_id": "511aa1d46d19cd14f9060c67",
+ "name": "Apache Allura™",
+ "url": "https://forge-allura.apache.org/p/allura/",
+ "icon_url": "https://forge-allura.apache.org/p/allura/icon",
+ "video_url": "www.youtube.com/embed/va9WPbKAI9U?rel=0",
+ "screenshots": [],
+ "summary": "Forge software for hosting software projects",
+ "short_description": "Apache Allura is an open source implementation of a software \"forge\", a web site that manages source code repositories, bug reports, discussions, wiki pages, blogs and more for any number of individual projects.",
+ "moved_to_url": "",
+ "shortname": "allura",
+ "developers": [
+ {
+ "url": "https://forge-allura.apache.org/u/masterbunnyfu/",
+ "username": "masterbunnyfu",
+ "name": "Cory Johns"
+ },
+ {
+ "url": "https://forge-allura.apache.org/u/jetmind/",
+ "username": "jetmind",
+ "name": "Igor Bondarenko"
+ },
+ {
+ "url": "https://forge-allura.apache.org/u/wwitzel3/",
+ "username": "wwitzel3",
+ "name": "Wayne Witzel III"
+ },
+ {
+ "url": "https://forge-allura.apache.org/u/alexluberg/",
+ "username": "alexluberg",
+ "name": "Alexander Luberg"
+ },
+ {
+ "url": "https://forge-allura.apache.org/u/vansteenburgh/",
+ "username": "vansteenburgh",
+ "name": "Tim Van Steenburgh"
+ },
+ {
+ "url": "https://forge-allura.apache.org/u/heiths/",
+ "username": "heiths",
+ "name": "Heith Seewald"
+ },
+ {
+ "url": "https://forge-allura.apache.org/u/brondsem/",
+ "username": "brondsem",
+ "name": "Dave Brondsema"
+ }
+ ],
+ "external_homepage": "http://allura.apache.org/"
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/searchedTickets.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/searchedTickets.json b/Allura/docs/api-rest/examples/searchedTickets.json
new file mode 100755
index 0000000..a5502c5
--- /dev/null
+++ b/Allura/docs/api-rest/examples/searchedTickets.json
@@ -0,0 +1,126 @@
+{
+ "sort": null,
+ "count": 2,
+ "filter_choices": {
+ "status": [
+ [
+ "closed",
+ 4
+ ],
+ [
+ "in-progress",
+ 5
+ ],
+ [
+ "open",
+ 2
+ ],
+ [
+ "review",
+ 3
+ ]
+ ],
+ "reported_by": [
+ [
+ "brondsem",
+ 5
+ ],
+ [
+ "ctsai",
+ 1
+ ],
+ [
+ "heiths",
+ 7
+ ],
+ [
+ "jetmind",
+ 1
+ ]
+ ],
+ "_milestone": [
+ [
+ "unreleased",
+ 14
+ ]
+ ],
+ "assigned_to": [
+ [
+ "brondsem",
+ 1
+ ],
+ [
+ "heiths",
+ 4
+ ],
+ [
+ "jetmind",
+ 7
+ ]
+ ]
+ },
+ "filter": {},
+ "q": "labels:\"sf-current\"",
+ "solr_error": null,
+ "limit": 100,
+ "tickets": [
+ {
+ "status": "review",
+ "reported_by_id": "548b2d136d19cd59705380a3",
+ "related_artifacts": [],
+ "attachments": [],
+ "reported_by": "heiths",
+ "assigned_to": "heiths",
+ "labels": [
+ "sf-current",
+ "sf-2"
+ ],
+ "discussion_disabled": false,
+ "assigned_to_id": "548b2d136d19cd59705380a3",
+ "private": false,
+ "summary": "Fix pagination issue in the commit browser",
+ "mod_date": "2015-07-17 14:53:43.480000",
+ "votes_down": 0,
+ "votes_up": 0,
+ "_id": "55a6c6c86d19cd7d2dc5d89d",
+ "discussion_thread_url": "https://forge-allura.apache.org/rest/p/allura/tickets/_discuss/thread/3e30246e/",
+ "ticket_num": 7932,
+ "custom_fields": {
+ "_component": "General",
+ "_milestone": "unreleased",
+ "_reviewer": ""
+ },
+ "created_date": "2015-07-15 20:47:04.434000"
+ },
+ {
+ "status": "closed",
+ "reported_by_id": "511aa8756d19cd161e8c1b04",
+ "related_artifacts": [],
+ "attachments": [],
+ "reported_by": "brondsem",
+ "assigned_to": "brondsem",
+ "labels": [
+ "sf-current",
+ "sf-1",
+ "ux"
+ ],
+ "discussion_disabled": false,
+ "assigned_to_id": "511aa8756d19cd161e8c1b04",
+ "private": false,
+ "summary": "Site admin search tables can overflow the page width",
+ "mod_date": "2015-07-14 08:40:35.931000",
+ "votes_down": 0,
+ "votes_up": 0,
+ "_id": "55a3effc6d19cd320d814749",
+ "discussion_thread_url": "https://forge-allura.apache.org/rest/p/allura/tickets/_discuss/thread/1f1023b2/",
+ "ticket_num": 7928,
+ "custom_fields": {
+ "_component": "General",
+ "_milestone": "unreleased",
+ "_reviewer": "jetmind"
+ },
+ "created_date": "2015-07-13 17:06:04.135000"
+ }
+ ],
+ "page": 0
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/ticket.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/ticket.json b/Allura/docs/api-rest/examples/ticket.json
new file mode 100755
index 0000000..f4ba990
--- /dev/null
+++ b/Allura/docs/api-rest/examples/ticket.json
@@ -0,0 +1,65 @@
+{
+ "ticket": {
+ "status": "review",
+ "reported_by_id": "548b2d136d19cd59705380a3",
+ "related_artifacts": [],
+ "attachments": [],
+ "reported_by": "heiths",
+ "assigned_to": "heiths",
+ "labels": [
+ "sf-2",
+ "sf-current"
+ ],
+ "discussion_disabled": false,
+ "assigned_to_id": "548b2d136d19cd59705380a3",
+ "private": false,
+ "summary": " Speed up diff processing with binary files",
+ "description": "In a git repo with a large amount of binary files, our diff processing can be very inefficient. We should test if a file is binary and exclude it from the diff processing section.",
+ "discussion_thread": {
+ "_id": "8fe1847f",
+ "posts": [
+ {
+ "text": "- **labels**: --> sf-2, sf-current\n",
+ "attachments": [],
+ "author": "brondsem",
+ "timestamp": "2015-07-13 15:53:20.175000",
+ "last_edited": null,
+ "slug": "498b",
+ "subject": "#7925 Speed up diff processing with binary files"
+ },
+ {
+ "text": "- **status**: in-progress --> review\n",
+ "attachments": [],
+ "author": "heiths",
+ "timestamp": "2015-07-16 19:10:50.153000",
+ "last_edited": null,
+ "slug": "bd3e",
+ "subject": "#7925 Speed up diff processing with binary files"
+ },
+ {
+ "text": "QA: **hs/7925**\r\n\r\nBinary files should no longer make XHR requests for diff processing.",
+ "attachments": [],
+ "author": "heiths",
+ "timestamp": "2015-07-16 19:10:50.511000",
+ "last_edited": null,
+ "slug": "b8a7",
+ "subject": "#7925 Speed up diff processing with binary files"
+ }
+ ],
+ "discussion_id": "545186e86d19cd63b88d1604",
+ "subject": ""
+ },
+ "mod_date": "2015-07-16 19:10:50.625000",
+ "votes_down": 0,
+ "votes_up": 0,
+ "_id": "55a3d3736d19cd2cf292db10",
+ "discussion_thread_url": "https://forge-allura.apache.org/rest/p/allura/tickets/_discuss/thread/8fe1847f/",
+ "ticket_num": 7925,
+ "custom_fields": {
+ "_component": "General",
+ "_milestone": "unreleased",
+ "_reviewer": ""
+ },
+ "created_date": "2015-07-13 15:04:19.926000"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/tickets.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/tickets.json b/Allura/docs/api-rest/examples/tickets.json
new file mode 100755
index 0000000..fc0acc9
--- /dev/null
+++ b/Allura/docs/api-rest/examples/tickets.json
@@ -0,0 +1,150 @@
+{
+ "tickets": [
+ {
+ "summary": "Diff view on the Commit Browser should have a file size limit",
+ "ticket_num": 7933
+ },
+ {
+ "summary": "Fix pagination issue in the commit browser",
+ "ticket_num": 7932
+ },
+ {
+ "summary": "Tool install dialog needs to escape html/js",
+ "ticket_num": 7931
+ },
+ {
+ "summary": "Bug: viewing a thread updates project mod_date",
+ "ticket_num": 7930
+ },
+ {
+ "summary": "Enable voting on tickets by default",
+ "ticket_num": 7929
+ }
+ ],
+ "count": 3662,
+ "milestones": [
+ {
+ "due_date": "",
+ "complete": false,
+ "closed": 2316,
+ "default": false,
+ "description": "",
+ "total": 2316,
+ "name": "asf_release_1.0.0"
+ },
+ {
+ "due_date": "",
+ "complete": false,
+ "closed": 0,
+ "default": false,
+ "description": "",
+ "total": 0,
+ "name": "asf_release_1.0.0-RC1"
+ },
+ {
+ "due_date": "",
+ "complete": false,
+ "closed": 66,
+ "default": false,
+ "description": "",
+ "total": 66,
+ "name": "asf_release_1.0.1"
+ },
+ {
+ "due_date": "",
+ "complete": false,
+ "closed": 145,
+ "default": false,
+ "description": "",
+ "total": 145,
+ "name": "asf_release_1.1.0"
+ },
+ {
+ "due_date": "",
+ "complete": false,
+ "closed": 337,
+ "default": "on",
+ "description": "",
+ "total": 891,
+ "name": "unreleased"
+ },
+ {
+ "due_date": "",
+ "complete": false,
+ "closed": 182,
+ "default": false,
+ "description": "",
+ "total": 182,
+ "name": "asf_release_1.2.0"
+ },
+ {
+ "due_date": "",
+ "complete": false,
+ "closed": 13,
+ "default": false,
+ "description": "",
+ "total": 13,
+ "name": "asf_release_1.2.1"
+ },
+ {
+ "due_date": "",
+ "complete": false,
+ "closed": 49,
+ "default": false,
+ "description": "",
+ "total": 49,
+ "name": "asf_release_1.3.0"
+ }
+ ],
+ "tracker_config": {
+ "_id": "545186e86d19cd63b88d1603",
+ "options": {
+ "ordinal": 3,
+ "TicketHelpNew": "",
+ "mount_point": "tickets",
+ "TicketMonitoringType": "AllPublicTicketChanges",
+ "EnableVoting": true,
+ "TicketHelpSearch": "",
+ "TicketMonitoringEmail": "dev@allura.apache.org",
+ "import_id": {
+ "source": "Allura",
+ "app_config_id": "4c3493551be1ce11d8000032"
+ },
+ "mount_label": "Tickets"
+ }
+ },
+ "limit": 5,
+ "saved_bins": [
+ {
+ "sort": "",
+ "_id": "54526f3f6d19cd509a769848",
+ "terms": "labels:bitesize AND (status:open OR status:review OR status:in-progress)",
+ "summary": "Bitesize Tickets"
+ },
+ {
+ "sort": "",
+ "_id": "54526fd16d19cd5093545c7b",
+ "terms": "(assigned_to_s:$USER AND status:(blocked in-progress open)) OR (_reviewer_s:$USER AND status:review)",
+ "summary": "My Assigned Tickets"
+ },
+ {
+ "sort": "",
+ "_id": "545270036d19cd509a76984c",
+ "terms": "reported_by:$USER AND NOT status:closed",
+ "summary": "My Submitted Tickets"
+ },
+ {
+ "sort": "",
+ "_id": "54526ef86d19cd42f87fbb80",
+ "terms": "status:review",
+ "summary": "Needs Review"
+ },
+ {
+ "sort": "",
+ "_id": "5452703a6d19cd509a769850",
+ "terms": "labels:\"sf-current\"",
+ "summary": "SourceForge current sprint"
+ }
+ ],
+ "page": 0
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/user.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/user.json b/Allura/docs/api-rest/examples/user.json
new file mode 100755
index 0000000..1c9632f
--- /dev/null
+++ b/Allura/docs/api-rest/examples/user.json
@@ -0,0 +1,75 @@
+{
+ "status": "active",
+ "preferred_support_tool": "",
+ "profile_api_url": "https://forge-allura.apache.org/rest/u/heiths/profile/",
+ "preferred_support_url": "",
+ "labels": [],
+ "private": false,
+ "creation_date": "2014-12-12",
+ "socialnetworks": [
+ {
+ "accounturl": "",
+ "socialnetwork": "Twitter"
+ },
+ {
+ "accounturl": "",
+ "socialnetwork": "Facebook"
+ }
+ ],
+ "tools": [
+ {
+ "mount_point": "admin",
+ "name": "admin",
+ "label": "Admin"
+ },
+ {
+ "mount_point": "wiki",
+ "name": "wiki",
+ "label": "Wiki"
+ },
+ {
+ "mount_point": "profile",
+ "name": "profile",
+ "label": "Profile"
+ },
+ {
+ "mount_point": "search",
+ "name": "search",
+ "label": "Search"
+ },
+ {
+ "mount_point": "activity",
+ "name": "activity",
+ "label": "Activity"
+ }
+ ],
+ "categories": {
+ "developmentstatus": [],
+ "environment": [],
+ "language": [],
+ "license": [],
+ "database": [],
+ "topic": [],
+ "audience": [],
+ "translation": [],
+ "os": []
+ },
+ "_id": "548b2d136d19cd59705380a6",
+ "name": "u/heiths",
+ "url": "https://forge-allura.apache.org/u/heiths/",
+ "icon_url": null,
+ "video_url": "",
+ "screenshots": [],
+ "summary": "",
+ "short_description": null,
+ "moved_to_url": "",
+ "shortname": "u/heiths",
+ "developers": [
+ {
+ "url": "https://forge-allura.apache.org/u/heiths/",
+ "username": "heiths",
+ "name": "Heith Seewald"
+ }
+ ],
+ "external_homepage": ""
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/userProfile.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/userProfile.json b/Allura/docs/api-rest/examples/userProfile.json
new file mode 100755
index 0000000..ef04a94
--- /dev/null
+++ b/Allura/docs/api-rest/examples/userProfile.json
@@ -0,0 +1,56 @@
+{
+ "username": "heiths",
+ "name": "Heith Seewald",
+ "localization": {
+ "city": "Grand Rapids Area",
+ "country": "United States"
+ },
+ "skills": [
+ {
+ "comment": "asdf",
+ "skill": {
+ "fullpath": "Programming Language",
+ "fullname": "Programming Language",
+ "shortname": "language",
+ "id": 160
+ },
+ "level": "high"
+ }
+ ],
+ "webpages": [],
+ "joined": "2014-12-12 17:59:47+00:00",
+ "socialnetworks": [
+ {
+ "accounturl": "www.linkedin.com/in/heiths/",
+ "socialnetwork": "Linkedin"
+ },
+ {
+ "accounturl": "heiths",
+ "socialnetwork": "Google+"
+ }
+ ],
+ "telnumbers": [],
+ "sex": "Male",
+ "availability": [
+ {
+ "start_time": {
+ "h": 3,
+ "m": 30
+ },
+ "week_day": "Thursday",
+ "end_time": {
+ "h": 4,
+ "m": 45
+ }
+ }
+ ],
+ "projects": [
+ {
+ "url": "/p/allura/",
+ "last_updated": "2015-07-28 16:40:57.701000",
+ "name": "Apache Allura™",
+ "summary": "Forge software for hosting software projects"
+ }
+ ],
+ "skypeaccount": null
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/webhook.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/webhook.json b/Allura/docs/api-rest/examples/webhook.json
new file mode 100755
index 0000000..68f4d9c
--- /dev/null
+++ b/Allura/docs/api-rest/examples/webhook.json
@@ -0,0 +1,7 @@
+{
+ "hook_url": "http://hs.dev:9999/push-it/",
+ "mod_date": "2015-07-24 16:44:03.871000",
+ "url": "http://localhost:8080/rest/p/finna/admin/finna/webhooks/repo-push/55ae876e4d21222df298086e",
+ "_id": "55ae876e4d21222df298086e",
+ "type": "repo-push"
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/webhooks.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/webhooks.json b/Allura/docs/api-rest/examples/webhooks.json
new file mode 100755
index 0000000..7b30059
--- /dev/null
+++ b/Allura/docs/api-rest/examples/webhooks.json
@@ -0,0 +1,24 @@
+{
+ "webhooks": [
+ {
+ "url": "http://localhost:8080/rest/p/finna/admin/finna/webhooks/repo-push/55ae874a4d21222df2980868",
+ "mod_date": "2015-07-21 17:54:18.066000",
+ "_id": "55ae874a4d21222df2980868",
+ "type": "repo-push",
+ "hook_url": "http://hs.dev:9999/webhooks/"
+ },
+ {
+ "url": "http://localhost:8080/rest/p/finna/admin/finna/webhooks/repo-push/55ae876e4d21222df298086e",
+ "mod_date": "2015-07-21 17:54:54.836000",
+ "_id": "55ae876e4d21222df298086e",
+ "type": "repo-push",
+ "hook_url": "http://hs.dev:9999/push-it/"
+ }
+ ],
+ "limits": {
+ "repo-push": {
+ "max": 3,
+ "used": 2
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/examples/wiki.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/examples/wiki.json b/Allura/docs/api-rest/examples/wiki.json
new file mode 100755
index 0000000..f5c81c4
--- /dev/null
+++ b/Allura/docs/api-rest/examples/wiki.json
@@ -0,0 +1,28 @@
+{
+ "pages": [
+ "ASF Release Guidelines",
+ "Allura Deployments",
+ "Allura Wiki",
+ "Apache Allura (incubating) Wiki",
+ "Apache Allura™ (incubating) Wiki",
+ "Asking Questions",
+ "Contributing Code",
+ "Contributing to the Discussion",
+ "Extensions",
+ "FAQ",
+ "Feature Comparison",
+ "Features",
+ "Goals",
+ "Google Summer of Code",
+ "HTTP(S) Repositories",
+ "Home",
+ "Install and Run Allura - Vagrant",
+ "Notes",
+ "Our Development Model",
+ "PyCon 2014 Sprint",
+ "Themes in Allura",
+ "Videos",
+ "Webhooks",
+ "Working with Contributors"
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/resourceTypes.yaml
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/resourceTypes.yaml b/Allura/docs/api-rest/resourceTypes.yaml
new file mode 100755
index 0000000..10dcb53
--- /dev/null
+++ b/Allura/docs/api-rest/resourceTypes.yaml
@@ -0,0 +1,150 @@
+- base:
+ get?:
+ responses: &standardResponses
+ 200:
+ description: OK
+ put?:
+ responses: *standardResponses
+ patch?:
+ responses: *standardResponses
+ post?:
+ responses:
+ 201:
+ description: Created
+ delete?:
+ responses: *standardResponses
+- baseTool:
+ get?:
+ responses:
+ 200:
+ description: OK
+ post?:
+ responses:
+ 201:
+ description: Created
+ delete?:
+ responses: *standardResponses
+- collection:
+ type: base
+ get:
+ is: [ pageable ]
+ post:
+- member:
+ type: base
+ get?:
+ post?:
+ put?:
+ patch?:
+ delete?:
+- tool:
+ type: member
+ get:
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: <<schema>>
+ example: <<example>>
+ post?:
+ put?:
+ body:
+ application/json:
+ schema: <<schema>>
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: <<schema>>
+ patch?:
+ body:
+ application/json:
+ schema: <<schema>>
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: <<schema>>
+ delete?:
+- permissionCheck:
+ description: |
+ This is API to run permission checks.
+ It is available on a neighborhood, project and tool level.
+
+ This is only available to users that have 'admin' permission for corresponding neighborhood/project/tool.
+ It requires user and perm parameters and will return JSON dict with result key, which contains boolean value,
+ indicating if given user has perm permission to the neighborhood/project/tool.
+ get:
+ queryParameters:
+ user:
+ type: string
+ example: heiths
+ required: true
+ description: The username to check
+ perm:
+ displayName: Permission
+ required: true
+ type: string
+ example: create
+ default: read
+ enum: ["read", "admin", "create", "update"]
+ description: |
+ Get permissions for <<resourcePathName>>.
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: <<schemaItem>>
+- searchableCollection:
+ get:
+ queryParameters:
+ <<queryParamName>>:
+ description: Return <<resourcePathName>> that have their <<queryParamName>> matching the given value
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: <<schema>>
+ example: <<example>>
+- typedCollection:
+ type: collection
+ get:
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: <<schema>>
+ example: <<example>>
+ post:
+ body:
+ application/json:
+ responses:
+ 201:
+ body:
+ application/json:
+ schema: <<schema>>
+- permission:
+ securedBy: [null, oauth_1_0]
+ description: |
+ Checks if a given user has permissions.
+ get:
+ is: [permissionTestable]
+- project:
+ type: member
+ get:
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: <<schema>>
+ example: <<example>>
+ put:
+ body:
+ application/json:
+ schema: <<schema>>
+ responses:
+ 200:
+ body:
+ application/json:
+ schema: <<schema>>
+
+
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/blog.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/blog.json b/Allura/docs/api-rest/schemas/blog.json
new file mode 100755
index 0000000..bab80f6
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/blog.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema",
+ "type": "object",
+ "id": "#",
+ "properties": {
+ "count": {
+ "type": "number",
+ "id": "count"
+ },
+ "posts": {
+ "items": {
+ "type": "object",
+ "id": "0",
+ "properties": {
+ "url": {
+ "type": "string",
+ "id": "url"
+ },
+ "title": {
+ "type": "string",
+ "id": "title"
+ }
+ }
+ },
+ "type": "array",
+ "id": "posts"
+ },
+ "limit": {
+ "type": "number",
+ "id": "limit"
+ },
+ "page": {
+ "type": "number",
+ "id": "page"
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/blogPost.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/blogPost.json b/Allura/docs/api-rest/schemas/blogPost.json
new file mode 100755
index 0000000..f504392
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/blogPost.json
@@ -0,0 +1,75 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "/",
+ "type": "object",
+ "properties": {
+ "related_artifacts": {
+ "id": "related_artifacts",
+ "type": "array",
+ "items": {}
+ },
+ "discussion_thread": {
+ "id": "discussion_thread",
+ "type": "object",
+ "properties": {
+ "_id": {
+ "id": "_id",
+ "type": "string"
+ },
+ "posts": {
+ "id": "posts",
+ "type": "array",
+ "items": {}
+ },
+ "discussion_id": {
+ "id": "discussion_id",
+ "type": "string"
+ },
+ "subject": {
+ "id": "subject",
+ "type": "string"
+ }
+ }
+ },
+ "author": {
+ "id": "author",
+ "type": "string"
+ },
+ "url": {
+ "id": "url",
+ "type": "string"
+ },
+ "text": {
+ "id": "text",
+ "type": "string"
+ },
+ "labels": {
+ "id": "labels",
+ "type": "array",
+ "items": {
+ "id": "0",
+ "type": "string"
+ }
+ },
+ "state": {
+ "id": "state",
+ "type": "string"
+ },
+ "mod_date": {
+ "id": "mod_date",
+ "type": "string"
+ },
+ "title": {
+ "id": "title",
+ "type": "string"
+ },
+ "_id": {
+ "id": "_id",
+ "type": "string"
+ },
+ "discussion_thread_url": {
+ "id": "discussion_thread_url",
+ "type": "string"
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/discussion.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/discussion.json b/Allura/docs/api-rest/schemas/discussion.json
new file mode 100755
index 0000000..8f62a2f
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/discussion.json
@@ -0,0 +1,103 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema",
+ "type": "object",
+ "id": "#",
+ "properties": {
+ "count": {
+ "type": "number",
+ "id": "count"
+ },
+ "forums": {
+ "items": {
+ "type": "object",
+ "id": "0",
+ "properties": {
+ "num_topics": {
+ "type": "number",
+ "id": "num_topics"
+ },
+ "url": {
+ "type": "string",
+ "id": "url"
+ },
+ "name": {
+ "type": "string",
+ "id": "name"
+ },
+ "shortname": {
+ "type": "string",
+ "id": "shortname"
+ },
+ "_id": {
+ "type": "string",
+ "id": "_id"
+ },
+ "last_post": {
+ "type": "object",
+ "id": "last_post",
+ "properties": {
+ "flagged_by": {
+ "type": "array",
+ "id": "flagged_by"
+ },
+ "status": {
+ "type": "string",
+ "id": "status"
+ },
+ "last_edited": {
+ "type": "null",
+ "id": "last_edited"
+ },
+ "author": {
+ "type": "string",
+ "id": "author"
+ },
+ "timestamp": {
+ "type": "string",
+ "id": "timestamp"
+ },
+ "thread_id": {
+ "type": "string",
+ "id": "thread_id"
+ },
+ "text": {
+ "type": "string",
+ "id": "text"
+ },
+ "author_id": {
+ "type": "string",
+ "id": "author_id"
+ },
+ "_id": {
+ "type": "string",
+ "id": "_id"
+ },
+ "slug": {
+ "type": "string",
+ "id": "slug"
+ },
+ "subject": {
+ "type": "string",
+ "id": "subject"
+ }
+ }
+ },
+ "description": {
+ "type": "string",
+ "id": "description"
+ }
+ }
+ },
+ "type": "array",
+ "id": "forums"
+ },
+ "limit": {
+ "type": "number",
+ "id": "limit"
+ },
+ "page": {
+ "type": "number",
+ "id": "page"
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/hasPermission.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/hasPermission.json b/Allura/docs/api-rest/schemas/hasPermission.json
new file mode 100755
index 0000000..c42a5be
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/hasPermission.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "name": "/",
+ "properties": {
+ "result": {
+ "type": "boolean",
+ "description": "True if a user has the permission a given permission.",
+ "name": "result"
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/link.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/link.json b/Allura/docs/api-rest/schemas/link.json
new file mode 100755
index 0000000..3089559
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/link.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/page.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/page.json b/Allura/docs/api-rest/schemas/page.json
new file mode 100755
index 0000000..d961145
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/page.json
@@ -0,0 +1,63 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema",
+ "type": "object",
+ "properties": {
+ "related_artifacts": {
+ "items": {
+ "type": ["null", "string"],
+ },
+ "type": ["null", "array"],
+ "id": "related_artifacts"
+ },
+ "attachments": {
+ "type": ["null", "array"],
+ "id": "attachments"
+ },
+ "title": {
+ "type": "string",
+ "id": "title"
+ },
+ "text": {
+ "type": ["null", "string"],
+ "id": "text"
+ },
+ "labels": {
+ "type": ["null", "array"],
+ "id": "labels"
+ },
+ "discussion_thread": {
+ "type": "object",
+ "id": "discussion_thread",
+ "properties": {
+ "_id": {
+ "type": "string",
+ "id": "_id"
+ },
+ "posts": {
+ "type": "array",
+ "id": "posts"
+ },
+ "discussion_id": {
+ "type": "string",
+ "id": "discussion_id"
+ },
+ "subject": {
+ "type": "string",
+ "id": "subject"
+ }
+ }
+ },
+ "mod_date": {
+ "type": "string",
+ "id": "mod_date"
+ },
+ "_id": {
+ "type": "string",
+ "id": "_id"
+ },
+ "discussion_thread_url": {
+ "type": "string",
+ "id": "discussion_thread_url"
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/project.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/project.json b/Allura/docs/api-rest/schemas/project.json
new file mode 100755
index 0000000..8635bba
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/project.json
@@ -0,0 +1,179 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema",
+ "type": "object",
+ "id": "#",
+ "properties": {
+ "status": {
+ "type": "string",
+ "id": "status"
+ },
+ "_id": {
+ "type": "string",
+ "id": "_id"
+ },
+ "name": {
+ "type": "string",
+ "id": "name"
+ },
+ "preferred_support_tool": {
+ "type": ["string", "null"],
+ "id": "preferred_support_tool"
+ },
+ "preferred_support_url": {
+ "type": ["string", "null"],
+ "id": "preferred_support_url"
+ },
+ "icon_url": {
+ "type": ["string", "null"],
+ "id": "icon_url"
+ },
+ "labels": {
+ "type": "array",
+ "id": "labels"
+ },
+ "private": {
+ "type": "boolean",
+ "id": "private"
+ },
+ "creation_date": {
+ "type": "string",
+ "id": "creation_date"
+ },
+ "url": {
+ "type": "string",
+ "id": "url"
+ },
+ "short_description": {
+ "type": ["string", "null"],
+ "id": "short_description"
+ },
+ "summary": {
+ "type": ["string", "null"],
+ "id": "summary"
+ },
+ "tools": {
+ "items": {
+ "type": "object",
+ "id": "0",
+ "properties": {
+ "mount_point": {
+ "type": "string",
+ "id": "mount_point"
+ },
+ "name": {
+ "type": "string",
+ "id": "name"
+ },
+ "label": {
+ "type": "string",
+ "id": "label"
+ }
+ }
+ },
+ "type": "array",
+ "id": "tools"
+ },
+ "video_url": {
+ "type": ["string", "null"],
+ "id": "video_url"
+ },
+ "socialnetworks": {
+ "items": {
+ "type": "object",
+ "id": "0",
+ "properties": {
+ "accounturl": {
+ "type": ["string", "null"],
+ "id": "accounturl"
+ },
+ "socialnetwork": {
+ "type": ["string", "null"],
+ "id": "socialnetwork"
+ }
+ }
+ },
+ "type": "array",
+ "id": "socialnetworks"
+ },
+ "moved_to_url": {
+ "type": ["string", "null"],
+ "id": "moved_to_url"
+ },
+ "shortname": {
+ "type": "string",
+ "id": "shortname"
+ },
+ "developers": {
+ "items": {
+ "type": "object",
+ "id": "0",
+ "properties": {
+ "url": {
+ "type": "string",
+ "id": "url"
+ },
+ "username": {
+ "type": "string",
+ "id": "username"
+ },
+ "name": {
+ "type": "string",
+ "id": "name"
+ }
+ }
+ },
+ "type": "array",
+ "id": "developers"
+ },
+ "screenshots": {
+ "type": "array",
+ "id": "screenshots"
+ },
+ "external_homepage": {
+ "type": ["string", "null"],
+ "id": "external_homepage"
+ },
+ "categories": {
+ "type": "object",
+ "id": "categories",
+ "properties": {
+ "developmentstatus": {
+ "type": "array",
+ "id": "developmentstatus"
+ },
+ "environment": {
+ "type": "array",
+ "id": "environment"
+ },
+ "language": {
+ "type": "array",
+ "id": "language"
+ },
+ "license": {
+ "type": "array",
+ "id": "license"
+ },
+ "database": {
+ "type": "array",
+ "id": "database"
+ },
+ "topic": {
+ "type": "array",
+ "id": "topic"
+ },
+ "audience": {
+ "type": "array",
+ "id": "audience"
+ },
+ "translation": {
+ "type": "array",
+ "id": "translation"
+ },
+ "os": {
+ "type": "array",
+ "id": "os"
+ }
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/searchedTickets.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/searchedTickets.json b/Allura/docs/api-rest/schemas/searchedTickets.json
new file mode 100755
index 0000000..cf66f55
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/searchedTickets.json
@@ -0,0 +1,210 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema",
+ "required": [
+ "sort",
+ "count",
+ "filter_choices",
+ "page",
+ "q",
+ "solr_error",
+ "limit",
+ "tickets",
+ "filter"
+ ],
+ "type": "object",
+ "properties": {
+ "sort": {
+ "type": "null"
+ },
+ "count": {
+ "type": "number"
+ },
+ "filter_choices": {
+ "required": [
+ "status",
+ "reported_by",
+ "_milestone",
+ "assigned_to"
+ ],
+ "type": "object",
+ "properties": {
+ "status": {
+ "items": {
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "reported_by": {
+ "items": {
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "_milestone": {
+ "items": {
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "array"
+ },
+ "assigned_to": {
+ "items": {
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "type": "array"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "filter": {
+ "type": "object"
+ },
+ "q": {
+ "type": "string"
+ },
+ "solr_error": {
+ "type": "null"
+ },
+ "limit": {
+ "type": "number"
+ },
+ "tickets": {
+ "items": {
+ "required": [
+ "status",
+ "labels",
+ "related_artifacts",
+ "attachments",
+ "reported_by",
+ "reported_by_id",
+ "discussion_disabled",
+ "private",
+ "summary",
+ "assigned_to_id",
+ "assigned_to",
+ "votes_down",
+ "votes_up",
+ "mod_date",
+ "_id",
+ "discussion_thread_url",
+ "ticket_num",
+ "custom_fields",
+ "created_date"
+ ],
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "labels": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "related_artifacts": {
+ "type": "array"
+ },
+ "attachments": {
+ "type": "array"
+ },
+ "reported_by": {
+ "type": "string"
+ },
+ "reported_by_id": {
+ "type": "string"
+ },
+ "discussion_disabled": {
+ "type": "boolean"
+ },
+ "private": {
+ "type": "boolean"
+ },
+ "summary": {
+ "type": "string"
+ },
+ "assigned_to_id": {
+ "type": ["string", "null"]
+ },
+ "assigned_to": {
+ "type": ["string", "null"]
+ },
+ "votes_down": {
+ "type": "number"
+ },
+ "votes_up": {
+ "type": "number"
+ },
+ "mod_date": {
+ "type": "string"
+ },
+ "_id": {
+ "type": "string"
+ },
+ "discussion_thread_url": {
+ "type": "string"
+ },
+ "ticket_num": {
+ "type": "number"
+ },
+ "custom_fields": {
+ "required": [
+ "_component",
+ "_milestone",
+ "_reviewer"
+ ],
+ "type": "object",
+ "properties": {
+ "_component": {
+ "type": "string"
+ },
+ "_milestone": {
+ "type": "string"
+ },
+ "_reviewer": {
+ "type": "string"
+ }
+ }
+ },
+ "created_date": {
+ "type": "string"
+ }
+ }
+ },
+ "type": "array"
+ },
+ "page": {
+ "type": "number"
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/allura/blob/459af1ba/Allura/docs/api-rest/schemas/ticket.json
----------------------------------------------------------------------
diff --git a/Allura/docs/api-rest/schemas/ticket.json b/Allura/docs/api-rest/schemas/ticket.json
new file mode 100755
index 0000000..48aec8d
--- /dev/null
+++ b/Allura/docs/api-rest/schemas/ticket.json
@@ -0,0 +1,180 @@
+{
+ "$schema": "http://json-schema.org/draft04/schema#",
+ "id": "/",
+ "type": "object",
+ "properties": {
+ "ticket": {
+ "id": "ticket",
+ "type": "object",
+ "properties": {
+ "status": {
+ "id": "status",
+ "type": "string"
+ },
+ "reported_by_id": {
+ "id": "reported_by_id",
+ "type": "string"
+ },
+ "related_artifacts": {
+ "id": "related_artifacts",
+ "type": "array",
+ "items": {},
+ "additionalItems": false
+ },
+ "attachments": {
+ "id": "attachments",
+ "type": "array",
+ "items": {},
+ "additionalItems": false
+ },
+ "reported_by": {
+ "id": "reported_by",
+ "type": "string"
+ },
+ "assigned_to": {
+ "id": "assigned_to",
+ "type": "string"
+ },
+ "labels": {
+ "id": "labels",
+ "type": "array",
+ "items": {
+ "id": "1",
+ "type": "string"
+ },
+ "additionalItems": false
+ },
+ "discussion_disabled": {
+ "id": "discussion_disabled",
+ "type": "boolean"
+ },
+ "assigned_to_id": {
+ "id": "assigned_to_id",
+ "type": "string"
+ },
+ "private": {
+ "id": "private",
+ "type": "boolean"
+ },
+ "summary": {
+ "id": "summary",
+ "type": "string"
+ },
+ "description": {
+ "id": "description",
+ "type": "string"
+ },
+ "discussion_thread": {
+ "id": "discussion_thread",
+ "type": "object",
+ "properties": {
+ "_id": {
+ "id": "_id",
+ "type": "string"
+ },
+ "posts": {
+ "id": "posts",
+ "type": "array",
+ "items": {
+ "id": "2",
+ "type": "object",
+ "properties": {
+ "text": {
+ "id": "text",
+ "type": "string"
+ },
+ "attachments": {
+ "id": "attachments",
+ "type": "array",
+ "items": {},
+ "additionalItems": false
+ },
+ "author": {
+ "id": "author",
+ "type": "string"
+ },
+ "timestamp": {
+ "id": "timestamp",
+ "type": "string"
+ },
+ "last_edited": {
+ "id": "last_edited",
+ "type": "null"
+ },
+ "slug": {
+ "id": "slug",
+ "type": "string"
+ },
+ "subject": {
+ "id": "subject",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "additionalItems": false
+ },
+ "discussion_id": {
+ "id": "discussion_id",
+ "type": "string"
+ },
+ "subject": {
+ "id": "subject",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "mod_date": {
+ "id": "mod_date",
+ "type": "string"
+ },
+ "votes_down": {
+ "id": "votes_down",
+ "type": "integer"
+ },
+ "votes_up": {
+ "id": "votes_up",
+ "type": "integer"
+ },
+ "_id": {
+ "id": "_id",
+ "type": "string"
+ },
+ "discussion_thread_url": {
+ "id": "discussion_thread_url",
+ "type": "string"
+ },
+ "ticket_num": {
+ "id": "ticket_num",
+ "type": "integer"
+ },
+ "custom_fields": {
+ "id": "custom_fields",
+ "type": "object",
+ "properties": {
+ "_component": {
+ "id": "_component",
+ "type": "string"
+ },
+ "_milestone": {
+ "id": "_milestone",
+ "type": "string"
+ },
+ "_reviewer": {
+ "id": "_reviewer",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "created_date": {
+ "id": "created_date",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+}
\ No newline at end of file