You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/08/03 23:18:57 UTC

[1/9] incubator-usergrid git commit: Failed attempt to use Swagger-Codegen from Maven, and corrections to Swagger yaml.

Repository: incubator-usergrid
Updated Branches:
  refs/heads/ug2-doc-update abaa0c2b3 -> e17b48889


Failed attempt to use Swagger-Codegen from Maven, and corrections to Swagger yaml.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/cefc7895
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/cefc7895
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/cefc7895

Branch: refs/heads/ug2-doc-update
Commit: cefc78953cf8f468315886559fb61386e6a1e0a1
Parents: abaa0c2
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Jul 31 15:42:27 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Jul 31 15:42:27 2015 -0400

----------------------------------------------------------------------
 docs/pom.xml               |  18 ++++-
 docs/usergrid-swagger.yaml | 157 +++++++++++++++++++---------------------
 2 files changed, 89 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cefc7895/docs/pom.xml
----------------------------------------------------------------------
diff --git a/docs/pom.xml b/docs/pom.xml
index 5d0a07b..3757b38 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -5,8 +5,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <!--
-    This POM is here just to make the IDE play nice with 
-    Groovy code that uses Grape for dependency management.
+    Includes dependencies used by Groovy scripts in the docs directories.
     -->
     
     <groupId>org.apache.usergrid</groupId>
@@ -15,7 +14,16 @@
     
     <build>
         <plugins>
-            <plugin>
+          
+            <!-- Ran into these problems when trying to use Swagger-Codegen to generate HTML: -->
+            <!--                                                                              -->
+            <!--   1. Usergrid Swagger file uses references and there's a bug in codegen:     -->
+            <!--      https://github.com/swagger-api/swagger-codegen/issues/552               -->
+            <!--                                                                              -->
+            <!--   2. The swagger-codegen-maven-plugin points at a discontinued version       --> 
+            <!--      of the Swagger-Codegen project (the old Wordnik version                 -->
+            
+            <!-- <plugin>
                 <groupId>com.garethevans.plugin</groupId>
                 <artifactId>swagger-codegen-maven-plugin</artifactId>
                 <version>0.0.1-SNAPSHOT</version>
@@ -27,10 +35,12 @@
                         <configuration>
                             <inputSpec>usergrid-swagger.yaml</inputSpec>
                             <language>html</language>
+                            <output>${project.build.directory}/generated-sources/swagger</output>
                         </configuration>
                     </execution>
                 </executions>
-            </plugin>            
+            </plugin> -->     
+            
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cefc7895/docs/usergrid-swagger.yaml
----------------------------------------------------------------------
diff --git a/docs/usergrid-swagger.yaml b/docs/usergrid-swagger.yaml
index 21ad3f7..a8b956b 100644
--- a/docs/usergrid-swagger.yaml
+++ b/docs/usergrid-swagger.yaml
@@ -69,13 +69,13 @@ paths:
     post:
       summary: "Completing a password reset."
       description: "Complete the password reset through getting the newpassword and the old one for identification."
-#      parameters:
-#        - name: ResetPWMsg
-#          in: body
-#          description: "Parameters and value for the Captcha challenge, the admin user's response to the Captcha challenge, and the admin user's email address."
-#          required: true
-#          schema: 
-#            $ref: ResetPWMsg
+      parameters:
+        - name: ResetPWMsg
+          in: body
+          description: "Parameters and value for the Captcha challenge, the admin user's response to the Captcha challenge, and the admin user's email address."
+          required: true
+          schema: 
+            $ref: ResetPWMsg
       tags:
         - Action
       responses:
@@ -1643,11 +1643,11 @@ definitions:
       created:
         type: number
         description:  "UTC timestamp in milliseconds of when the entity was created."
-        format: int32
+        format: int64
       modified:
         type: number
         description:  "UTC timestamp in milliseconds of when the entity was last modified."
-        format: int32
+        format: int64
       payloads:
         type: string
         description:  "The push notifications to be delivered."
@@ -1661,9 +1661,9 @@ definitions:
         type: number
         description:  "UTC timestamp in milliseconds for when the notification was sent."
       metadata:
-          $ref: Metadata   
+        $ref: Metadata   
       completeMsg:
-          $ref: Action
+        $ref: Action
   Device:
     properties:
       uuid:
@@ -1678,31 +1678,31 @@ definitions:
       created:
         type: number
         description:  "UTC timestamp in milliseconds of when the entity was created."
-        format: int32
+        format: int64
       modified:
         type: number
         description:  "UTC timestamp in milliseconds of when the entity was last modified."
-        format: int32
+        format: int64
       metadata:
-          $ref: Metadata   
+        $ref: Metadata   
       completeMsg:
-          $ref: Action
-  ScheduleNotification:
-    required:
-      - timestamp
-    properties:
-      timestamp:
-        type: number
-        description: "UTC timestamp in milliseconds of when schedule notifications."
-        format: int32
-  SetExpiration:
-    required:
-      - timestamp
-    properties:
-      timestamp:
-        type: number
-        description: "UTC timestamp in milliseconds of when set expirations."
-        format: int32
+        $ref: Action
+#  ScheduleNotification:
+#    required:
+#      - timestamp
+#    properties:
+#      timestamp:
+#        type: number
+#        description: "UTC timestamp in milliseconds of when schedule notifications."
+#        format: int64
+#  SetExpiration:
+#    required:
+#      - timestamp
+#    properties:
+#      timestamp:
+#        type: number
+#        description: "UTC timestamp in milliseconds of when set expirations."
+#        format: int64
   Notification:
     required:
       - payloads
@@ -1716,11 +1716,11 @@ definitions:
       created:
         type: number
         description:  "UTC timestamp in milliseconds of when the entity was created."
-        format: int32
+        format: int64
       modified:
         type: number
         description:  "UTC timestamp in milliseconds of when the entity was last modified."
-        format: int32
+        format: int64
       payloads:
         type: string
         description:  "The push notifications to be delivered."
@@ -1734,9 +1734,9 @@ definitions:
         type: string
         description:  "The current delivery status of the notification 'FINISHED', 'SCHEDULED' or 'CANCELED'."
       metadata:
-          $ref: Metadata 
+        $ref: Metadata 
       completeMsg:
-          $ref: Action
+        $ref: Action
   Notifier:
     required:
       - provider
@@ -1754,11 +1754,11 @@ definitions:
       created:
         type: number
         description:  "UTC timestamp in milliseconds of when the entity was created."
-        format: int32
+        format: int64
       modified:
         type: number
         description:  "UTC timestamp in milliseconds of when the entity was last modified."
-        format: int32
+        format: int64
       provider:
         type: string
         description:  "Push notification provider 'apple' or 'google'."
@@ -1766,7 +1766,7 @@ definitions:
         type: string
         description:  "The environment that corresponds to your app 'development' or 'production'."
       metadata:
-          $ref: Metadata
+        $ref: Metadata
   CreateNotifications:
     type: array
     items:
@@ -1777,7 +1777,7 @@ definitions:
       - message
     properties:
       notifier:
-          $ref: Notifier
+        $ref: Notifier
       message:
         type: string
         description:  "The push notitfication message that will be delivered to the user."
@@ -1787,7 +1787,7 @@ definitions:
         type: string
         description:  "The name of the application of the permission."
       entity:
-          $ref: Entity
+        $ref: Entity
       url:
         type: string
         description:  "The url of the permission."
@@ -1823,7 +1823,7 @@ definitions:
         description:  "The numebr of the roles."
         format: int32
       entity:
-          $ref: Entity
+        $ref: Entity
       url:
         type: string
         description:  "The url of the event."
@@ -1837,7 +1837,7 @@ definitions:
         type: string
         description:  "The title of the orgnization."
       completeMsg:
-         $ref: Action    
+        $ref: Action    
       path:
         type: string  
         description:  "The path of the role."
@@ -1858,7 +1858,7 @@ definitions:
         type: string
         description:  "The application name of the event."
       entity:
-          $ref: Entity
+        $ref: Entity
       url:
         type: string
         description:  "The url of the event."
@@ -1872,14 +1872,14 @@ definitions:
         type: string
         description:  "The title of the orgnization."
       completeMsg:
-         $ref: Action
-  CreateEvent:
-    required:
-      - timestamp
-    properties:
-      timestamp:
-        type: number
-        format : int32
+        $ref: Action
+#  CreateEvent:
+#    required:
+#      - timestamp
+#    properties:
+#      timestamp:
+#        type: number
+#        format : int32
   Group:
     properties:
       uuid:
@@ -1898,12 +1898,12 @@ definitions:
         type: string
         description:  "The path of the group."
       metadata:
-          $ref: Metadata
+        $ref: Metadata
       title:
         type: string
         description:  "The title of the group."
       completeMsg:
-          $ref: Action
+        $ref: Action
   CreateGroup:
     required:
       - title
@@ -1954,7 +1954,7 @@ definitions:
         description:  "The number of the entities retrieved."
         format: int32
       completeMsg:
-          $ref: Action
+        $ref: Action
   CreateApp:
     required:
       - token
@@ -1975,7 +1975,7 @@ definitions:
         type: string
         description:  "The secret of the client."
       completeMsg:
-          $ref: Action
+        $ref: Action
   Orgnization:
     properties:
       applicationId:
@@ -2015,9 +2015,9 @@ definitions:
         type: string
         description:  "The UUID of the orgnization."
       applicationdata:
-          $ref: AppData
+        $ref: AppData
       completeMsg:
-          $ref: Action
+        $ref: Action
   AppData:
     properties:
       tester/sandbox: 
@@ -2030,7 +2030,7 @@ definitions:
         type: string
         description:  "The UUID of tester/app2."
       completeMsg:
-          $ref: Action
+        $ref: Action
   CreateOrg:
     required:
       - orgnization
@@ -2064,7 +2064,7 @@ definitions:
       username:
         type: string
       image:
-          $ref: ImageModel
+        $ref: ImageModel
       verb:
         type: string
       content:
@@ -2176,7 +2176,7 @@ definitions:
         type: string
         description:  "The path of the user."
       completeMsg:
-          $ref: Action
+        $ref: Action
   Action:
     properties:
       action:
@@ -2188,7 +2188,7 @@ definitions:
       timestamp:
         type: number
         description:  "The timestamp of the requested action."
-        format: int32
+        format: int64
       duration:
         type: number
         description:  "The duration of the requested action."
@@ -2199,14 +2199,14 @@ definitions:
   ActivityFeed:
     properties:
       entityproperty:
-          $ref: Entity
+        $ref: Entity
       category:
         type: string
         description:  "The category of the activity."
       metadataproperty:
-          $ref: Metadata
+        $ref: Metadata
       objectproperty:
-          $ref: Object
+        $ref: Object
       title:
         type: string
         description:  "The title of the activity."
@@ -2215,13 +2215,13 @@ definitions:
         description:  "The verb of the activity."
       published:
         type: number
-        description:  "The published Id of the activity."
-        format: int32
+        description:  "UTC timestamp of the feed publish time."
+        format: int64
       verb:
         type: string
         description:  "The verb of the activity."
       completeMsg:
-          $ref: Action
+        $ref: Action
   Object:
     properties:
       displayname:
@@ -2245,9 +2245,9 @@ definitions:
         type: string
         description:  "The path of the metadata."
       sets:
-          $ref: Sets    
+        $ref: Sets    
       collections:
-          $ref: Collections
+        $ref: Collections
   Collections:
     properties:
       activities:
@@ -2288,26 +2288,19 @@ definitions:
         description:  "The type of the entity."
       created:
         type: number
-        description:  "The Id of the created one."
-        format: int32
+        description:  "UTC timestamp of entity creation time."
+        format: int64
       modified:
         type: number
-        description:  "The Id of the modified one."
-        format: int32
+        description:  "UTC timestamp of entity modified time."
+        format: int64
       actorproperty:
-          $ref: Actor
+        $ref: Actor
       metadata:
-          $ref: Metadata
+        $ref: Metadata
       name:
         type: string
         description:  "The name of the entity."
-      price:
-        type: number
-        description:  "The price of the entity."
-        format: int32
-      timestamp:
-        type: number
-        format: int32
       message:
         type: string
   Error:


[5/9] incubator-usergrid git commit: Switch over to generating api-docs via Groovy, Swagger and Mustache.java.

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/api-docs.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/api-docs.md b/docs/rest-endpoints/api-docs.md
new file mode 100644
index 0000000..15de49f
--- /dev/null
+++ b/docs/rest-endpoints/api-docs.md
@@ -0,0 +1,2945 @@
+
+# Methods
+
+## Organization Methods
+
+<h2 class="usergrid-POST-heading">POST /management/orgs</h2>
+
+Create an organization through a form post.
+
+<h3>Parameters</h3>
+
+* __CreateOrg__ ([CreateOrg](#createorg))
+A set of organization properties supplied through a form. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created Organization.
+* Schema: [Organization](#organization)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /management/orgs/{orgId}</h2>
+
+Retrieve an organization given a specified UUID or username.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created Organization.
+* Schema: [Organization](#organization)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Action Methods
+
+<h2 class="usergrid-GET-heading">GET /management/orgs/{orgId}/activate</h2>
+
+Activate an organization from a link provIded in an email notification.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __token__ ()
+Activation token. (Specified in query).
+* __confirm_email__ ()
+Send confirmation email or not. (Specified in query).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of complete messages.
+* Schema: [Action](#action)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /management/orgs/{orgId}/reactivate</h2>
+
+Reactivate an expired organization.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of complete messages.
+* Schema: [Action](#action)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /management/users/resetpw</h2>
+
+Complete the password reset through getting the newpassword and the old one for identification.
+
+<h3>Parameters</h3>
+
+* __ResetPWMsg__ ([ResetPWMsg](#resetpwmsg))
+Parameters and value for the Captcha challenge, the admin user&#39;s response to the Captcha challenge, and the admin user&#39;s email address. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of complete messages.
+* Schema: [Action](#action)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /management/users/{userId}/activate</h2>
+
+Activate an admin user from a link provIded in an email notification.
+
+<h3>Parameters</h3>
+
+* __userId__ ((string))
+One of the user&#39;s identification which includes username, real name, email address or UUID. (Specified in path).
+* __token__ ()
+Activation token&#39;s query statement. (Specified in query).
+* __confirm_email__ ()
+Query statement of whether send confimation email or not. (Specified in query).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of complete messages.
+* Schema: [Action](#action)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-PUT-heading">PUT /management/users/{userId}/password</h2>
+
+Update an admin user&#39;s password through getting the newpassword and the old one for identification.
+
+<h3>Parameters</h3>
+
+* __userId__ ((string))
+One of the user&#39;s identification which includes username, real name, email address or UUID. (Specified in path).
+* __ResetPW__ ([ResetPW](#resetpw))
+The user&#39;s old and new password. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of complete messages.
+* Schema: [Action](#action)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /management/users/{userId}/reactivate</h2>
+
+Reactivate an expired admin user.
+
+<h3>Parameters</h3>
+
+* __userId__ ((string))
+One of the user&#39;s identification which includes username, real name, email address or UUID. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of complete messages.
+* Schema: [Action](#action)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/users/{user}/password</h2>
+
+Set a user&#39;s password or reset the user&#39;s existing password.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __username__ ((string))
+The username of the user. (Specified in path).
+* __ResetPW__ ([ResetPW](#resetpw))
+The user&#39;s old and new password. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of complete messages.
+* Schema: [Action](#action)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## AppData Methods
+
+<h2 class="usergrid-GET-heading">GET /management/orgs/{orgId}/apps</h2>
+
+Retrieve the applications in an organization through providing both Id of application and organization.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved application data.
+* Schema: [AppData](#appdata)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-DELETE-heading">DELETE /management/orgs/{orgId}/apps/{appId}</h2>
+
+Remove an application from an organization through providing both Id of application and organization.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of deleted application info.
+* Schema: [AppData](#appdata)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Credential Methods
+
+<h2 class="usergrid-POST-heading">POST /management/orgs/{orgId}/apps/{appId}/credentials</h2>
+
+Generate the client Id and client secret credentials for an application in an organization.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of generated credentials info.
+* Schema: [Credential](#credential)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /management/orgs/{orgId}/credentials</h2>
+
+Generate whole new credentials for an organization client.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of Credential
+* Schema: [Credential](#credential)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## ActivityFeed Methods
+
+<h2 class="usergrid-GET-heading">GET /management/orgs/{orgId}/feed</h2>
+
+Retrieve an organization&#39;s activity feed.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of the organization&#39;s ActivityFeed.
+* Schema: [ActivityFeed](#activityfeed)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /management/users/{userId}/feed</h2>
+
+Retrieve an admin user&#39;s activity feed.
+
+<h3>Parameters</h3>
+
+* __userId__ ((string))
+One of the user&#39;s identification which includes username, real name, email address or UUID. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of user&#39;s activity
+* Schema: [ActivityFeed](#activityfeed)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/groups/{groupId}/activities</h2>
+
+Create an activity to a specific group. In this case the activity is created in the activities collection and is accessible at the /activities endpoint to users who have the permission to read that endpoint. In addition, a relationship is established between the activity and the group, and because of that, the activity will appear in the group’s feed. The group &#39;owns&#39; the activity. Also, the activity will be published in the feed of all users that are members of the group.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __groupId__ ((string))
+One of the group&#39;s identification which includes name or uuid. (Specified in path).
+* __CreateActivity__ ([CreateActivity](#createactivity))
+One or more sets of activity properties. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of user&#39;s activity.
+* Schema: [ActivityFeed](#activityfeed)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/groups/{groupId}/feed</h2>
+
+Get a group&#39;s feed through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __groupId__ ((string))
+One of the group&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of group&#39;s activity.
+* Schema: [ActivityFeed](#activityfeed)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/users/{userId}/activities</h2>
+
+Create an activity in the activities collection.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __userId-3__ ((string))
+One of the user&#39;s identification which includes username or UUID. (Specified in path).
+* __CreateActivity__ ([CreateActivity](#createactivity))
+One or more sets of activity properties. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of user&#39;s activity.
+* Schema: [ActivityFeed](#activityfeed)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/users/{userId}/feed</h2>
+
+Retrieve a user&#39;s feed through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __userId-3__ ((string))
+One of the user&#39;s identification which includes username or UUID. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of user&#39;s activity feed.
+* Schema: [ActivityFeed](#activityfeed)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## User Methods
+
+<h2 class="usergrid-GET-heading">GET /management/orgs/{orgId}/users</h2>
+
+Retrieve details about the admin users in an organization.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved Admin user&#39;s info.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-DELETE-heading">DELETE /management/orgs/{orgId}/users/{userId}</h2>
+
+Remove an admin user from an organization through providing both Id of application and organization.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __userId-2__ ((string))
+One of the user&#39;s identification which includes username, email address or UUID. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of deleted Admin user&#39;s info.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /management/users</h2>
+
+Create a whole new admin user.
+
+<h3>Parameters</h3>
+
+* __adminuserproperty__ ([CreateAdminUser](#createadminuser))
+One or more sets of user properties of which username is mandatory and must be unique. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of new created Admin user&#39;s info.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-PUT-heading">PUT /management/users/{userId}</h2>
+
+Update the info of an admin user.
+
+<h3>Parameters</h3>
+
+* __userId__ ((string))
+One of the user&#39;s identification which includes username, real name, email address or UUID. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of user&#39;s details.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-DELETE-heading">DELETE /{orgId}/{appId}/groups/{groupId}/users/{userId}</h2>
+
+Delete user from a group through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __groupId__ ((string))
+One of the group&#39;s identification which includes name or uuid. (Specified in path).
+* __userId-3__ ((string))
+One of the user&#39;s identification which includes username or UUID. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of deleted user&#39;s info.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/roles/{roleId}/users</h2>
+
+Retrieve the users in a role through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __roleId__ ((string))
+One of the role&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved user&#39;s info.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-DELETE-heading">DELETE /{orgId}/{appId}/roles/{roleId}/users/{userId}</h2>
+
+Remove a user from a role through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __roleId__ ((string))
+One of the role&#39;s identification which includes name or uuid. (Specified in path).
+* __userId-3__ ((string))
+One of the user&#39;s identification which includes username or UUID. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of deleted user&#39;s info.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/users</h2>
+
+Create a user in the users collection through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __CreateUser__ ([CreateUser](#createuser))
+The properties of the user. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created user&#39;s info.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-PUT-heading">PUT /{orgId}/{appId}/users/{userId}</h2>
+
+Update a user through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __userId-3__ ((string))
+One of the user&#39;s identification which includes username or UUID. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of updated user&#39;s info.
+* Schema: [User](#user)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Notification Methods
+
+<h2 class="usergrid-PUT-heading">PUT /my-org/sandbox/notifications/{notificationId}</h2>
+
+Cancel sent notifications through providing the Id of the notification.
+
+<h3>Parameters</h3>
+
+* __notificationId__ ((string))
+One of the notification&#39;s identification which includes name or uuid. (Specified in path).
+* __cancelMsg__ ([CancelMSG](#cancelmsg))
+Indicete whether is canceled or not. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of canceled notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/devices</h2>
+
+Create notifications for user through targeting by location and providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __notification__ ([CreateNotifications](#createnotifications))
+These parameters are used when forming the notification portion of the request. (Specified in body).
+* __scheduleNotification__ ([ScheduleNotification](#schedulenotification))
+To schedule a notification for a later time add the deliver parameter with a UNIX timestamp to the body of your request. (Specified in body).
+* __setExpiration__ ([SetExpiration](#setexpiration))
+If a push service can&#39;t deliver a message to a device and needs to resend it you can set a notification to expire after a certain date/time. (Specified in body).
+* __queryStatement__ ()
+The query statement of the location of the user. (Specified in query).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/devices/*/notifications</h2>
+
+Create notifications for all devices. This request will target all device entities.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __notification__ ([CreateNotifications](#createnotifications))
+These parameters are used when forming the notification portion of the request. (Specified in body).
+* __scheduleNotification__ ([ScheduleNotification](#schedulenotification))
+To schedule a notification for a later time add the deliver parameter with a UNIX timestamp to the body of your request. (Specified in body).
+* __setExpiration__ ([SetExpiration](#setexpiration))
+If a push service can&#39;t deliver a message to a device and needs to resend it you can set a notification to expire after a certain date/time. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/devices/{deviceId}/notifications</h2>
+
+Create notifications for a single device. This request will target a specific device entity.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __deviceId__ ((string))
+One of the device&#39;s identification which includes name or uuid. (Specified in path).
+* __notification__ ([CreateNotifications](#createnotifications))
+These parameters are used when forming the notification portion of the request. (Specified in body).
+* __scheduleNotification__ ([ScheduleNotification](#schedulenotification))
+To schedule a notification for a later time add the deliver parameter with a UNIX timestamp to the body of your request. (Specified in body).
+* __setExpiration__ ([SetExpiration](#setexpiration))
+If a push service can&#39;t deliver a message to a device and needs to resend it you can set a notification to expire after a certain date/time. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/groups/{path}/notifications</h2>
+
+Create notifications for a group. This request will target all users associated with a specific group entity.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __path__ ((string))
+The path of the group. (Specified in path).
+* __notification__ ([CreateNotifications](#createnotifications))
+These parameters are used when forming the notification portion of the request. (Specified in body).
+* __scheduleNotification__ ([ScheduleNotification](#schedulenotification))
+To schedule a notification for a later time add the deliver parameter with a UNIX timestamp to the body of your request. (Specified in body).
+* __setExpiration__ ([SetExpiration](#setexpiration))
+If a push service can&#39;t deliver a message to a device and needs to resend it you can set a notification to expire after a certain date/time. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/notifications</h2>
+
+Retrieve one or more notifications through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-DELETE-heading">DELETE /{orgId}/{appId}/notifications/{notificationId}</h2>
+
+Remove unsent notifications through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __notificationId__ ((string))
+One of the notification&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of deleted notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/users/{userId}/notifications</h2>
+
+Create notifications for a user. This request will target a specific user entity.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __userId-3__ ((string))
+One of the user&#39;s identification which includes username or UUID. (Specified in path).
+* __notification__ ([CreateNotifications](#createnotifications))
+These parameters are used when forming the notification portion of the request. (Specified in body).
+* __scheduleNotification__ ([ScheduleNotification](#schedulenotification))
+To schedule a notification for a later time add the deliver parameter with a UNIX timestamp to the body of your request. (Specified in body).
+* __setExpiration__ ([SetExpiration](#setexpiration))
+If a push service can&#39;t deliver a message to a device and needs to resend it you can set a notification to expire after a certain date/time. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/{receiptId}/*/notifications</h2>
+
+Retrieve notifications associated with one or more receipts through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __receiptId__ ((string))
+One of the receipt&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved notification&#39;s info.
+* Schema: [Notification](#notification)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Event Methods
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/events</h2>
+
+Create an event through providing both Id of organization and application.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __CreateEvent__ ([CreateEvent](#createevent))
+The required property of the event. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created event&#39;s info.
+* Schema: [Event](#event)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Group Methods
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/groups</h2>
+
+Create a new group through providing both Id of organization and application.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __groupproperty__ ([CreateGroup](#creategroup))
+The property of the created group. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created group&#39;s info.
+* Schema: [Group](#group)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-PUT-heading">PUT /{org_Id}/{app_Id}/groups/{groupId}</h2>
+
+Update a group through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __groupId__ ((string))
+One of the group&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of updated group&#39;s info.
+* Schema: [Group](#group)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Receipt Methods
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/receipts</h2>
+
+Retrieve one or more receipts through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved receipt&#39;s info.
+* Schema: [Receipt](#receipt)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/{deviceId}/*/receipts</h2>
+
+Retrieve receipts associated with one or more devices through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __deviceId__ ((string))
+One of the device&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved receipt&#39;s info.
+* Schema: [Receipt](#receipt)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/{notificationId}/*/receipts</h2>
+
+Retrieve receipts for one or more notifications through providing all the identifications.&quot;
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __notificationId__ ((string))
+One of the notification&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved receipt&#39;s info.
+* Schema: [Receipt](#receipt)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Role Methods
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/roles</h2>
+
+Create a new role through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __roleproperty__ ([AddRole](#addrole))
+The required properties of the role. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created role&#39;s info.
+* Schema: [Role](#role)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-DELETE-heading">DELETE /{orgId}/{appId}/roles/{rolename}</h2>
+
+Remove a role through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __rolename__ ((string))
+The name of the role. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of deleted role&#39;s info.
+* Schema: [Role](#role)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Permission Methods
+
+<h2 class="usergrid-DELETE-heading">DELETE /{orgId}/{appId}/roles/{roleId}/permissions</h2>
+
+Remove permissions from a role. 
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __roleId__ ((string))
+One of the role&#39;s identification which includes name or uuid. (Specified in path).
+* __grant_url_pattern__ ()
+The query statement of the url pattern. (Specified in query).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of deleted permission&#39;s info.
+* Schema: [Permission](#permission)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Entity Methods
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/users/{userId}/{relation}</h2>
+
+Retrieve a user&#39;s collections or connections through query statement.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __userId-3__ ((string))
+One of the user&#39;s identification which includes username or UUID. (Specified in path).
+* __relation__ ((string))
+The relation between user and collections. (Specified in path).
+* __queryStatement__ ()
+The query statement of the user. (Specified in query).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of user&#39;s collections info.
+* Schema: [Entity](#entity)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-PUT-heading">PUT /{orgId}/{appId}/{collectionId}</h2>
+
+Update collection through query statement.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __collectionId__ ((string))
+One of the collection&#39;s identification which includes name or uuid. (Specified in path).
+* __queryStatement__ ()
+Any values specified in the query statement should be enclosed in single-quotes. (Specified in query).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of updated collection&#39;s info.
+* Schema: [Entity](#entity)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-DELETE-heading">DELETE /{orgId}/{appId}/{collectionId}/{entityId1}/{relation}/{entityId2}</h2>
+
+Remove an entity from a collection through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __collectionId__ ((string))
+One of the collection&#39;s identification which includes name or uuid. (Specified in path).
+* __entityId1__ ((string))
+The Id of the 1st entity. (Specified in path).
+* __relation__ ((string))
+The relation between 1st entity and 2nd entity. (Specified in path).
+* __entityId2__ ((string))
+The Id of the 2nd entity. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of deleted entity&#39;s info.
+* Schema: [Entity](#entity)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-PUT-heading">PUT /{orgId}/{appId}/{collectionId}/{entityId}</h2>
+
+One or more properties can be updated with a single request.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __collectionId__ ((string))
+One of the collection&#39;s identification which includes name or uuid. (Specified in path).
+* __entityId__ ((string))
+One of the entity&#39;s identification which includes name or uuid. (Specified in path).
+* __entityproperty__ ([CreateEntities](#createentities))
+The properties of the entity. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of updated entity&#39;s info.
+* Schema: [Entity](#entity)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+<h2 class="usergrid-POST-heading">POST /{orgId}/{appId}/{entitytype}</h2>
+
+When a new entity is created, Usergrid will automatically create a corresponding collection if one does not already exist. The collection will automatically be named with the plural form of the entity type. 
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __entitytype__ ((string))
+The entity type to create. (Specified in path).
+* __entityproperty__ ([CreateEntities](#createentities))
+The properties of the entity. (Specified in body).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of created custom entity&#39;s info.
+* Schema: [Entity](#entity)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+## Devices Methods
+
+<h2 class="usergrid-GET-heading">GET /{orgId}/{appId}/{notificationId}/*/queue</h2>
+
+Retrieve the list of devices associated with one or more notifications before the notifications are sent through providing all the identifications.
+
+<h3>Parameters</h3>
+
+* __orgId__ ((string))
+One of the organization&#39;s identification which includes name or uuid. (Specified in path).
+* __appId__ ((string))
+One of the application&#39;s identification which includes name or uuid. (Specified in path).
+* __notificationId__ ((string))
+One of the notification&#39;s identification which includes name or uuid. (Specified in path).
+
+<h3>Responses</h3>
+
+__200__
+
+* Description: An array of retrieved device&#39;s info.
+* Schema: [Device](#device)
+    
+__default__
+
+* Description: Unexpected error.
+* Schema: [Error](#error)
+    
+
+# Models
+
+## CancelMSG
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>canceled</td>
+        <td>boolean</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+</table>
+
+## Receipt
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td>Unique entity Id.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>type</td>
+        <td>string</td>
+        <td>Type of entity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>payloads</td>
+        <td>string</td>
+        <td>The push notifications to be delivered.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>errorMessage</td>
+        <td>string</td>
+        <td>Error message returned by the notification service (APNs or GCM) if the notification fails entirely.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>errorCode</td>
+        <td>string</td>
+        <td>Error code returned by the notification service.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>sent</td>
+        <td>number</td>
+        <td>UTC timestamp in milliseconds for when the notification was sent.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>metadata</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Device
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td>Unique entity Id.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>type</td>
+        <td>string</td>
+        <td>Type of entity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>name</td>
+        <td>string</td>
+        <td>Notifier display name.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>metadata</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## ScheduleNotification
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>timestamp</td>
+        <td>string</td>
+        <td>UTC timestamp in milliseconds of when schedule notifications.</td>
+        <td>true</td>
+    </tr>
+</table>
+
+## SetExpiration
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>timestamp</td>
+        <td>string</td>
+        <td>UTC timestamp in milliseconds of when set expirations.</td>
+        <td>true</td>
+    </tr>
+</table>
+
+## Notification
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td>Unique entity Id.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>type</td>
+        <td>string</td>
+        <td>Type of entity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>payloads</td>
+        <td>string</td>
+        <td>The push notifications to be delivered.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>errorMessage</td>
+        <td>string</td>
+        <td>Error message returned by the notification service (APNs or GCM) if the notification fails entirely.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>scheduled</td>
+        <td>boolean</td>
+        <td>whether the notification is currently scheduled for delivery.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>state</td>
+        <td>string</td>
+        <td>The current delivery status of the notification &#39;FINISHED&#39;, &#39;SCHEDULED&#39; or &#39;CANCELED&#39;.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>metadata</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Notifier
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td>Unique entity Id.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>type</td>
+        <td>string</td>
+        <td>Type of entity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>name</td>
+        <td>string</td>
+        <td>Notifier display name.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>provider</td>
+        <td>string</td>
+        <td>Push notification provider &#39;apple&#39; or &#39;google&#39;.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>environment</td>
+        <td>string</td>
+        <td>The environment that corresponds to your app &#39;development&#39; or &#39;production&#39;.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>metadata</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## CreateNotifications
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+</table>
+
+## CreateNotification
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>notifier</td>
+        <td>ref</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>message</td>
+        <td>string</td>
+        <td>The push notitfication message that will be delivered to the user.</td>
+        <td>true</td>
+    </tr>
+</table>
+
+## Permission
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>applicationName</td>
+        <td>string</td>
+        <td>The name of the application of the permission.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>entity</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>url</td>
+        <td>string</td>
+        <td>The url of the permission.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>applicationId</td>
+        <td>string</td>
+        <td>The UUID of the application.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>parameters</td>
+        <td>string</td>
+        <td>The parameters of the permission.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>organization</td>
+        <td>string</td>
+        <td>The organization of the permission.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>permissiondata</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## AddPermission
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>operation</td>
+        <td>string</td>
+        <td>A comma-delimited set of HTTP methods (GET, PUT, POST, DELETE) that are allowed for the specified resource path.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>resource_path</td>
+        <td>string</td>
+        <td>The path to the resources to be accessed.</td>
+        <td>true</td>
+    </tr>
+</table>
+
+## Role
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>applicationName</td>
+        <td>string</td>
+        <td>The application name of the event.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>entity</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>url</td>
+        <td>string</td>
+        <td>The url of the event.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>applicationId</td>
+        <td>string</td>
+        <td>The application UUID of the event.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>parameters</td>
+        <td>string</td>
+        <td>The parameters of the event.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>organization</td>
+        <td>string</td>
+        <td>The title of the organization.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>path</td>
+        <td>string</td>
+        <td>The path of the role.</td>
+        <td>false</td>
+    </tr>
+</table>
+
+## AddRole
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>title</td>
+        <td>string</td>
+        <td>The title of the role.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>role name</td>
+        <td>string</td>
+        <td>The name of the role.</td>
+        <td>true</td>
+    </tr>
+</table>
+
+## Event
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>applicationName</td>
+        <td>string</td>
+        <td>The application name of the event.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>entity</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>url</td>
+        <td>string</td>
+        <td>The url of the event.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>applicationId</td>
+        <td>string</td>
+        <td>The application UUID of the event.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>parameters</td>
+        <td>string</td>
+        <td>The parameters of the event.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>organization</td>
+        <td>string</td>
+        <td>The title of the organization.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## CreateEvent
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>timestamp</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+</table>
+
+## Group
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td>The UUID of the group.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>type</td>
+        <td>string</td>
+        <td>The type of the group.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>created</td>
+        <td>string</td>
+        <td>The created Id for the group.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>modified</td>
+        <td>string</td>
+        <td>The modified Id for the group.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>path</td>
+        <td>string</td>
+        <td>The path of the group.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>metadata</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>title</td>
+        <td>string</td>
+        <td>The title of the group.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## CreateGroup
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>title</td>
+        <td>string</td>
+        <td>The title of the group.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>path</td>
+        <td>string</td>
+        <td>The path of the group.</td>
+        <td>true</td>
+    </tr>
+</table>
+
+## CreateEntities
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+</table>
+
+## CreateEntity
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>property</td>
+        <td>string</td>
+        <td>The property of the entity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>value</td>
+        <td>string</td>
+        <td>The relevant value of the property.</td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Entity
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td>The UUID of the entity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>type</td>
+        <td>string</td>
+        <td>The type of the entity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>actorproperty</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>metadata</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>name</td>
+        <td>string</td>
+        <td>The name of the entity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>message</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## CreateApp
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>token</td>
+        <td>string</td>
+        <td>The OAuth2 access token.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>name</td>
+        <td>string</td>
+        <td>The name of the application.</td>
+        <td>true</td>
+    </tr>
+</table>
+
+## Credential
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>client_Id</td>
+        <td>string</td>
+        <td>The Id of the client.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>client_secret</td>
+        <td>string</td>
+        <td>The secret of the client.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Organization
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>applicationId</td>
+        <td>string</td>
+        <td>The application Id of the owner.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>username</td>
+        <td>string</td>
+        <td>The username of the owner.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>name</td>
+        <td>string</td>
+        <td>The name of the owner.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>email</td>
+        <td>string</td>
+        <td>The email of the owner.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>activated</td>
+        <td>boolean</td>
+        <td>Indicate whether the account is activated or not.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>disabled</td>
+        <td>boolean</td>
+        <td>Indicate whether the account is disabled or not.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td>The UUID of the owner.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>adminUser</td>
+        <td>boolean</td>
+        <td>Indicate whether the use is a adminUser or not.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>displayEmail</td>
+        <td>string</td>
+        <td>The display of the email of the owner.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>htmldisplayEmail</td>
+        <td>string</td>
+        <td>The HTML display of the email of the owner.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>orgname</td>
+        <td>string</td>
+        <td>The name of the organization.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>orguuId</td>
+        <td>string</td>
+        <td>The UUID of the organization.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>applicationdata</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## AppData
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>tester/sandbox</td>
+        <td>string</td>
+        <td>The UUID of tester/sandbox.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>tester/app1</td>
+        <td>string</td>
+        <td>The UUID of tester/app1.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>tester/app2</td>
+        <td>string</td>
+        <td>The UUID of tester/app2.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## CreateOrg
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>organization</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>username</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>name</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>email</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>password</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+</table>
+
+## CreateActivity
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>displayName</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>username</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>image</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>verb</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>content</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+</table>
+
+## ImageModel
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>url</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>wIdth</td>
+        <td>integer</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>email</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## ResetPWMsg
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>recaptcha_response</td>
+        <td>string</td>
+        <td>Parameters and value for the Captcha challenge.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>recaptcha_challenge</td>
+        <td>string</td>
+        <td>The admin user&#39;s response to the Captcha challenge.</td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>email</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+</table>
+
+## ResetPW
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>password</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>newpassword</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+</table>
+
+## AdminUserUpdate
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>city</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>state</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## CreateAdminUser
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>username</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+    <tr>
+        <td>email</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>name</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>password</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## CreateUser
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>username</td>
+        <td>string</td>
+        <td></td>
+        <td>true</td>
+    </tr>
+</table>
+
+## User
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>applicationId</td>
+        <td>string</td>
+        <td>The application Id of a user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>username</td>
+        <td>string</td>
+        <td>The username of a user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>name</td>
+        <td>string</td>
+        <td>The name of a user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>email</td>
+        <td>string</td>
+        <td>The email of a user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>activated</td>
+        <td>boolean</td>
+        <td>Indicate whether the account is activated or not.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>disabled</td>
+        <td>boolean</td>
+        <td>Indicate whether the account is disabled or not.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>uuid</td>
+        <td>string</td>
+        <td>The UUID of a user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>adminUser</td>
+        <td>boolean</td>
+        <td>Indicate whether the use is a adminUser or not.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>displayEmail</td>
+        <td>string</td>
+        <td>The display of the email of a user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>htmldisplayEmail</td>
+        <td>string</td>
+        <td>The HTML display of the email of a user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>organization</td>
+        <td>string</td>
+        <td>The organization of the user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>picture</td>
+        <td>string</td>
+        <td>The uri of the user&#39;s picture.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>uri</td>
+        <td>string</td>
+        <td>The uri of the user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>path</td>
+        <td>string</td>
+        <td>The path of the user.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Action
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>action</td>
+        <td>string</td>
+        <td>The requested action.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>status</td>
+        <td>string</td>
+        <td>The status of the requested action.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>token</td>
+        <td>string</td>
+        <td>The token required for getting an AdminUser.</td>
+        <td>false</td>
+    </tr>
+</table>
+
+## ActivityFeed
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>entityproperty</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>category</td>
+        <td>string</td>
+        <td>The category of the activity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>metadataproperty</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>objectproperty</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>title</td>
+        <td>string</td>
+        <td>The title of the activity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>verb</td>
+        <td>string</td>
+        <td>The verb of the activity.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>completeMsg</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Object
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>displayname</td>
+        <td>string</td>
+        <td>The display of the name of the object.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>objecttype</td>
+        <td>string</td>
+        <td>The type of the object.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>objectuuId</td>
+        <td>string</td>
+        <td>The UUID of the object.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>entitytype</td>
+        <td>string</td>
+        <td>The entitytype of the object.</td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Metadata
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>cursor</td>
+        <td>string</td>
+        <td>The cursor of the metadata.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>path</td>
+        <td>string</td>
+        <td>The path of the metadata.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>sets</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>collections</td>
+        <td>ref</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Collections
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>activities</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>feed</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>roles</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>users</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Sets
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>rolenames</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>permissions</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Actor
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>displayname</td>
+        <td>string</td>
+        <td>The display of the name of the actor.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>objecttype</td>
+        <td>string</td>
+        <td>The type of the actor.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>objectuuId</td>
+        <td>string</td>
+        <td>The UUID of the actor.</td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>entitytype</td>
+        <td>string</td>
+        <td>The entitytype of the actor.</td>
+        <td>false</td>
+    </tr>
+</table>
+
+## Error
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    <tr>
+        <td>code</td>
+        <td>integer</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>message</td>
+        <td>string</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+    <tr>
+        <td>fields</td>
+        <td>object</td>
+        <td></td>
+        <td>false</td>
+    </tr>
+</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/collections.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/collections.md b/docs/rest-endpoints/collections.md
deleted file mode 100644
index 2b0412a..0000000
--- a/docs/rest-endpoints/collections.md
+++ /dev/null
@@ -1,84 +0,0 @@
-# Collections
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Content-type</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Retrieve all collections</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create a new entity or collection</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}/ {uuid|name}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Retrieve an entity</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}/ {uuid|name}</td>
-    <td>PUT</td>
-    <td>application/json</td>
-    <td>Update an entity</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}/ {uuid|name}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Delete an entity</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}?{query}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Query a collection</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}?{query}</td>
-    <td>PUT</td>
-    <td>application/json</td>
-    <td>Update a collection by query</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}/{entity_id}/ {relationship}?{query}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Query an entity's collections or connections</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}/ {first_entity_id}/{relationship}/ {second_entity_id} or /{org_id}/{app_id}/{collection}/ {first_entity_id}/{relationship}/ {second_entity_type}/{second_entity_id}</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Add an entity to a collection or create a connection</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}/ {first_entity_id}/{relationship}/ {second_entity_id} or /{org_id}/{app_id}/{collection}/ {first_entity_id}/{relationship}/ {second_entity_type}/{second_entity_id}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Remove an entity from a collection or delete a connection</td>
-    <td>Detail</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/events.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/events.md b/docs/rest-endpoints/events.md
deleted file mode 100644
index 5bb18e2..0000000
--- a/docs/rest-endpoints/events.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Events
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Content-type</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/events</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create an event</td>
-    <td>Detail</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/groups.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/groups.md b/docs/rest-endpoints/groups.md
deleted file mode 100644
index 39bbfb7..0000000
--- a/docs/rest-endpoints/groups.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Groups
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Content-type</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/groups</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create a new group</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/groups/ {uuid|groupname}/users/{uuid|username}</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Add a user to a group</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/groups/ {uuid|groupname}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get a group</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}{app_id}/groups/ {uuid|groupname}</td>
-    <td>PUT</td>
-    <td>application/json</td>
-    <td>Update a group</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/groups/ {uuid|groupname}/users/{uuid|username}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Delete user from a group</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/groups/ {uuid|groupname}/feed</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get a group's feed</td>
-    <td>Detail</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/organizations.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/organizations.md b/docs/rest-endpoints/organizations.md
deleted file mode 100644
index 1c05c18..0000000
--- a/docs/rest-endpoints/organizations.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# Organizations
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/organizations|orgs</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create an organization</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Retrieve an organization</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}/ activate?token={token}&confirm={confirm_email}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Activate an organization</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}/ reactivate</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Reactivate an organization</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}/ credentials</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Generate organization client credentials</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}/ credentials</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Retrieve organization client credentials</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}/ feed</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Retrieve an organization's activity feed</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{org_uuid}/ apps</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create an organization application</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}/ applications|apps/{app_name}|{uuid}/ credentials</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Generate credentials for an organization application</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}/ applications|apps/ {app_name}|{uuid}/credentials</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get credentials for an organization application</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{uuid}/ applications|apps</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get the applications in an organization</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{org_uuid}/ users/{username|email|uuid}</td>
-    <td>PUT</td>
-    <td>application/json</td>
-    <td>Adding an admin user to an organization</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{org_uuid}/ users</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Getting the admin users in an organization</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/organizations|orgs/{org_name}|{org_uuid}/ users/{username|email|uuid}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Removing an admin user from an organization</td>
-    <td>Detail</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/roles.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/roles.md b/docs/rest-endpoints/roles.md
deleted file mode 100644
index cf46c34..0000000
--- a/docs/rest-endpoints/roles.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# Roles
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/roles</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create a new role</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/roles</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get the roles in an application</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/roles/{rolename}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Delete a role</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/roles/ {rolename|role_id}/permissions</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get permissions for a role</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/roles/ {rolename|role_id}/permissions</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Add permissions to a role</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>{org_id}/{app_id}/roles/ {rolename|role_id}/permissions? permission={grant_url_pattern}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Delete permissions from a role</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/roles/{role_id}/ users/{uuid|username} or /{org_id}/{app_id}/users/ {uuid|username}/roles/{role_id}</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Add a user to a role</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/roles/{role_id}/ users</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get the users in a role</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/roles/{role_id}/ users/{uuid|username}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Delete a user from a role</td>
-    <td>Detail</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/access-token.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/access-token.txt b/docs/rest-endpoints/sources/access-token.txt
deleted file mode 100644
index da469a4..0000000
--- a/docs/rest-endpoints/sources/access-token.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Content-type	Description	Detail
/management/token	POST	application/json	Obtain an access token (access type = organization)	Detail
/{org_id}/{app_id}/token	POST	application/json	Obtain an access token (access type = application)	Detail
/{org_id}/{app_id}/token	POST	application/json	Obtain an access token (access type = application user)	Detail
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/activities.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/activities.txt b/docs/rest-endpoints/sources/activities.txt
deleted file mode 100644
index 1e8ee67..0000000
--- a/docs/rest-endpoints/sources/activities.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Content-type	Description	Detail
/{org_id}/{app_id}/users/{uuid}/activities	POST	application/json	Create an activity	Detail
/{org_id}/{app_id}/users/{username}/activities	POST	application/json	Create an activity	Detail
/{org_id}/{app_id}/groups/{uuid}/activities	POST	application/json	Post an activity to a group	Detail
/{org_id}/{app_id}/groups/{groupname}/activities	POST	application/json	Post an activity to a group	Detail
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/admin-users.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/admin-users.txt b/docs/rest-endpoints/sources/admin-users.txt
deleted file mode 100644
index 52746c7..0000000
--- a/docs/rest-endpoints/sources/admin-users.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Content-type	Description	Detail
/management/users	POST	application/json	Create an admin user	Detail
/management/users/{identifier}	PUT	application/json	Update an admin user	Detail
/management/users/{identifier}	GET	application/json	Get an admin user	Detail
/management/users/{identifier}/ password	PUT	application/json	Set an admin user's password	Detail
/management/users/resetpw	GET	application/json	Initiate the reset of an admin user's password	Detail
/management/users/resetpw	POST	application/json	Complete the reset of an admin user's password	Detail
/management/users/{identifier}/activate?token={token}&confirm={confirm_email}	GET	application/json	Activate an admin user	Detail
/management/users/{identifier}/reactivate	GET	application/json	Reactivate an admin user	Detail
/management/users/{identifier}/feed	GET	application/json	Get an admin user's feed	Detail
\ No newline at end of file


[3/9] incubator-usergrid git commit: Switch over to generating api-docs via Groovy, Swagger and Mustache.java.

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/src/main/resources/usergrid-swagger.yaml
----------------------------------------------------------------------
diff --git a/docs/src/main/resources/usergrid-swagger.yaml b/docs/src/main/resources/usergrid-swagger.yaml
new file mode 100644
index 0000000..6aceb32
--- /dev/null
+++ b/docs/src/main/resources/usergrid-swagger.yaml
@@ -0,0 +1,2319 @@
+swagger: "2.0"
+info:
+  title: Usergrid API
+  description:  "Usergrid API"
+  version: 1.0.0
+host: api.usergrid.com
+schemes:
+  - https
+basePath: /
+produces:
+  - application/json
+paths:
+  /management/users:
+    post:
+      summary: "Creating an admin user."
+      description: "Create a whole new admin user."
+      parameters:
+        - name: adminuserproperty
+          in: body
+          description: "One or more sets of user properties of which username is mandatory and must be unique."
+          required: true
+          schema:
+            $ref: CreateAdminUser
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of new created Admin user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/users/{userId}:     
+    put:
+      summary: "Updating an admin user."
+      description: "Update the info of an admin user."
+      parameters:
+        - $ref: "#/parameters/userId"
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of user's details."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+    get:
+      summary: "Getting an admin user."
+      description: "Retrieve details about an admin user."
+      parameters:
+        - $ref: "#/parameters/userId"
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of user's details"
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/users/resetpw:
+    post:
+      summary: "Completing a password reset."
+      description: "Complete the password reset through getting the newpassword and the old one for identification."
+      parameters:
+        - name: ResetPWMsg
+          in: body
+          description: "Parameters and value for the Captcha challenge, the admin user's response to the Captcha challenge, and the admin user's email address."
+          required: true
+          schema: 
+            $ref: ResetPWMsg
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+    get:
+      summary: "Initiating a password reset."
+      description: "Initiate the reset of an admin user's password."
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/users/{userId}/password:
+    put:
+      summary: "Setting an admin user's password."
+      description: "Update an admin user's password through getting the newpassword and the old one for identification."
+      parameters:
+        - $ref: "#/parameters/userId"
+        - name: ResetPW
+          in: body
+          description: "The user's old and new password."
+          required: true
+          schema:
+            $ref: ResetPW
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/users/{userId}/activate:
+    get:
+      summary: "Activating an admin user."
+      description: "Activate an admin user from a link provIded in an email notification."
+      parameters:
+        - $ref: "#/parameters/userId"
+        - name: token
+          in: query
+          description: "Activation token's query statement."
+          required: true
+          type: string
+        - name: confirm_email
+          in: query
+          description: "Query statement of whether send confimation email or not."
+          required: true
+          type: boolean
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/users/{userId}/reactivate:
+    get:
+      summary: "Reactivating an admin user."
+      description: "Reactivate an expired admin user."
+      parameters:
+        - $ref: "#/parameters/userId"
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/users/{userId}/feed:
+    get:
+      summary: "Getting an admin user's activity feed."
+      description: "Retrieve an admin user's activity feed."
+      parameters:
+        - $ref: "#/parameters/userId"
+      tags:
+        - ActivityFeed
+      responses:
+        "200":
+          description: "An array of user's activity"
+          schema:
+            $ref: ActivityFeed
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/users/{userId}/activities:
+    post:
+      summary: "Posting a user activity."
+      description: "Create an activity in the activities collection."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"
+        - $ref: "#/parameters/userId-3"
+        - name: CreateActivity
+          in: body
+          description: "One or more sets of activity properties."
+          required: true
+          schema:
+            $ref: CreateActivity
+      tags:
+        - ActivityFeed
+      responses:
+        "200":
+          description: "An array of user's activity."
+          schema:
+            $ref: ActivityFeed
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/groups/{groupId}/activities:
+    post:
+      summary: "Posting an activity to a group."
+      description: "Create an activity to a specific group. In this case the activity is created in the activities collection and is accessible at the /activities endpoint to users who have the permission to read that endpoint. In addition, a relationship is established between the activity and the group, and because of that, the activity will appear in the group’s feed. The group 'owns' the activity. Also, the activity will be published in the feed of all users that are members of the group."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"
+        - $ref: "#/parameters/groupId" 
+        - name: CreateActivity
+          in: body
+          description:  "One or more sets of activity properties."
+          required: true
+          schema:
+            $ref: CreateActivity
+      tags:
+        - ActivityFeed
+      responses:
+        "200":
+          description:  "An array of user's activity."
+          schema:
+            $ref: ActivityFeed
+        default:
+          description:  "Unexpected error."
+          schema:
+            $ref: Error 
+  /management/orgs:
+    post:
+      summary: "Creating an organization."
+      description: "Create an organization through a form post."
+      parameters:
+        - name: CreateOrg
+          in: body
+          description: "A set of organization properties supplied through a form."
+          required: true
+          schema:
+            $ref: CreateOrg
+      tags:
+        - Organization
+      responses:
+        "200":
+          description: "An array of created Organization."
+          schema:
+            $ref: Organization
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /management/orgs/{orgId}:
+    get:
+      summary: "Getting an organization."
+      description: "Retrieve an organization given a specified UUID or username."
+      parameters:
+        - $ref: "#/parameters/orgId"
+      tags:
+        - Organization
+      responses:
+        "200":
+          description: "An array of created Organization."
+          schema:
+            $ref: Organization
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /management/orgs/{orgId}/activate:
+    get:
+      summary: "Activating an organization."
+      description: "Activate an organization from a link provIded in an email notification."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - name: token
+          in: query
+          description: "Activation token."
+          required: true
+          type: string          
+        - name: confirm_email
+          in: query
+          description: "Send confirmation email or not."
+          required: true
+          type: boolean  
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error   
+  /management/orgs/{orgId}/reactivate:    
+    get:
+      summary: "Reactivating an organization"
+      description: "Reactivate an expired organization."
+      parameters:   
+        - $ref: "#/parameters/orgId"
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /management/orgs/{orgId}/credentials:
+    post:
+      summary: "Generating organization client credentials."
+      description: "Generate whole new credentials for an organization client."
+      parameters:
+        - $ref: "#/parameters/orgId"
+      tags:
+        - Credential
+      responses:
+        "200":
+          description: "An array of Credential"
+          schema:
+            $ref: Credential
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    get:
+      summary: "Retrieving organization client credentials."
+      description: "Retrieve the credentials for an organization client."
+      parameters:
+        - $ref: "#/parameters/orgId"
+      tags:
+        - Credential
+      responses:
+        "200":
+          description: "An array of Credential"
+          schema:
+            $ref: Credential
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /management/orgs/{orgId}/feed:
+    get:
+      summary: "Getting an organization's activity feed."
+      description: "Retrieve an organization's activity feed."
+      parameters:
+        - $ref: "#/parameters/orgId"
+      tags:
+        - ActivityFeed
+      responses:
+        "200":
+          description: "An array of the organization's ActivityFeed."
+          schema:
+            $ref: ActivityFeed
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error   
+  /management/orgs/{orgId}/apps:
+    post:
+      summary: "Creating an organization application."
+      description: "Create an application for an organization through a form post."
+      parameters:   
+        - $ref: "#/parameters/orgId"
+        - name: CreateApp
+          in: body
+          description: "A set of organization properties supplied through a form."
+          required: true
+          schema:
+            $ref: CreateApp   
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /management/orgs/{orgId}/apps/{appId}:
+    delete:
+      summary: "Removing an application from the organization."
+      description: "Remove an application from an organization through providing both Id of application and organization."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"
+      tags:
+        - AppData
+      responses:
+        "200":
+          description: "An array of deleted application info."
+          schema:
+            $ref: AppData
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/orgs/{orgId}/apps/{appId}/credentials:
+    post:
+      summary: "Generating application credentials."
+      description: "Generate the client Id and client secret credentials for an application in an organization."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"
+      tags:
+        - Credential
+      responses:
+        "200":
+          description: "An array of generated credentials info."
+          schema:
+            $ref: Credential
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+    get:
+      summary: "Getting application credentials."
+      description: "Retrieve the client Id and client secret credentials for an application in an organization."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"
+      tags:
+        - Credential
+      responses:
+        "200":
+          description: "An array of retrieved credentials info."
+          schema:
+            $ref: Credential
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/orgs/{orgId}/apps:
+    get:
+      summary: "Getting the applications in an organization."
+      description: "Retrieve the applications in an organization through providing both Id of application and organization."
+      parameters:
+        - $ref: "#/parameters/orgId"
+      tags:
+        - AppData
+      responses:
+        "200":
+          description: "An array of retrieved application data."
+          schema:
+            $ref: AppData
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /management/orgs/{orgId}/users/{userId}:
+    put:
+      summary: "Adding an admin user to an organization."
+      description: "Add an existing admin user to an organization."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/userId-2"     
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of new added Admin user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/orgs/{orgId}/users:
+    get:
+      summary: "Getting the admin users in an organization."
+      description: "Retrieve details about the admin users in an organization."
+      parameters:
+        - $ref: "#/parameters/orgId"
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of retrieved Admin user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /management/orgs/{orgId}/users/{userId}:
+    delete:
+      summary: "Removing an admin user from an organization."
+      description: "Remove an admin user from an organization through providing both Id of application and organization."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/userId-2" 
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of deleted Admin user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+
+  /{orgId}/{appId}/{collectionId}:
+    get:
+      summary: "Retrieving sets of entities from a collection."
+      description: "Use the GET method to retrieve a set of entities from a collection."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"
+        - $ref: "#/parameters/collectionId"
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of retrieved collection's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /{orgId}/{appId}/{entitytype}:
+    post:
+      summary: "Creating a custom entity."
+      description: "When a new entity is created, Usergrid will automatically create a corresponding collection if one does not already exist. The collection will automatically be named with the plural form of the entity type. "
+      parameters: 
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - name: entitytype
+          in: path
+          description: "The entity type to create."
+          required: true
+          type: string
+        - name: entityproperty
+          in: body
+          description: "The properties of the entity."
+          required: true
+          schema:
+            $ref: CreateEntities  
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of created custom entity's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/{collectionId}/{entityId}:
+    get:
+      summary: "Retrieving an entity."
+      description: "Retrieve an entity through providing Id of application, organization, collection and entity."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - $ref: "#/parameters/collectionId"
+        - $ref: "#/parameters/entityId"  
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of retrieved entity's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    put:
+      summary: "Updating an entity."
+      description: "One or more properties can be updated with a single request."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - $ref: "#/parameters/collectionId"
+        - $ref: "#/parameters/entityId" 
+        - name: entityproperty
+          in: body
+          description: "The properties of the entity."
+          required: true
+          schema:
+            $ref: CreateEntities 
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of updated entity's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error         
+    delete:
+      summary: "Deleting an entity."
+      description: "Delete an entity from the collection."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - $ref: "#/parameters/collectionId"
+        - $ref: "#/parameters/entityId" 
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of deleted entity's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error   
+  /{orgId}/{appId}/{collectionId}:
+    get:
+      summary: "Query a collection。"
+      description: "Retrieve collection through query statement."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - $ref: "#/parameters/collectionId"
+        - name: queryStatement
+          in: query
+          description: "Any values specified in the query statement should be enclosed in single-quotes."
+          required: true
+          type: string
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of retrieved collection's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    put:
+      summary: "Update a collection by query"
+      description: "Update collection through query statement."
+      parameters: 
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - $ref: "#/parameters/collectionId"
+        - name: queryStatement
+          in: query
+          description: "Any values specified in the query statement should be enclosed in single-quotes."
+          required: true
+          type: string
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of updated collection's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/{collectionId}/{entityId1}/{relation}/{entityId2}:
+    post:
+      summary: "Add an entity to a collection."
+      description: "Add an entity to a collection through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - $ref: "#/parameters/collectionId"    
+        - name: entityId1
+          in: path
+          description: "The Id of the 1st entity."
+          required: true
+          type: string 
+        - name: relation
+          in: path
+          description: "The relation between 1st entity and 2nd entity."
+          required: true
+          type: string 
+        - name: entityId2
+          in: path
+          description: "The Id of the 2nd entity."
+          required: true
+          type: string
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of added entity's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    delete:
+      summary: "Remove an entity from a collection."
+      description: "Remove an entity from a collection through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - $ref: "#/parameters/collectionId"     
+        - name: entityId1
+          in: path
+          description: "The Id of the 1st entity."
+          required: true
+          type: string 
+        - name: relation
+          in: path
+          description: "The relation between 1st entity and 2nd entity."
+          required: true
+          type: string 
+        - name: entityId2
+          in: path
+          description: "The Id of the 2nd entity."
+          required: true
+          type: string
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of deleted entity's info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/events:
+    post:
+      summary: "Create an event."
+      description: "Create an event through providing both Id of organization and application."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - name: CreateEvent
+          in: body
+          description: "The required property of the event."
+          required: true
+          schema:
+            $ref: CreateEvent        
+      tags:
+        - Event
+      responses:
+        "200":
+          description: "An array of created event's info."
+          schema:
+            $ref: Event
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error  
+  /{orgId}/{appId}/groups:
+    post:
+      summary: "Create a new group."
+      description: "Create a new group through providing both Id of organization and application."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - name: groupproperty
+          in: body
+          description: "The property of the created group."
+          required: true
+          schema:
+            $ref: CreateGroup
+      tags:
+        - Group
+      responses:
+        "200":
+          description: "An array of created group's info."
+          schema:
+            $ref: Group
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error  
+  /{orgId}/{appId}/groups/{groupId}/users/{userId}:
+    post:
+      summary: "Add a user to a group."
+      description: "Add a user to a group through providing all the identifications."
+      parameters:        
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/groupId"
+        - $ref: "#/parameters/userId-3" 
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of added user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error  
+    delete:
+      summary: "Delete user from a group."
+      description: "Delete user from a group through providing all the identifications."
+      parameters:   
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/groupId"
+        - $ref: "#/parameters/userId-3" 
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of deleted user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{org_Id}/{app_Id}/groups/{groupId}:
+    get:
+      summary: "Get a group."
+      description: "Get a group through through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/groupId"
+      tags:
+        - Group
+      responses:
+        "200":
+          description: "An array of retrieved group's info."
+          schema:
+            $ref: Group
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    put:
+      summary: "Update a group."
+      description: "Update a group through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/groupId"
+      tags:
+        - Group
+      responses:
+        "200":
+          description: "An array of updated group's info."
+          schema:
+            $ref: Group
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/groups/{groupId}/feed:
+    get: 
+      summary: "Get a group's feed."
+      description: "Get a group's feed through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/groupId" 
+      tags:
+        - ActivityFeed
+      responses:
+        "200":
+          description: "An array of group's activity."
+          schema:
+            $ref: ActivityFeed
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/roles:
+    post:
+      summary: "Create a new role."
+      description: "Create a new role through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - name: roleproperty
+          in: body
+          description: "The required properties of the role."
+          required: true
+          schema:
+            $ref: AddRole      
+      tags:
+        - Role
+      responses:
+        "200":
+          description: "An array of created role's info."
+          schema:
+            $ref: Role
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    get:
+      summary: "Get the roles in an application"
+      description: "Retrieve the roles in an application through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+      tags:
+        - Role
+      responses:
+        "200":
+          description: "An array of retrieved role's info."
+          schema:
+            $ref: Role
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error  
+  /{orgId}/{appId}/roles/{rolename}:
+    delete:
+      summary: "Delete a role."
+      description: "Remove a role through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - name: rolename
+          in: path
+          description: "The name of the role."
+          required: true
+          type: string
+      tags:
+        - Role
+      responses:
+        "200":
+          description: "An array of deleted role's info."
+          schema:
+            $ref: Role
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error  
+  /{orgId}/{appId}/roles/{roleId}/permissions:
+    post:
+      summary: "Add permissions to a role."
+      description: "Add permissions to a role through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/roleId"
+        - name: permissionproperty
+          in: body
+          description: "the properties of permissions"
+          required: true
+          schema:
+            $ref: AddPermission
+      tags:
+        - Permission
+      responses:
+        "200":
+          description: "An array of created permission's info."
+          schema:
+            $ref: Permission
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    get:
+      summary: "Get permissions for a role."
+      description: "Retrieve permissions for a role through providing all the identifications."
+      parameters: 
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/roleId"
+      tags:
+        - Permission
+      responses:
+        "200":
+          description: "An array of retrieved permission's info."
+          schema:
+            $ref: Permission
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error  
+  /{orgId}/{appId}/roles/{roleId}/permissions:
+    delete:
+      summary:  "Delete permissions from a role."
+      description:  "Remove permissions from a role. "
+      parameters:      
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/roleId"
+        - name: grant_url_pattern
+          in: query
+          description: "The query statement of the url pattern."
+          required: true
+          type: string
+      tags:
+        - Permission
+      responses:
+        "200":
+          description: "An array of deleted permission's info."
+          schema:
+            $ref: Permission
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/roles/{roleId}/users/{userId}:
+    post:
+      summary: "Add a user to a role."
+      description: "Add a user to a role through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/roleId"
+        - $ref: "#/parameters/userId-3"
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of added user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    delete:
+      summary: "Delete a user from a role."
+      description: "Remove a user from a role through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/roleId"
+        - $ref: "#/parameters/userId-3" 
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of deleted user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/roles/{roleId}/users:
+    get:
+      summary: "Get the users in a role."
+      description: "Retrieve the users in a role through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/roleId"
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of retrieved user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/users:
+    post:
+      summary: "Create a user in the users collection."
+      description: "Create a user in the users collection through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - name: CreateUser
+          in: body
+          description: "The properties of the user."
+          required: true
+          schema:
+            $ref: CreateUser
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of created user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+    get:
+      summary: "Query to get users."
+      description: "Retrieve users though query statement."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - name: queryStatement
+          in: query
+          description: "The query statement of the User."
+          required: true
+          type: string
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of retrieved user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /{orgId}/{appId}/users/{user}/password:
+    post:
+      summary: "Set a user's password or reset the user's existing password."
+      description: "Set a user's password or reset the user's existing password."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"  
+        - name: username
+          in: path
+          description: "The username of the user."
+          required: true
+          type: string
+        - name: ResetPW
+          in: body
+          description: "The user's old and new password."
+          required: true
+          schema:
+            $ref: ResetPW    
+      tags:
+        - Action
+      responses:
+        "200":
+          description: "An array of complete messages."
+          schema:
+            $ref: Action
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error   
+  /{orgId}/{appId}/users/{userId}:
+    get:
+      summary:  "Retrieve a user."
+      description:  "Retrieve a user through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/userId-2" 
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of retrieved user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+    put:
+      summary: "Update a user"
+      description: "Update a user through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/userId-3" 
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of updated user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error  
+    delete:
+      summary: "Delete a user."
+      description: "Remove a user through providing all the identifications."
+      parameters:    
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/userId-3" 
+      tags:
+        - User
+      responses:
+        "200":
+          description: "An array of deleted user's info."
+          schema:
+            $ref: User
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /{orgId}/{appId}/users/{userId}/{relation}:
+    get:
+      summary: "Query a user's collections or connections."
+      description: "Retrieve a user's collections or connections through query statement."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/userId-3"      
+        - name: relation
+          in: path
+          description:  "The relation between user and collections."
+          required: true
+          type: string
+        - name: queryStatement
+          in: query
+          description:  "The query statement of the user."
+          required: true
+          type: string
+      tags:
+        - Entity
+      responses:
+        "200":
+          description: "An array of user's collections info."
+          schema:
+            $ref: Entity
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /{orgId}/{appId}/users/{userId}/feed:
+    get:
+      summary: "Get a user's feed."
+      description: "Retrieve a user's feed through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/userId-3"         
+      tags:
+        - ActivityFeed
+      responses:
+        "200":
+          description: "An array of user's activity feed."
+          schema:
+            $ref: ActivityFeed
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+
+  /{orgId}/{appId}/devices/{deviceId}/notifications:
+    post:
+      summary: "Creating notifications for a single device."
+      description: "Create notifications for a single device. This request will target a specific device entity."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/deviceId"
+        - $ref: "#/parameters/notification"
+        - $ref: "#/parameters/scheduleNotification" 
+        - $ref: "#/parameters/setExpiration"
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of created notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /{orgId}/{appId}/devices/*/notifications:
+    post:
+      summary: "Creating notifications for all devices."
+      description:  "Create notifications for all devices. This request will target all device entities."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/notification"
+        - $ref: "#/parameters/scheduleNotification" 
+        - $ref: "#/parameters/setExpiration"
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of created notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description:  "Unexpected error."
+          schema:
+            $ref: Error
+  /{orgId}/{appId}/users/{userId}/notifications:
+    post:
+      summary: "Creating notifications for a user."
+      description: "Create notifications for a user. This request will target a specific user entity."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/userId-3" 
+        - $ref: "#/parameters/notification"
+        - $ref: "#/parameters/scheduleNotification" 
+        - $ref: "#/parameters/setExpiration"
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of created notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error
+  /{orgId}/{appId}/groups/{path}/notifications:
+    post:
+      summary: "Creating notifications for a group."
+      description: "Create notifications for a group. This request will target all users associated with a specific group entity."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - name: path
+          in: path
+          description:  "The path of the group."
+          required: true
+          type: string
+        - $ref: "#/parameters/notification"
+        - $ref: "#/parameters/scheduleNotification" 
+        - $ref: "#/parameters/setExpiration"
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of created notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error           
+  /{orgId}/{appId}/devices:
+    post:
+      summary: "Creating notifications for user through location."
+      description: "Create notifications for user through targeting by location and providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/notification"
+        - $ref: "#/parameters/scheduleNotification" 
+        - $ref: "#/parameters/setExpiration"
+        - name: queryStatement
+          in: query
+          description: "The query statement of the location of the user."
+          required: true
+          type: string
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of created notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error       
+  /{orgId}/{appId}/notifications:
+    get:
+      summary: "Getting one or more notifications."
+      description: "Retrieve one or more notifications through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"    
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of retrieved notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error             
+  /{orgId}/{appId}/{receiptId}/*/notifications:
+    get:
+      summary: "Getting notifications associated with one or more receipts."
+      description: "Retrieve notifications associated with one or more receipts through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/receiptId" 
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of retrieved notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/{notificationId}/*/queue:
+    get:
+      summary: "Getting the list of devices associated with one or more notifications before the notifications are sent"
+      description: "Retrieve the list of devices associated with one or more notifications before the notifications are sent through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/notificationId" 
+      tags:
+        - Devices
+      responses:
+        "200":
+          description: "An array of retrieved device's info."
+          schema:
+            $ref: Device
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  "/my-org/sandbox/notifications/{notificationId}":
+    put:
+      summary: "Canceling sent notifications."
+      description: "Cancel sent notifications through providing the Id of the notification."
+      parameters:
+        - $ref: "#/parameters/notificationId"
+        - name: cancelMsg
+          in: body
+          description: "Indicete whether is canceled or not."
+          required: true
+          schema:
+            $ref: CancelMSG        
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of canceled notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/notifications/{notificationId}:
+    delete:
+      summary: "Deleting unsent notifications."
+      description: "Remove unsent notifications through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/notificationId"
+      tags:
+        - Notification
+      responses:
+        "200":
+          description: "An array of deleted notification's info."
+          schema:
+            $ref: Notification
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error  
+  /{orgId}/{appId}/receipts:
+    get:
+      summary: "Getting one or more receipts."
+      description: "Retrieve one or more receipts through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId"        
+      tags:
+        - Receipt
+      responses:
+        "200":
+          description: "An array of retrieved receipt's info."
+          schema:
+            $ref: Receipt
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/{deviceId}/*/receipts:
+    get:
+      summary: "Getting receipts associated with one or more devices."
+      description: "Retrieve receipts associated with one or more devices through providing all the identifications."
+      parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/deviceId"
+      tags:
+        - Receipt
+      responses:
+        "200":
+          description: "An array of retrieved receipt's info."
+          schema:
+            $ref: "#/definitions/Receipt"
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error 
+  /{orgId}/{appId}/{notificationId}/*/receipts:
+   get:
+     summary: Get receipts for one or more notifications."
+     description: Retrieve receipts for one or more notifications through providing all the identifications."
+     parameters:
+        - $ref: "#/parameters/orgId"
+        - $ref: "#/parameters/appId" 
+        - $ref: "#/parameters/notificationId"
+     tags:
+        - Receipt
+     responses:
+        "200":
+          description: "An array of retrieved receipt's info."
+          schema:
+            $ref: "Receipt"
+        default:
+          description: "Unexpected error."
+          schema:
+            $ref: Error       
+
+parameters:
+  userId:
+    name: userId
+    in: path
+    description: "One of the user's identification which includes username, real name, email address or UUID."
+    required: true
+    type: string
+  userId-1:
+    name: userId-1
+    in: path
+    description: "One of the user's identification which includes username, real name, email address or UUID."
+    required: true
+    type: string
+  userId-2:
+    name: userId-2
+    in: path
+    description: "One of the user's identification which includes username, email address or UUID."
+    required: true
+    type: string
+  userId-3:
+    name: userId-3
+    in: path
+    description: "One of the user's identification which includes username or UUID."
+    required: true
+    type: string
+  appId:
+    name: appId
+    in: path
+    description: "One of the application's identification which includes name or uuid."
+    required: true
+    type: string 
+  orgId:
+    name: orgId
+    in: path
+    description: "One of the organization's identification which includes name or uuid."
+    required: true
+    type: string 
+  groupId:
+    name: groupId
+    in: path
+    description: "One of the group's identification which includes name or uuid."
+    required: true
+    type: string 
+  deviceId:
+    name: deviceId
+    in: path
+    description: "One of the device's identification which includes name or uuid."
+    required: true
+    type: string  
+  notificationId:
+    name: notificationId
+    in: path
+    description: "One of the notification's identification which includes name or uuid."
+    required: true
+    type: string        
+  receiptId:
+    name: receiptId
+    in: path
+    description: "One of the receipt's identification which includes name or uuid."
+    required: true
+    type: string 
+  collectionId:
+    name: collectionId
+    in: path
+    description: "One of the collection's identification which includes name or uuid."
+    required: true
+    type: string 
+  roleId:
+    name: roleId
+    in: path
+    description: "One of the role's identification which includes name or uuid."
+    required: true
+    type: string 
+  entityId:
+    name: entityId
+    in: path
+    description: "One of the entity's identification which includes name or uuid."
+    required: true
+    type: string 
+  notification:
+    name: notification
+    in: body
+    description: "These parameters are used when forming the notification portion of the request."
+    required: true
+    schema:
+      $ref: CreateNotifications 
+  scheduleNotification:  
+    name: scheduleNotification
+    in: body
+    description: "To schedule a notification for a later time add the deliver parameter with a UNIX timestamp to the body of your request."
+    required: false
+    schema:
+      $ref: ScheduleNotification
+  setExpiration: 
+    name: setExpiration
+    in: body
+    description: "If a push service can't deliver a message to a device and needs to resend it you can set a notification to expire after a certain date/time."
+    required: false
+    schema:
+      $ref: SetExpiration
+
+definitions:
+  CancelMSG:
+    required:
+      - canceled
+    properties:
+      canceled:
+        type: boolean
+  Receipt:
+    properties:
+      uuid:
+        type: string
+        description:  "Unique entity Id."
+      type:
+        type: string
+        description:  "Type of entity."
+      created:
+        type: number
+        description:  "UTC timestamp in milliseconds of when the entity was created."
+        format: int64
+      modified:
+        type: number
+        description:  "UTC timestamp in milliseconds of when the entity was last modified."
+        format: int64
+      payloads:
+        type: string
+        description:  "The push notifications to be delivered."
+      errorMessage:
+        type: string
+        description:  "Error message returned by the notification service (APNs or GCM) if the notification fails entirely."
+      errorCode:
+        type: string
+        description:  "Error code returned by the notification service."
+      sent: 
+        type: number
+        description:  "UTC timestamp in milliseconds for when the notification was sent."
+      metadata:
+        $ref: Metadata   
+      completeMsg:
+        $ref: Action
+  Device:
+    properties:
+      uuid:
+        type: string
+        description:  "Unique entity Id."
+      type:
+        type: string
+        description:  "Type of entity."
+      name: 
+        type: string
+        description:  "Notifier display name."
+      created:
+        type: number
+        description:  "UTC timestamp in milliseconds of when the entity was created."
+        format: int64
+      modified:
+        type: number
+        description:  "UTC timestamp in milliseconds of when the entity was last modified."
+        format: int64
+      metadata:
+        $ref: Metadata   
+      completeMsg:
+        $ref: Action
+  ScheduleNotification:
+    # TODO should be a long and not a string
+    required:
+      - timestamp
+    properties:
+      timestamp:
+        type: string
+        description: "UTC timestamp in milliseconds of when schedule notifications."
+        #format: int64
+  SetExpiration:
+    # TODO should be a long and not a string
+    required:
+      - timestamp
+    properties:
+      timestamp:
+        type: string 
+        description: "UTC timestamp in milliseconds of when set expirations."
+        #format: int64
+  Notification:
+    required:
+      - payloads
+    properties:
+      uuid:
+        type: string
+        description:  "Unique entity Id."
+      type:
+        type: string
+        description:  "Type of entity."
+      created:
+        type: number
+        description:  "UTC timestamp in milliseconds of when the entity was created."
+        format: int64
+      modified:
+        type: number
+        description:  "UTC timestamp in milliseconds of when the entity was last modified."
+        format: int64
+      payloads:
+        type: string
+        description:  "The push notifications to be delivered."
+      errorMessage:
+        type: string
+        description:  "Error message returned by the notification service (APNs or GCM) if the notification fails entirely."
+      scheduled:
+        type: boolean
+        description:  "whether the notification is currently scheduled for delivery."
+      state:
+        type: string
+        description:  "The current delivery status of the notification 'FINISHED', 'SCHEDULED' or 'CANCELED'."
+      metadata:
+        $ref: Metadata 
+      completeMsg:
+        $ref: Action
+  Notifier:
+    required:
+      - provider
+      - environment
+    properties:
+      uuid:
+        type: string
+        description:  "Unique entity Id."
+      type:
+        type: string
+        description:  "Type of entity."
+      name: 
+        type: string
+        description:  "Notifier display name."
+      created:
+        type: number
+        description:  "UTC timestamp in milliseconds of when the entity was created."
+        format: int64
+      modified:
+        type: number
+        description:  "UTC timestamp in milliseconds of when the entity was last modified."
+        format: int64
+      provider:
+        type: string
+        description:  "Push notification provider 'apple' or 'google'."
+      environment:
+        type: string
+        description:  "The environment that corresponds to your app 'development' or 'production'."
+      metadata:
+        $ref: Metadata
+  CreateNotifications:
+    type: array
+    items:
+      $ref: CreateNotification
+  CreateNotification:
+    required:
+      - notifier
+      - message
+    properties:
+      notifier:
+        $ref: Notifier
+      message:
+        type: string
+        description:  "The push notitfication message that will be delivered to the user."
+  Permission:
+    properties:
+      applicationName: 
+        type: string
+        description:  "The name of the application of the permission."
+      entity:
+        $ref: Entity
+      url:
+        type: string
+        description:  "The url of the permission."
+      applicationId:
+        type: string
+        description:  "The UUID of the application."
+      parameters:
+        type: string
+        description:  "The parameters of the permission."
+      organization:
+        type: string
+        description:  "The organization of the permission."
+      permissiondata:
+          $ref: AddPermission
+  AddPermission:
+    required:
+      - operation
+      - resource_path
+    properties:
+      operation:
+        type: string
+        description:  "A comma-delimited set of HTTP methods (GET, PUT, POST, DELETE) that are allowed for the specified resource path."
+      resource_path:
+        type: string
+        description:  "The path to the resources to be accessed."
+  Role:
+    properties:
+      applicationName:
+        type: string
+        description:  "The application name of the event."
+      count:
+        type: number
+        description:  "The numebr of the roles."
+        format: int32
+      entity:
+        $ref: Entity
+      url:
+        type: string
+        description:  "The url of the event."
+      applicationId:
+        type: string
+        description:  "The application UUID of the event."
+      parameters:
+        type: string
+        description:  "The parameters of the event."
+      organization:
+        type: string
+        description:  "The title of the organization."
+      completeMsg:
+        $ref: Action    
+      path:
+        type: string  
+        description:  "The path of the role."
+  AddRole:
+    required:
+      - title
+      - role name
+    properties:
+      title:
+        type: string
+        description:  "The title of the role."
+      role name:
+        type: string
+        description:  "The name of the role."
+  Event:
+    properties:
+      applicationName:
+        type: string
+        description:  "The application name of the event."
+      entity:
+        $ref: Entity
+      url:
+        type: string
+        description:  "The url of the event."
+      applicationId:
+        type: string
+        description:  "The application UUID of the event."
+      parameters:
+        type: string
+        description:  "The parameters of the event."
+      organization:
+        type: string
+        description:  "The title of the organization."
+      completeMsg:
+        $ref: Action
+  CreateEvent:
+    # TODO should be a number and not a string
+    required:
+      - timestamp
+    properties:
+      timestamp:
+        type: string
+#       format : int32
+  Group:
+    properties:
+      uuid:
+        type: string
+        description:  "The UUID of the group."
+      type:
+        type: string
+        description:  "The type of the group."
+      created:
+        type: string
+        description:  "The created Id for the group."
+      modified:
+        type: string
+        description:  "The modified Id for the group."
+      path:
+        type: string
+        description:  "The path of the group."
+      metadata:
+        $ref: Metadata
+      title:
+        type: string
+        description:  "The title of the group."
+      completeMsg:
+        $ref: Action
+  CreateGroup:
+    required:
+      - title
+      - path
+    properties:
+      title: 
+        type: string
+        description:  "The title of the group."
+      path:
+        type: string
+        description:  "The path of the group."
+  CreateEntities:
+    type: array
+    items:
+      $ref: CreateEntity
+  CreateEntity:
+    properties:
+      property:
+        type: string
+        description:  "The property of the entity."
+      value:
+        type: string
+        description:  "The relevant value of the property."
+  Entity:
+    properties:
+      applicationId:
+        type: string
+        description:  "The application Id of the entity."
+      parameters:
+        type: string
+        description:  "The parameters of the entity."
+      path:
+        type: string
+        description:  "The path of the entity."
+      url:
+        type: string
+        description:  "The url of the entity."
+      entityproperty:
+        $ref: Entity
+      organization:
+        type: string
+        description:  "The name of the organization."
+      applicationName:
+        type: string
+        description:  "The name of the application."
+      count:
+        type: number
+        description:  "The number of the entities retrieved."
+        format: int32
+      completeMsg:
+        $ref: Action
+  CreateApp:
+    required:
+      - token
+      - name
+    properties:
+      token:
+        type: string        
+        description:  "The OAuth2 access token."
+      name:
+        type: string
+        description:  "The name of the application."
+  Credential:
+    properties:
+      client_Id:
+        type: string
+        description:  "The Id of the client."
+      client_secret:
+        type: string
+        description:  "The secret of the client."
+      completeMsg:
+        $ref: Action
+  Organization:
+    properties:
+      applicationId:
+        type: string
+        description:  "The application Id of the owner."
+      username:
+        type: string
+        description:  "The username of the owner."
+      name:
+        type: string
+        description:  "The name of the owner."
+      email:
+        type: string
+        description:  "The email of the owner."
+      activated:
+        type: boolean
+        description:  "Indicate whether the account is activated or not."
+      disabled:
+        type: boolean
+        description:  "Indicate whether the account is disabled or not."
+      uuid:
+        type: string
+        description:  "The UUID of the owner."
+      adminUser:
+        type: boolean
+        description:  "Indicate whether the use is a adminUser or not."
+      displayEmail:
+        type: string
+        description:  "The display of the email of the owner."
+      htmldisplayEmail:
+        type: string
+        description:  "The HTML display of the email of the owner."
+      orgname:
+        type: string
+        description:  "The name of the organization."
+      orguuId: 
+        type: string
+        description:  "The UUID of the organization."
+      applicationdata:
+        $ref: AppData
+      completeMsg:
+        $ref: Action
+  AppData:
+    properties:
+      tester/sandbox: 
+        type: string
+        description:  "The UUID of tester/sandbox."
+      tester/app1:
+        type: string
+        description:  "The UUID of tester/app1."
+      tester/app2:
+        type: string
+        description:  "The UUID of tester/app2."
+      completeMsg:
+        $ref: Action
+  CreateOrg:
+    required:
+      - organization
+      - username
+      - name
+      - email
+      - password
+    properties:
+      organization:
+        type: string
+      username:
+        type: string
+      name:
+        type: string
+      email:
+        type: string
+      password:
+        type: string
+  CreateActivity:
+    required:
+      - displayName
+      - uuid
+      - username
+      - verb
+      - content
+    properties:
+      displayName:
+        type: string
+      uuid:
+        type: string
+      username:
+        type: string
+      image:
+        $ref: ImageModel
+      verb:
+        type: string
+      content:
+        type: string
+  ImageModel:
+    properties:
+      duration:
+        type: number
+        format: int32
+      height:
+        type: number
+        format: int32
+      url:
+        type: string
+      wIdth:
+        type: integer
+        format: int32
+      email:
+        type: string
+  ResetPWMsg:
+    required:
+      - recaptcha_response
+      - recaptcha_challenge
+      - email
+    properties:
+      recaptcha_response:
+        type: string
+        description: "Parameters and value for the Captcha challenge."
+      recaptcha_challenge:
+        type: string
+        description: "The admin user's response to the Captcha challenge."
+      email:
+        type: string
+  ResetPW:
+    required:
+      - password
+      - newpassword
+    properties:
+      password:
+        type: string
+      newpassword:
+        type: string
+  AdminUserUpdate:
+    properties:
+      city: 
+        type: string
+      state:
+        type: string
+  CreateAdminUser:
+    required:
+      - username
+    properties:
+      username:
+        type: string
+      email:
+        type: string
+      name:
+        type: string
+      password:
+        type: string
+  CreateUser:
+    required:
+      - username
+    properties:
+      username:
+        type: string
+  User:
+    properties:
+      applicationId:
+        type: string
+        description:  "The application Id of a user."
+      username:
+        type: string
+        description:  "The username of a user."
+      name:
+        type: string
+        description:  "The name of a user."
+      email:
+        type: string
+        description:  "The email of a user."
+      activated:
+        type: boolean
+        description:  "Indicate whether the account is activated or not."
+      disabled:
+        type: boolean
+        description:  "Indicate whether the account is disabled or not."
+      uuid:
+        type: string
+        description:  "The UUID of a user."
+      adminUser:
+        type: boolean
+        description:  "Indicate whether the use is a adminUser or not."
+      displayEmail:
+        type: string
+        description:  "The display of the email of a user."
+      htmldisplayEmail:
+        type: string
+        description:  "The HTML display of the email of a user."
+      organization:
+        type: string
+        description:  "The organization of the user."
+      picture:
+        type: string
+        description:  "The uri of the user's picture."
+      uri:
+        type: string
+        description:  "The uri of the user."
+      path:
+        type: string
+        description:  "The path of the user."
+      completeMsg:
+        $ref: Action
+  Action:
+    properties:
+      action:
+        type: string
+        description:  "The requested action."
+      status:
+        type: string
+        description:  "The status of the requested action."
+      timestamp:
+        type: number
+        description:  "The timestamp of the requested action."
+        format: int64
+      duration:
+        type: number
+        description:  "The duration of the requested action."
+        format: int32
+      token:
+        type: string 
+        description:  "The token required for getting an AdminUser."
+  ActivityFeed:
+    properties:
+      entityproperty:
+        $ref: Entity
+      category:
+        type: string
+        description:  "The category of the activity."
+      metadataproperty:
+        $ref: Metadata
+      objectproperty:
+        $ref: Object
+      title:
+        type: string
+        description:  "The title of the activity."
+      verb:
+        type: string
+        description:  "The verb of the activity."
+      published:
+        type: number
+        description:  "UTC timestamp of the feed publish time."
+        format: int64
+      verb:
+        type: string
+        description:  "The verb of the activity."
+      completeMsg:
+        $ref: Action
+  Object:
+    properties:
+      displayname:
+        type: string
+        description:  "The display of the name of the object."
+      objecttype:
+        type: string
+        description:  "The type of the object."
+      objectuuId:
+        type: string
+        description:  "The UUID of the object."
+      entitytype:
+        type: string
+        description:  "The entitytype of the object."
+  Metadata:
+    properties:
+      cursor:
+        type: string
+        description:  "The cursor of the metadata."
+      path:
+        type: string
+        description:  "The path of the metadata."
+      sets:
+        $ref: Sets    
+      collections:
+        $ref: Collections
+  Collections:
+    properties:
+      activities:
+        type: string
+      feed:
+        type: string
+      roles:
+        type: string
+      users:
+        type: string 
+  Sets:
+    properties:
+      rolenames:
+        type: string
+      permissions:
+        type: string
+  Actor:
+    properties:
+      displayname:
+        type: string
+        description:  "The display of the name of the actor."
+      objecttype:
+        type: string
+        description:  "The type of the actor."
+      objectuuId:
+        type: string
+        description:  "The UUID of the actor."
+      entitytype:
+        type: string
+        description:  "The entitytype of the actor."
+  Entity:
+    properties:
+      uuid:
+        type: string
+        description:  "The UUID of the entity."
+      type:
+        type: string
+        description:  "The type of the entity."
+      created:
+        type: number
+        description:  "UTC timestamp of entity creation time."
+        format: int64
+      modified:
+        type: number
+        description:  "UTC timestamp of entity modified time."
+        format: int64
+      actorproperty:
+        $ref: Actor
+      metadata:
+        $ref: Metadata
+      name:
+        type: string
+        description:  "The name of the entity."
+      message:
+        type: string
+  Error:
+    properties:
+      code:
+        type: integer
+        format: int32
+      message:
+        type: string
+      fields:
+        type: object
+        
+        
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/update-api-docs.sh
----------------------------------------------------------------------
diff --git a/docs/update-api-docs.sh b/docs/update-api-docs.sh
new file mode 100755
index 0000000..e07eabf
--- /dev/null
+++ b/docs/update-api-docs.sh
@@ -0,0 +1,2 @@
+groovy src/main/groovy/ApiDocGenerator.groovy 
+


[6/9] incubator-usergrid git commit: Switch over to generating api-docs via Groovy, Swagger and Mustache.java.

Posted by sn...@apache.org.
Switch over to generating api-docs via Groovy, Swagger and Mustache.java.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/445ac3ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/445ac3ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/445ac3ec

Branch: refs/heads/ug2-doc-update
Commit: 445ac3ecfc6f1759f9e35165127e31633110ca83
Parents: cefc789
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Aug 3 11:40:01 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Aug 3 11:40:01 2015 -0400

----------------------------------------------------------------------
 docs/_static/css/theme.css                     |  174 ++
 docs/default-entities/activity.md              |   76 -
 docs/default-entities/application.md           |   91 -
 docs/default-entities/asset.md                 |   51 -
 docs/default-entities/device.md                |   36 -
 docs/default-entities/event.md                 |   61 -
 docs/default-entities/folder.md                |   46 -
 docs/default-entities/group.md                 |   41 -
 docs/default-entities/notification.md          |   51 -
 docs/default-entities/notifier.md              |   46 -
 docs/default-entities/receipt.md               |   46 -
 docs/default-entities/role.md                  |   51 -
 docs/default-entities/sources/activity.txt     |    1 -
 docs/default-entities/sources/application.txt  |    1 -
 docs/default-entities/sources/asset.txt        |    1 -
 docs/default-entities/sources/csv2md.groovy    |   42 -
 docs/default-entities/sources/device.txt       |    1 -
 docs/default-entities/sources/event.txt        |    1 -
 docs/default-entities/sources/folder.txt       |    1 -
 docs/default-entities/sources/group.txt        |    1 -
 docs/default-entities/sources/notification.txt |    1 -
 docs/default-entities/sources/notifier.txt     |    1 -
 docs/default-entities/sources/receipt.txt      |    1 -
 docs/default-entities/sources/role.txt         |    1 -
 docs/default-entities/sources/user.txt         |    1 -
 docs/default-entities/user.md                  |   41 -
 docs/index.rst                                 |   33 +-
 docs/pom.xml                                   |   91 -
 docs/rest-endpoints/access-token.md            |   42 -
 docs/rest-endpoints/activities.md              |   28 -
 docs/rest-endpoints/admin-users.md             |   77 -
 docs/rest-endpoints/api-docs.md                | 2945 +++++++++++++++++++
 docs/rest-endpoints/collections.md             |   84 -
 docs/rest-endpoints/events.md                  |   21 -
 docs/rest-endpoints/groups.md                  |   56 -
 docs/rest-endpoints/organizations.md           |  111 -
 docs/rest-endpoints/roles.md                   |   76 -
 docs/rest-endpoints/sources/access-token.txt   |    1 -
 docs/rest-endpoints/sources/activities.txt     |    1 -
 docs/rest-endpoints/sources/admin-users.txt    |    1 -
 docs/rest-endpoints/sources/collections.txt    |    1 -
 docs/rest-endpoints/sources/csv2md.groovy      |   43 -
 docs/rest-endpoints/sources/events.txt         |    1 -
 docs/rest-endpoints/sources/groups.txt         |    1 -
 docs/rest-endpoints/sources/organizations.txt  |    1 -
 docs/rest-endpoints/sources/roles.txt          |    1 -
 docs/rest-endpoints/sources/users.txt          |    1 -
 docs/rest-endpoints/users.md                   |   90 -
 docs/src/main/groovy/ApiDocGenerator.groovy    |  176 ++
 docs/src/main/resources/model.mustache         |   21 +
 docs/src/main/resources/operation.mustache     |   21 +
 docs/src/main/resources/usergrid-swagger.yaml  | 2319 +++++++++++++++
 docs/update-api-docs.sh                        |    2 +
 docs/usergrid-swagger.yaml                     | 2316 ---------------
 54 files changed, 5661 insertions(+), 3765 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/_static/css/theme.css
----------------------------------------------------------------------
diff --git a/docs/_static/css/theme.css b/docs/_static/css/theme.css
index 3de5ab1..17d12b3 100755
--- a/docs/_static/css/theme.css
+++ b/docs/_static/css/theme.css
@@ -5334,3 +5334,177 @@ span[id*='MathJax-Span'] {
 tr.ug-even td {
     background-color: #EAF2F5;
 }
+
+h2.usergrid-GET-heading {
+    color: white;
+    background-color: dodgerblue;
+}
+h2.usergrid-POST-heading {
+    color: white;
+    background-color: green;
+}
+h2.usergrid-PUT-heading {
+    color: white;
+    background-color: orange;
+}
+h2.usergrid-DELETE-heading {
+    color: white;
+    background-color: red;
+}
+
+/* css from petstore example */
+
+body {
+    font-family: Trebuchet MS, sans-serif;
+    font-size: 15px;
+    color: #444;
+    margin-right: 24px;
+}
+
+h1	{
+    font-size: 25px;
+}
+h2	{
+    font-size: 20px;
+}
+h3	{
+    font-size: 16px;
+    font-weight: bold;
+}
+hr	{
+    height: 1px;
+    border: 0;
+    color: #ddd;
+    background-color: #ddd;
+    display: none;
+}
+
+.app-desc {
+    clear: both;
+    margin-left: 20px;
+}
+.param-name {
+    width: 100%;
+}
+.license-info {
+    margin-left: 20px;
+}
+
+.license-url {
+    margin-left: 20px;
+}
+
+.model {
+    margin: 0 0 0px 20px;
+}
+
+.method {
+    margin-left: 20px;
+}
+
+.method-notes	{
+    margin: 10px 0 20px 0;
+    font-size: 90%;
+    color: #555;
+}
+
+pre {
+    padding: 10px;
+    margin-bottom: 2px;
+}
+
+pre.get {
+    background-color: #0f6ab4;
+}
+
+pre.post {
+    background-color: #10a54a;
+}
+
+pre.put {
+    background-color: #c5862b;
+}
+
+pre.delete {
+    background-color: #a41e22;
+}
+
+.huge	{
+    color: #fff;
+}
+
+pre.example {
+    background-color: #f3f3f3;
+    padding: 10px;
+    border: 1px solid #ddd;
+}
+
+code {
+    white-space: pre;
+}
+
+.nickname {
+    font-weight: bold;
+}
+
+.method-path {
+    font-size: 1.5em;
+    background-color: #0f6ab4;
+}
+
+.parameter {
+    width: 500px;
+}
+
+.param {
+    width: 500px;
+    padding: 10px 0 0 20px;
+    font-weight: bold;
+}
+
+.param-desc {
+    width: 700px;
+    padding: 0 0 0 20px;
+    color: #777;
+}
+
+.param-type {
+    font-style: italic;
+}
+
+.field-label {
+    padding: 0;
+    margin: 0;
+    clear: both;
+}
+
+.field-items	{
+    padding: 0 0 15px 0;
+    margin-bottom: 15px;
+}
+
+.return-type {
+    clear: both;
+    padding-bottom: 10px;
+}
+
+.param-header {
+    font-weight: bold;
+}
+
+.method-tags {
+    text-align: right;
+}
+
+.method-tag {
+    background: none repeat scroll 0% 0% #24A600;
+    border-radius: 3px;
+    padding: 2px 10px;
+    margin: 2px;
+    color: #FFF;
+    display: inline-block;
+    text-decoration: none;
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/activity.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/activity.md b/docs/default-entities/activity.md
deleted file mode 100644
index 462a3de..0000000
--- a/docs/default-entities/activity.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# Activity
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'activity'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>actor</td>
-    <td>ActivityObject</td>
-    <td>Required. Entity that performed the 'action' of the activity (see JSON Activity Streams 1.0 specification). By default, the UUID of the user who performed the action is recorded as the value of the 'uuid' property of this object.</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>verb</td>
-    <td>string</td>
-    <td>Required. The action performed by the user (for example, post)</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>published</td>
-    <td>long</td>
-    <td>Required. UTC timestamp in milliseconds of when the activity was published</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>content</td>
-    <td>string</td>
-    <td>Optional. Description of the activity</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>icon</td>
-    <td>MediaLink</td>
-    <td>Optional. Visual representation of a media link resource (see JSON Activity Streams 1.0 specification)</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>category</td>
-    <td>string</td>
-    <td>Optional. Category used to organize activities</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>published</td>
-    <td>long</td>
-    <td>Optional. UTC timestamp in milliseconds when the activity was published</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>object</td>
-    <td>ActivityObject</td>
-    <td>Optional. Object on which the action is performed (see JSON Activity Streams 1.0 specification)</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>title</td>
-    <td>string</td>
-    <td>Optional. Title or headline for the activity</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the activity entity, as well as additional data entities associated with the activity. The following properties are included in metadata: path: Path to retrieve the activity entity, including the UUID of the user entity associated with the activity and the UUID of the activity entity</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/application.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/application.md b/docs/default-entities/application.md
deleted file mode 100644
index c5195d6..0000000
--- a/docs/default-entities/application.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# Application
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>String</td>
-    <td>Type of entity, in this case 'application'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>name</td>
-    <td>string</td>
-    <td>Optional. Application name</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>accesstokenttl</td>
-    <td>long</td>
-    <td>Optional. Time to live value for an access token obtained within the application</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>organizationName</td>
-    <td>string</td>
-    <td>Name of the organization the application belongs to</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>applicationName</td>
-    <td>string</td>
-    <td>Name of the application</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>title</td>
-    <td>string</td>
-    <td>Optional. Application title</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>description</td>
-    <td>string</td>
-    <td>Optional. Application description</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>activated</td>
-    <td>boolean</td>
-    <td>Optional. Whether application is activated</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>disabled</td>
-    <td>boolean</td>
-    <td>Optional. Whether application is administratively disabled</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>allowOpenRegistration</td>
-    <td>boolean</td>
-    <td>Optional. Whether application allows any user to register</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>registrationRequiresEmailConfirmation</td>
-    <td>boolean</td>
-    <td>Optional. Whether registration requires email confirmation</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>registrationRequiresAdminApproval</td>
-    <td>boolean</td>
-    <td>Optional. Whether registration requires admin approval</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>notify_admin_of_new_users</td>
-    <td>boolean</td>
-    <td>Optional. Whether application admins should be notified of new users</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides a 'collections' object with the relative paths to all entity collections associated with the application. The following collections are included in metadata by default: users: Path to retrieve the /users collection groups: Path to retrieve the /groups collection folders: Path to retrieve the /folders collection events: Path to retrieve the /events collection assets: Path to retrieve the /assets collection activities: Path to retrieve the /activities collection devices: Path to retrieve the /devices collection notifiers: Path to retrieve the /notifiers collection notifications: Path to retrieve the /notifications collection receipts: Path to retrieve the /receipts collection</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/asset.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/asset.md b/docs/default-entities/asset.md
deleted file mode 100644
index 103f451..0000000
--- a/docs/default-entities/asset.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# Asset
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'asset'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>name</td>
-    <td>string</td>
-    <td>Optional. Asset name</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>owner</td>
-    <td>UUID</td>
-    <td>Required. UUID of the user entity that owns the asset</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>path</td>
-    <td>string</td>
-    <td>Required. Relative path to the asset</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>content-type</td>
-    <td>string</td>
-    <td>MIME media type that describes the asset (see media types)</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the asset entity, as well as additional data entities associated with the asset. The following properties are included in metadata: path: Path to retrieve the asset entity</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/device.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/device.md b/docs/default-entities/device.md
deleted file mode 100644
index b02480e..0000000
--- a/docs/default-entities/device.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Device
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'device'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>name</td>
-    <td>string</td>
-    <td>Optional. Device name</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the device entity, as well as additional data entities associated with the user. The following properties are included in metadata: path: Path to retrieve the device entity, including the device UUID collections: Nested object that contains paths to data entity collections associated with the device. receipts: Receipt entities associated with the device users: User entities associated with the device</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/event.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/event.md b/docs/default-entities/event.md
deleted file mode 100644
index 692c394..0000000
--- a/docs/default-entities/event.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# Event
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>String</td>
-    <td>Type of entity, in this case 'event'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>timestamp</td>
-    <td>long</td>
-    <td>Required. UTC timestamp in milliseconds of when the application event occurred</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>user</td>
-    <td>UUID</td>
-    <td>Optional. UUID of application user that posted the event</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>group</td>
-    <td>UUID</td>
-    <td>Optional. UUID of application group that posted the event</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>category</td>
-    <td>string</td>
-    <td>Optional. Category used for organizing similar events</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>counters</td>
-    <td>map</td>
-    <td>Optional. Counter used for tracking number of similar events</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>message</td>
-    <td>string</td>
-    <td>Optional. Message describing event. Will be null if no message is specified</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the event entity, as well as additional data entities associated with the event. The following properties are included in metadata: path: Path to retrieve the event entity</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/folder.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/folder.md b/docs/default-entities/folder.md
deleted file mode 100644
index 5180937..0000000
--- a/docs/default-entities/folder.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Folder
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'folder'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>name</td>
-    <td>string</td>
-    <td>Optional. Folder name</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>owner</td>
-    <td>UUID</td>
-    <td>Required. UUID of the folder's owner</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>path</td>
-    <td>string</td>
-    <td>Required. Relative path to the folder</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the folder entity, as well as additional data entities associated with the asset. The following properties are included in metadata: path: Path to retrieve the folder entity</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/group.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/group.md b/docs/default-entities/group.md
deleted file mode 100644
index 47eace8..0000000
--- a/docs/default-entities/group.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# Group
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity UUID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'group'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>path</td>
-    <td>string</td>
-    <td>Required. Relative path where the group can be retrieved</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>title</td>
-    <td>string</td>
-    <td>Optional. Display name for the group entity</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the group entity, as well as additional data entities associated with the group. The following properties are included in metadata: path: Path to retrieve the group entity, including the group UUID sets: Nested object that contains the 'rolenames' and 'permissions' properties. rolenames: Path to retrieve a list of roles associated with the group. permissions: Path to retrieve a list of all permissions directly associated with the group. If the group is associated with a role, the list will not include permissions associated with the role entity. collections: Nested object that contains paths to data entity collections associated with the group. activities: Activity entities associated with the group feed: A feed of all activities published by users associated with the group roles: Role entities associated with the group users: User entities associated with the group</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/notification.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/notification.md b/docs/default-entities/notification.md
deleted file mode 100644
index 22ee397..0000000
--- a/docs/default-entities/notification.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# Notification
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'notification'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>payloads</td>
-    <td>string</td>
-    <td>Required. The push notifications to be delivered, formatted as key-value pairs of notifier entities and messages (<notifier_name1>:<message1>, <notifier_name2>:<message2>, ...)</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>errorMessage</td>
-    <td>string</td>
-    <td>Error message returned by the notification service (APNs or GCM) if the notification fails entirely</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>scheduled</td>
-    <td>bool</td>
-    <td>Whether the notification is currently scheduled for delivery</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>state</td>
-    <td>string</td>
-    <td>The current delivery status of the notification: FINISHED, SCHEDULED or CANCELED.</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the notification entity, as well as additional data entities associated with the notification. The following properties are included in metadata: path: Path to retrieve the notification object collections: Nested object that contains paths to data entity collections associated with the notification. queue: Device entities scheduled to receive the push notification receipts: Receipt entities for delivery attempts</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/notifier.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/notifier.md b/docs/default-entities/notifier.md
deleted file mode 100644
index 41f801c..0000000
--- a/docs/default-entities/notifier.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Notifier
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'notifier'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>name</td>
-    <td>string</td>
-    <td>Optional. Notifier display name</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>provider</td>
-    <td>string</td>
-    <td>Required. Push notification provider: apple or google</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>environment</td>
-    <td>string</td>
-    <td>Required. The environment that corresponds to your app: development or production</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the notifier entity path: Path to retrieve the notification object</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/receipt.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/receipt.md b/docs/default-entities/receipt.md
deleted file mode 100644
index e5f6279..0000000
--- a/docs/default-entities/receipt.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Receipt
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'notifier'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>name</td>
-    <td>string</td>
-    <td>Optional. Notifier display name</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>provider</td>
-    <td>string</td>
-    <td>Required. Push notification provider: apple or google</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>environment</td>
-    <td>string</td>
-    <td>Required. The environment that corresponds to your app: development or production</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the notifier entity path: Path to retrieve the notification object</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/role.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/role.md b/docs/default-entities/role.md
deleted file mode 100644
index 3e03e90..0000000
--- a/docs/default-entities/role.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# Role
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'role'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>name</td>
-    <td>string</td>
-    <td>Optional. Unique name that identifies the role</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>roleName</td>
-    <td>string</td>
-    <td>Identical to the value of the 'name' property by default</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>title</td>
-    <td>string</td>
-    <td>Identical to the value of the 'name' property by default</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>inactivity</td>
-    <td>string</td>
-    <td>The amount of time, in milliseconds, that a user or group associated with the role can be inactive before they lose the permissions associated with that role. By default, 'inactivity' is set to 0 so that the user/group never loses the role.</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the role entity, as well as additional data entities associated with the role. The following properties are included in metadata: path: Path to retrieve the role entity sets: Nested object that contains the 'permissions' property. permissions: Path to retrieve a list of all permissions associated with the role. collections: Nested object that contains paths to data entity collections associated with the role. groups: Group entities associated with the role users: User entities associated with the role</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/activity.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/activity.txt b/docs/default-entities/sources/activity.txt
deleted file mode 100644
index a8237f2..0000000
--- a/docs/default-entities/sources/activity.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'activity'
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
actor	ActivityObject	Required. Entity that performed the 'action' of the activity (see JSON Activity Streams 1.0 specification). By default, the UUID of the user who performed the action is recorded as the value of the 'uuid' property of this object.
verb	string	Required. The action performed by the user (for example, post)
published	long	Required. UTC timestamp in milliseconds of when the activity was published
content	string	Optional. Description of the activity
icon	MediaLink	Optional. Visual representation of a media link resource (see JSON Activity Streams 1.0 specification)
category	string	Optional. Category used to organize activities
published	long	Optional. UTC timestamp in milliseconds when the activity was published
object	ActivityObject	Opti
 onal. Object on which the action is performed (see JSON Activity Streams 1.0 specification)
title	string	Optional. Title or headline for the activity
metadata	object	A nested, JSON-formatted object that provides the relative path to the activity entity, as well as additional data entities associated with the activity. The following properties are included in metadata: path: Path to retrieve the activity entity, including the UUID of the user entity associated with the activity and the UUID of the activity entity
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/application.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/application.txt b/docs/default-entities/sources/application.txt
deleted file mode 100644
index fde95f1..0000000
--- a/docs/default-entities/sources/application.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	String	Type of entity, in this case 'application'
name	string	Optional. Application name
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
accesstokenttl	long	Optional. Time to live value for an access token obtained within the application
organizationName	string	Name of the organization the application belongs to
applicationName	string	Name of the application
title	string	Optional. Application title
description	string	Optional. Application description
activated	boolean	Optional. Whether application is activated
disabled	boolean	Optional. Whether application is administratively disabled
allowOpenRegistration	boolean	Optional. Whether application allows any user to register
registrationRequiresEmailConfirmation	boolean	Optional. Whether registration requires email confirmation
registrationRequiresAdminApproval	boolean	Optional. Whether registration 
 requires admin approval
notify_admin_of_new_users	boolean	Optional. Whether application admins should be notified of new users
metadata	object	A nested, JSON-formatted object that provides a 'collections' object with the relative paths to all entity collections associated with the application. The following collections are included in metadata by default: users: Path to retrieve the /users collection groups: Path to retrieve the /groups collection folders: Path to retrieve the /folders collection events: Path to retrieve the /events collection assets: Path to retrieve the /assets collection activities: Path to retrieve the /activities collection devices: Path to retrieve the /devices collection notifiers: Path to retrieve the /notifiers collection notifications: Path to retrieve the /notifications collection receipts: Path to retrieve the /receipts collection
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/asset.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/asset.txt b/docs/default-entities/sources/asset.txt
deleted file mode 100644
index 463fe44..0000000
--- a/docs/default-entities/sources/asset.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'asset'
name	string	Optional. Asset name
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
owner	UUID	Required. UUID of the user entity that owns the asset
path	string	Required. Relative path to the asset
content-type	string	MIME media type that describes the asset (see media types)
metadata	object	A nested, JSON-formatted object that provides the relative path to the asset entity, as well as additional data entities associated with the asset. The following properties are included in metadata: path: Path to retrieve the asset entity
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/csv2md.groovy
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/csv2md.groovy b/docs/default-entities/sources/csv2md.groovy
deleted file mode 100644
index 8c12f39..0000000
--- a/docs/default-entities/sources/csv2md.groovy
+++ /dev/null
@@ -1,42 +0,0 @@
-def dir = new File(".");
-def files = dir.list();
-files.each() { fileName ->
-    if ( fileName.endsWith(".txt") ) {
-
-        def baseName = fileName.substring(0, fileName.length() - 4);
-
-        def outputFile = new File("../" + baseName + ".md");
-        outputFile.withWriter('utf-8') { writer ->
-
-            def inputFile = new File(fileName);
-            def count = 0;
-            writer.writeLine "# ${baseName.capitalize()}"
-            writer.writeLine ""
-            writer.writeLine "<!-- DO NOT EDIT THIS GENERATED FILE -->";
-            writer.writeLine ""
-            writer.writeLine "<table class='usergrid-table entities-table'>";
-
-            inputFile.eachLine { line ->
-                def parts = line.split("\\t")
-                def evenodd = count % 2 ? "even" : "odd";
-                if ( count == 0 ) {
-                    writer.writeLine  "  <tr>"
-                    parts.each() { part ->
-                        writer.writeLine  "    <th>" + part + "</th>";
-                    }
-                    writer.writeLine  "  </tr>";
-                } else {
-                    writer.writeLine  "  <tr class='ug-${evenodd} usergrid-table'>";
-                    parts.each() { part ->
-                        writer.writeLine  "    <td>" + part + "</td>";
-                    }
-                    writer.writeLine  "  </tr>";
-                }
-                count++;
-            }
-            writer.writeLine  "</table>";
-
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/device.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/device.txt b/docs/default-entities/sources/device.txt
deleted file mode 100644
index a65adec..0000000
--- a/docs/default-entities/sources/device.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'device'
name	string	Optional. Device name
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
metadata	object	A nested, JSON-formatted object that provides the relative path to the device entity, as well as additional data entities associated with the user. The following properties are included in metadata: path: Path to retrieve the device entity, including the device UUID collections: Nested object that contains paths to data entity collections associated with the device. receipts: Receipt entities associated with the device users: User entities associated with the device
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/event.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/event.txt b/docs/default-entities/sources/event.txt
deleted file mode 100644
index c4dbcb3..0000000
--- a/docs/default-entities/sources/event.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	String	Type of entity, in this case 'event'
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
timestamp	long	Required. UTC timestamp in milliseconds of when the application event occurred
user	UUID	Optional. UUID of application user that posted the event
group	UUID	Optional. UUID of application group that posted the event
category	string	Optional. Category used for organizing similar events
counters	map	Optional. Counter used for tracking number of similar events
message	string	Optional. Message describing event. Will be null if no message is specified
metadata	object	A nested, JSON-formatted object that provides the relative path to the event entity, as well as additional data entities associated with the event. The following properties are included in metadata: path: Path to retrieve the event entity
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/folder.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/folder.txt b/docs/default-entities/sources/folder.txt
deleted file mode 100644
index bf65c85..0000000
--- a/docs/default-entities/sources/folder.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'folder'
name	string	Optional. Folder name
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
owner	UUID	Required. UUID of the folder's owner
path	string	Required. Relative path to the folder
metadata	object	A nested, JSON-formatted object that provides the relative path to the folder entity, as well as additional data entities associated with the asset. The following properties are included in metadata: path: Path to retrieve the folder entity
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/group.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/group.txt b/docs/default-entities/sources/group.txt
deleted file mode 100644
index d31a8e8..0000000
--- a/docs/default-entities/sources/group.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity UUID
type	string	Type of entity, in this case 'group'
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
path	string	Required. Relative path where the group can be retrieved
title	string	Optional. Display name for the group entity
metadata	object	A nested, JSON-formatted object that provides the relative path to the group entity, as well as additional data entities associated with the group. The following properties are included in metadata: path: Path to retrieve the group entity, including the group UUID sets: Nested object that contains the 'rolenames' and 'permissions' properties. rolenames: Path to retrieve a list of roles associated with the group. permissions: Path to retrieve a list of all permissions directly associated with the group. If the group is associated with a role, the list will not include permissions associated with the role entity. col
 lections: Nested object that contains paths to data entity collections associated with the group. activities: Activity entities associated with the group feed: A feed of all activities published by users associated with the group roles: Role entities associated with the group users: User entities associated with the group
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/notification.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/notification.txt b/docs/default-entities/sources/notification.txt
deleted file mode 100644
index df1e4bf..0000000
--- a/docs/default-entities/sources/notification.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'notification'
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
payloads	string	Required. The push notifications to be delivered, formatted as key-value pairs of notifier entities and messages (<notifier_name1>:<message1>, <notifier_name2>:<message2>, ...)
errorMessage	string	Error message returned by the notification service (APNs or GCM) if the notification fails entirely
scheduled	bool	Whether the notification is currently scheduled for delivery
state	string	The current delivery status of the notification: FINISHED, SCHEDULED or CANCELED.
metadata	object	A nested, JSON-formatted object that provides the relative path to the notification entity, as well as additional data entities associated with the notification. The following properties are included in metadata: path: Path to retrieve the notification object
  collections: Nested object that contains paths to data entity collections associated with the notification. queue: Device entities scheduled to receive the push notification receipts: Receipt entities for delivery attempts
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/notifier.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/notifier.txt b/docs/default-entities/sources/notifier.txt
deleted file mode 100644
index 238ff62..0000000
--- a/docs/default-entities/sources/notifier.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'notifier'
name	string	Optional. Notifier display name
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
provider	string	Required. Push notification provider: apple or google
environment	string	Required. The environment that corresponds to your app: development or production
metadata	object	A nested, JSON-formatted object that provides the relative path to the notifier entity path: Path to retrieve the notification object
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/receipt.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/receipt.txt b/docs/default-entities/sources/receipt.txt
deleted file mode 100644
index 238ff62..0000000
--- a/docs/default-entities/sources/receipt.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'notifier'
name	string	Optional. Notifier display name
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
provider	string	Required. Push notification provider: apple or google
environment	string	Required. The environment that corresponds to your app: development or production
metadata	object	A nested, JSON-formatted object that provides the relative path to the notifier entity path: Path to retrieve the notification object
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/role.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/role.txt b/docs/default-entities/sources/role.txt
deleted file mode 100644
index 20d303f..0000000
--- a/docs/default-entities/sources/role.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'role'
name	string	Optional. Unique name that identifies the role
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
roleName	string	Identical to the value of the 'name' property by default
title	string	Identical to the value of the 'name' property by default
inactivity	string	The amount of time, in milliseconds, that a user or group associated with the role can be inactive before they lose the permissions associated with that role. By default, 'inactivity' is set to 0 so that the user/group never loses the role.
metadata	object	A nested, JSON-formatted object that provides the relative path to the role entity, as well as additional data entities associated with the role. The following properties are included in metadata: path: Path to retrieve the role entity sets: Nested object that contains the 'permissions' pr
 operty. permissions: Path to retrieve a list of all permissions associated with the role. collections: Nested object that contains paths to data entity collections associated with the role. groups: Group entities associated with the role users: User entities associated with the role
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/sources/user.txt
----------------------------------------------------------------------
diff --git a/docs/default-entities/sources/user.txt b/docs/default-entities/sources/user.txt
deleted file mode 100644
index 31c3e0d..0000000
--- a/docs/default-entities/sources/user.txt
+++ /dev/null
@@ -1 +0,0 @@
-uuid	UUID	Unique entity ID
type	string	Type of entity, in this case 'user'
created	long	UTC timestamp in milliseconds of when the entity was created
modified	long	UTC timestamp in milliseconds of when the entity was last modified
username	string	Required. Valid and unique username
activated	boolean	Whether the user account is activated. Set to 'true' by default when the user is created.
metadata	object	A nested, JSON-formatted object that provides the relative path to the user entity, as well as additional data entities associated with the user. The following properties are included in metadata: path: Path to retrieve the user entity sets: Nested object that contains the 'rolenames' and 'permissions' properties. rolenames: Deprecated. Use /users/\/roles|username\> instead. Path to retrieve a list of roles associated with the user. permissions: Path to retrieve a list of all permissions directly associated with the user. If the user is associated with a role or group, the list will n
 ot include permissions associated with those entities. collections: Nested object that contains paths to data entity collections associated with the user. activities: Activity entities associated with the user devices: Device entities associated with the user feed: A feed of all activities published by the user groups: Group entities associated with the user roles: Role entities associated with the user following: Users that the user is following followers: Users that are following the user
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/default-entities/user.md
----------------------------------------------------------------------
diff --git a/docs/default-entities/user.md b/docs/default-entities/user.md
deleted file mode 100644
index ffee50e..0000000
--- a/docs/default-entities/user.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# User
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table entities-table'>
-  <tr>
-    <th>uuid</th>
-    <th>UUID</th>
-    <th>Unique entity ID</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>type</td>
-    <td>string</td>
-    <td>Type of entity, in this case 'user'</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>created</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was created</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>modified</td>
-    <td>long</td>
-    <td>UTC timestamp in milliseconds of when the entity was last modified</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>username</td>
-    <td>string</td>
-    <td>Required. Valid and unique username</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>activated</td>
-    <td>boolean</td>
-    <td>Whether the user account is activated. Set to 'true' by default when the user is created.</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>metadata</td>
-    <td>object</td>
-    <td>A nested, JSON-formatted object that provides the relative path to the user entity, as well as additional data entities associated with the user. The following properties are included in metadata: path: Path to retrieve the user entity sets: Nested object that contains the 'rolenames' and 'permissions' properties. rolenames: Deprecated. Use /users/\/roles|username\> instead. Path to retrieve a list of roles associated with the user. permissions: Path to retrieve a list of all permissions directly associated with the user. If the user is associated with a role or group, the list will not include permissions associated with those entities. collections: Nested object that contains paths to data entity collections associated with the user. activities: Activity entities associated with the user devices: Device entities associated with the user feed: A feed of all activities published by the user groups: Group entities associated with the user roles: Role entities associated with 
 the user following: Users that the user is following followers: Users that are following the user</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/index.rst
----------------------------------------------------------------------
diff --git a/docs/index.rst b/docs/index.rst
index 75fecfe..bcbca10 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -118,37 +118,10 @@ Apache Usergrid Documentation
 .. _rest-endpoints:
 
 .. toctree::
-   :maxdepth: 2
-   :caption: REST End-Points
-
-   rest-endpoints/access-token
-   rest-endpoints/activities
-   rest-endpoints/admin-users
-   rest-endpoints/collections
-   rest-endpoints/events
-   rest-endpoints/groups
-   rest-endpoints/organization
-   rest-endpoints/roles
-   rest-endpoints/users
-
-.. _default-entities:
+   :maxdepth: 0
+   :caption: API Reference
 
-.. toctree::
-   :maxdepth: 2
-   :caption: Default Entities
-
-   default-entities/activity             
-   default-entities/asset                
-   default-entities/event                
-   default-entities/group                
-   default-entities/notifier             
-   default-entities/role                 
-   default-entities/user
-   default-entities/application          
-   default-entities/device               
-   default-entities/folder               
-   default-entities/notification         
-   default-entities/receipt              
+   rest-endpoints/api-docs            
          
 .. _sdks:
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/pom.xml
----------------------------------------------------------------------
diff --git a/docs/pom.xml b/docs/pom.xml
deleted file mode 100644
index 3757b38..0000000
--- a/docs/pom.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <!--
-    Includes dependencies used by Groovy scripts in the docs directories.
-    -->
-    
-    <groupId>org.apache.usergrid</groupId>
-    <artifactId>doc-utils</artifactId>
-    <version>1.0.3-SNAPSHOT</version>
-    
-    <build>
-        <plugins>
-          
-            <!-- Ran into these problems when trying to use Swagger-Codegen to generate HTML: -->
-            <!--                                                                              -->
-            <!--   1. Usergrid Swagger file uses references and there's a bug in codegen:     -->
-            <!--      https://github.com/swagger-api/swagger-codegen/issues/552               -->
-            <!--                                                                              -->
-            <!--   2. The swagger-codegen-maven-plugin points at a discontinued version       --> 
-            <!--      of the Swagger-Codegen project (the old Wordnik version                 -->
-            
-            <!-- <plugin>
-                <groupId>com.garethevans.plugin</groupId>
-                <artifactId>swagger-codegen-maven-plugin</artifactId>
-                <version>0.0.1-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                        <configuration>
-                            <inputSpec>usergrid-swagger.yaml</inputSpec>
-                            <language>html</language>
-                            <output>${project.build.directory}/generated-sources/swagger</output>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin> -->     
-            
-        </plugins>
-    </build>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-parser</artifactId>
-            <version>1.0.8</version>
-        </dependency>
-
-        <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-compat-spec-parser</artifactId>
-            <version>1.0.8</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>1.7.5</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-            <version>1.7.5</version>
-            <scope>test</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-core</artifactId>
-            <version>2.4.4</version>
-            <scope>test</scope>
-        </dependency>
-        
-    </dependencies>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/access-token.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/access-token.md b/docs/rest-endpoints/access-token.md
deleted file mode 100644
index a7838b7..0000000
--- a/docs/rest-endpoints/access-token.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Access-token
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Content-type</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>"/management/token '{"grant_type":"client_credentials","client_id":"{client_id}","client_secret":"{client_secret}"}'"</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Obtain an access token (access type = organization)</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>"/management/token '{"grant_type":"password","username":"{username}",:"password":"{password}"}'"</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Obtain an access token (access type = admin user)</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>"/{org_id}/{app_id}/token '{"grant_type":"client_credentials","client_id":"{client_id}","client_secret":"{client_secret}"}'"</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Obtain an access token (access type = application)</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>"/{org_id}/{app_id}/token '{"grant_type":"password","username":"{username}","password":"{password}"}'"</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Obtain an access token (access type = application user)</td>
-    <td>Detail</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/activities.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/activities.md b/docs/rest-endpoints/activities.md
deleted file mode 100644
index 76f6808..0000000
--- a/docs/rest-endpoints/activities.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Activities
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Content-type</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/users/ {uuid|username}/activities</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create an activity</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/groups/ {uuid|groupname}/activities</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Post an activity to a group</td>
-    <td>Detail</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/admin-users.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/admin-users.md b/docs/rest-endpoints/admin-users.md
deleted file mode 100644
index e487337..0000000
--- a/docs/rest-endpoints/admin-users.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# Admin-users
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Content-type</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/users</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create an admin user</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/users/{user|username|email|uuid}</td>
-    <td>PUT</td>
-    <td>application/json</td>
-    <td>Update an admin user</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/users/{user|username|email|uuid}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get an admin user</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/users/{user|username|email|uuid}/ password</td>
-    <td>PUT</td>
-    <td>application/json</td>
-    <td>Set an admin user's password</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/managementusers/resetpw</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Initiate the reset of an admin user's password</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/users/resetpw</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Complete the reset of an admin user's password</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/users/{user|username|email|uuid}/activate? token={token}&confirm={confirm_email}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Activate an admin user</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/management/users/{user|username|email|uuid}/reactivate</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Reactivate an admin user</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/management/users/{user|username|email|uuid}/feed</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get an admin user's feed</td>
-    <td>Detail</td>
-  </tr>
-</table>


[9/9] incubator-usergrid git commit: Converted counters & events pages to Markdown.

Posted by sn...@apache.org.
Converted counters & events pages to Markdown.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/e17b4888
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/e17b4888
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/e17b4888

Branch: refs/heads/ug2-doc-update
Commit: e17b48889e38a7bc39dd8a37267e65a725f314e6
Parents: 840c4a0
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Aug 3 17:18:40 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Aug 3 17:18:40 2015 -0400

----------------------------------------------------------------------
 .../creating-and-incrementing-counters.md       |  74 +++++
 docs/counters-and-events/events-and-counters.md | 272 +------------------
 docs/counters-and-events/retrieving-counters.md | 109 ++++++++
 docs/counters-and-events/tbd.md                 |   1 -
 docs/index.rst                                  |   4 +-
 5 files changed, 192 insertions(+), 268 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e17b4888/docs/counters-and-events/creating-and-incrementing-counters.md
----------------------------------------------------------------------
diff --git a/docs/counters-and-events/creating-and-incrementing-counters.md b/docs/counters-and-events/creating-and-incrementing-counters.md
new file mode 100644
index 0000000..3bf7f57
--- /dev/null
+++ b/docs/counters-and-events/creating-and-incrementing-counters.md
@@ -0,0 +1,74 @@
+## Creating & incrementing counters
+To create a new counter or increment an existing counter, include the counter property in the body of a POST to the /events endpoint. More than one counter can be incremented in the same request.
+
+__Note__: It may take up to 30 seconds after an event has been posted for the counter to be incremented.
+
+### Request syntax
+
+    curl -X POST https://api.usergrid.com/<org>/<app>/events -d '{"timestamp":<timestamp>, "counters" : {<counter_name>:<increment_value>}}'
+    
+Parameters
+
+Parameter	    Description
+---------       -----------
+org	            Organization UUID or organization name
+app	            Application UUID or application name
+timestamp	    A required UNIX timestamp that specifies the time the counter is being incremented. 
+counter_name    The name of the counter to create or the existing counter to increment.
+increment_value	The value to increment the counter by. 
+
+Regarding the ``increment_value``, a negative number can be specified to decrement the value. A value of '0' can be specified to reset the value of the counter.
+
+For the ``timestamp``, specifying a value of 0 will automatically assign the current time.
+
+### Example request
+The following request will increment the 'button_clicks' counter by one, with a timestamp of the current time.
+
+    curl -X POST https://api.usergrid.com/your-org/your-app/events -d '{"timestamp":0, "counters" : {"button_clicks":1}}'
+    
+### Example response
+
+    {
+      "action" : "post",
+      "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+      "params" : { },
+      "path" : "/events",
+      "uri" : "https://api.usergrid.com/your-org/your-app/events",
+      "entities" : [ {
+        "uuid" : "b11217fc-9d3a-1427-b24e-699740088e05",
+        "type" : "event",
+        "created" : 1401224590293,
+        "modified" : 1401224590293,
+        "timestamp" : 1401224590293,
+        "counters" : {
+          "button_clicks" : 1
+        },
+        "message" : null,
+        "metadata" : {
+          "path" : "/events/b11217fc-9d3a-1427-b24e-699740088e05"
+        }
+      } ],
+      "timestamp" : 1401224590291,
+      "duration" : 30,
+      "organization" : "your-org",
+      "applicationName" : "your-app"
+    }
+		
+## Decrementing/resetting counters
+To decrement a counter, specify a negative number for the counter value in any of the above examples.
+
+To reset a counter, specify a value of 0 for the counter value in any of the above examples.
+
+Note that the Usergrid JavaScript SDK also provides dedicated methods for decrementing and resetting counters.
+
+## Using counters hierarchically
+
+You can organize counters into hierarchies by giving them dot-separated names, e.g. ``button_clicks.homepage``. Incrementing a counter lower in a hierarchy increments all of the counters upward in the hierarchy chain. 
+
+For example, you want to log errors that your app generates, so you create hierarchical counters for each module and function within that module. In this example, you create the following set of counters:
+
+    errors
+    errors.module
+    errors.module.function
+
+Incrementing ``errors.module.function`` by 1 increments all three counters by 1. A hierarchy can be a useful way of easily tracking actions in your app at both a cumulative and granular level.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e17b4888/docs/counters-and-events/events-and-counters.md
----------------------------------------------------------------------
diff --git a/docs/counters-and-events/events-and-counters.md b/docs/counters-and-events/events-and-counters.md
index 1d6cdcd..cbb0b93 100644
--- a/docs/counters-and-events/events-and-counters.md
+++ b/docs/counters-and-events/events-and-counters.md
@@ -1,268 +1,8 @@
-# Events and counters
+# Counters & events
+Counters can be used to track statistics on many aspects of an application by keeping a running count of the number of times an action occurs in your app. Posting an event increments the counter. Counters can also be retrieved by time period, allowing you to generate reports on specific actions in your app.
 
-Events are typically used for application logging. For example, they
-could be used to log error messages that a system administrator might
-review at a later time. The event mechanism is optimized to handle large
-numbers of events, so it is an ideal mechanism for logging in your
-application.
+With Usergrid, you can define your own counters. Some of the things that you might track with a user-defined counter are:
 
-You can link events to specific users, groups, or custom-defined
-categories. When created with these links, events offer a powerful tool
-for running highly targeted, custom reports.
-
-Events are also the primary way to store custom counter data for
-analytics. See Counters (below) for further details.
-
-
-Event properties
-----------------
-
-You can pass various system-defined properties for an event. For
-example, you can specify a user property, with a uuid as its value. This
-will link the event to the user and can be used to query against the
-events queue (see Categorization below). The same is true for the group
-property. Pass it with a uuid as the value and the event will be linked
-to the group. To include a uuid of a user or group, add the uuid to the
-request body, for example:
-
-    POST https://api.usergrid.com/my-org/my-app/events {"timestamp":0, "category" : "advertising", "counters" :  {"ad_clicks" : 5},"user" : "1234891-477d-11e1-b2bd-22005a1c4e22", "group" : "75577d891-347d-2231-b5bd-23400a1c4e22"}
-
-The response body would look something like this:
-
-    {
-     "action": "post",
-     "application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
-     "params": {},
-     "path": "/events",
-     "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/events",
-     "entities": [
-       {
-         "uuid": "ce07ea3c-68b5-11e1-a586-9227e40e3559",
-         "user": "1234891-477d-11e1-b2bd-22005a1c4e22",
-         "group": "75577d891-347d-2231-b5bd-23400a1c4e22",
-         "type": "event",
-         "created": 1331166585282,
-         "modified": 1331166585282,
-         "counters": {
-           "ad_clicks": 5
-         },
-         "metadata": {
-           "path": "/events/ce07ea3c-68b5-11e1-a586-9227e40e3559"
-         },
-         "timestamp": 1331166585282
-       }
-     ],
-     "timestamp": 1331166585018,
-     "duration": 919,
-     "organization": "my-org",
-     "applicationName": "my-app"
-    }
-
-You can also create application-specific event properties in addition to
-these predefined properties. The system-defined properties are reserved.
-You cannot use these names to create other properties for an event
-entity. In addition the events name is reserved for the events
-collection — you can't use it to name another collection.
-
-The System-defined properties are as follows:
-
-  Property    Type     Description
-  ----------- -------- -------------------------------------------------------------------------------------------
-  uuid        UUID     Event’s unique entity ID
-  type        String   "event"
-  created     long     [UNIX timestamp](http://en.wikipedia.org/wiki/Unix_time) of entity creation
-  modified    long     [UNIX timestamp](http://en.wikipedia.org/wiki/Unix_time) of entity modification
-  timestamp   long     [UNIX timestamp](http://en.wikipedia.org/wiki/Unix_time) of application event (mandatory)
-  user        UUID     UUID of application user that posted the event
-  group       UUID     UUID of application group that posted the event
-  category    string   Category used for organizing similar events
-  counters    map      Counter used for tracking number of similar events
-  message     string   Message describing event
-
-### Categorizing events
-
-As mentioned previously, you can link an event to a user or a group using a standard [Relationship](/docs/relationships).
-This enables you to categorize and qualify event data for use in
-tracking and analysis. For example, linking events to users and groups,
-enables you to track how often people use a feature. Not only can you
-determine the total number of users that used the feature, but also
-which groups contain users that made the most use of the feature. Or,
-you could provide a location with the event, so you could see how often
-a feature was used by people in San Francisco versus Los Angeles.
-
-Counters
---------
-
-User-defined counters are used in conjunction with events to keep
-statistics on many aspects of an application. User-defined counters are
-JSON objects that are added to events when they are posted. The act of
-posting an event increments the counter. Once created, user-defined
-counters can be used to get reports.
-
-**Note:** It may take up to 30 seconds for a counter to be updated.
-
-### User-Defined Counters
-
-With Apache Usergrid, you can define your own counters. Some of the things
-that you might track with a user-defined counter are:
-
--   How many times people click on the help button in your application.
--   How many times your game is played each day.
--   How many times your banner ads are clicked each day.
-
-You can choose any name for a user-defined counter. For example, the
-counter for the help button might be named “help\_button” or
-“help\_button\_clicks”.
-
-To create a user-defined counter, you post to the events collection and
-specify the name and increment value of the counter in the request body.
-The increment value is the value that the counter is incremented by for
-each tracked event. An increment value of 1, means that the counter is
-increment by 1 for each tracked event. You could also specify a higher
-increment value, such as 15, which would increment the value by that
-number, or a negative number, which would decrement the value.  You can
-also reset the value of the counter, by specifying an increment value of
-0.
-
-When a counter is incremented by an event, there will be a 20-30 second
-delay between when the event is posted and when the counter is
-incremented. 
-
-As an example, here's how to create a user-defined counter named
-“button\_clicks” with an increment value of 1:
-
-    POST https://api.usergrid.com/my-org/my-app/events {"counters" : {"button_clicks" : 1},"timestamp" : "0"}
-
-The response body would look something like this:
-
-    {
-       "action": "post",
-       "path": "/events",
-       "uri": "http://api.usergrid.com/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/events",
-       "entities": [
-           {
-               "uuid": "39d41c46-d8e4-11e0-bcc1-12313f0204bb",
-               "type": "event",
-               "timestamp": 1315353555546016,
-               "category":"advertising",
-               "counters": {
-                   "button_clicks": 1
-               },
-               "created": 1315353555546016,
-               "modified": 1315353555546016,
-               "metadata": {
-               "path": "/events/39d41c46-d8e4-11e0-bcc1-12313f0204bb"
-               }
-           }
-       ],
-       "timestamp": 1315353555537,
-       "duration": 110,
-       "organization": "my-org",
-       "applicationName": "my-app"
-    }
-
-### Counter hierarchy
-
-Counters are hierarchical in their structure and in the way they are
-incremented. Each level of the hierarchy is separated by the dot “.”
-operator. The hierarchical structure can be useful if you want to store
-or view statistics in a hierarchical way. For example, suppose you want
-to log errors that your app generates. One way to do this, is to fire an
-event every time an error occurs, by creating a counter called “errors”.
-However, you can get more detail by adding additional parameters to the
-counter. Imagine that you want to track errors in a specific module and
-function within that module, say module\_1, function\_1, you could use a
-counter like this:
-
-    errors.module_1.function_1
-
-And then for a different function in the same module:
-
-    errors.module_1.function_2
-
-And then for a different function in a different module:
-
-    errors.module_2.function_3
-
-If each of the preceding examples were called once, the resulting values
-would be:
-
-    errors = 3
-    errors.module_1 = 2
-    errors.module_1.function_1 = 1
-    errors.module_1.function_2 = 1
-    errors.module_2 = 1
-    errors.module_2.function_3 = 1
-
-This tells you that there were 3 errors in the application, with 2 of
-those errors in module\_1. You can then drill down further to see errors
-in specific functions.
-
-### Using counters in time series queries
-
-Knowing the value of a counter is useful. However, you often need to
-know how the value varies over time. Fortunately, the API provides a
-method for you to view this data over any time interval or level of
-granularity.
-
-For example, let’s say you’re incrementing a counter every time someone
-launches your application. You might be interested in which days of the
-week the application sees the most usage. Using the API, you can examine
-the counter over a set of weeks, with the data split into daily
-intervals. Using this information, you can see which are your peak days
-of usage. You can also view usage across a single day, so you can see if
-your application is used more in the mornings or the evenings. For
-business reporting, you may be more interested in monthly reporting.
-
-Note that the system is able to provide you with the report data as you
-need it. The data is maintained in real-time so it can be viewed
-instantly.
-
-### Retrieving counter data
-
-To retrieve counter data, you issue a GET request to the /counters
-endpoint. This is a special, built-in collection that gives you access
-to all the counters currently in the system. The API also provides a
-number of parameters that you can use to search for counter data, as
-follows:
-
-  Parameter     Type                                                                                 Description
-  ------------- ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-  start\_time   An [Epoch(Unix)](http://en.wikipedia.org/wiki/Unix_time) timestamp in milliseconds   The beginning of the time period to search
-  end\_time     An [Epoch(Unix)](http://en.wikipedia.org/wiki/Unix_time) timestamp in milliseconds   The end of the time period to search
-  counter       string                                                                               The name of a specific counter to search. You can specify more than one counter in a query (for example, counter=counter1&counter=counter2...)
-  resolution    string                                                                               The interval at which counters are displayed. For example, if the interval is day, and the start time and end time values span 4 days, you will get aggregate counts for each of the 4 days. Possible values are all, minute, five\_minutes, half\_hour, hour, six\_day, day, week, and month.
-
-For example, to retrieve a time range of values, with a granularity of
-"day", for a counter called "button\_clicks", the GET request would look
-like this:
-
-    GET /my-org/my-app/counters?start_time=1315119600000&end_time=1315724400000&resolution=day&counter=button_clicks
-
-The response body would look something like this:
-
-    {
-     action: "get",
-        uri: "http://api.usergrid.com/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/counters",
-        timestamp: 1315354369272,
-        duration: 28,
-        counters: [
-            {
-                name: "button_clicks",
-                values: [
-                    {
-                        value: 2
-                        timestamp: 1315180800000
-                    },
-                    {
-                        value: 1
-                        timestamp: 1315267200000
-                    },
-                    {
-                        value: 1
-                        timestamp: 1315353600000
-                    }
-                ]
-            }
-        ]
-    }
+* How many times people click on the help button in your application.
+* How many times your game is played each day.
+* How many times your banner ads are clicked each day.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e17b4888/docs/counters-and-events/retrieving-counters.md
----------------------------------------------------------------------
diff --git a/docs/counters-and-events/retrieving-counters.md b/docs/counters-and-events/retrieving-counters.md
new file mode 100644
index 0000000..5210952
--- /dev/null
+++ b/docs/counters-and-events/retrieving-counters.md
@@ -0,0 +1,109 @@
+# Retrieving counters
+To retrieve a counter, do the following:
+
+## Request syntax
+
+    curl -X GET https://api.usergrid.com/counters?counter=<counter_name>
+    
+Parameters
+
+Parameter       Description
+---------       -----------
+counter_name	The name of the counter to be retrieved. 
+
+More than one counter can be retrieved with a single request by appending additional counter parameters to the request URI.
+
+## Example request
+
+    curl -X GET https://api.usergrid.com/my-org/my-app/counters?counter=button_clicks
+    
+## Example response
+
+    {
+      "action" : "get",
+      "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+      "params" : {
+        "counter" : [ "button_clicks" ]
+      },
+      "uri" : "https://api.usergrid.com/your-org/your-app",
+      "entities" : [ ],
+      "timestamp" : 1401310084096,
+      "duration" : 21,
+      "organization" : "your-org",
+      "applicationName" : "your-app",
+      "count" : 0,
+      "counters" : [ {
+        "name" : "button_clicks",
+        "values" : [ {
+          "timestamp" : 1,
+          "value" : 9
+        } ]
+      } ]
+    }
+		
+## Retrieving counters by time interval
+Knowing the value of a counter is useful; however, you often need to know how the value varies over time. Fortunately, the API provides a method for you to view this data over any time interval or level of granularity.
+
+For example, let’s say you’re incrementing a counter every time someone launches your application. You might be interested in which days of the week the application sees the most usage. Using the API, you can examine the counter over a set of weeks, with the data split into daily intervals. Using this information, you can see which are your peak days of usage. You can also view usage across a single day, so you can see if your application is used more in the mornings or the evenings.
+
+## Request syntax
+
+    curl -X GET https://api.usergrid.com/counters?start_time=<timestamp>&end_time=<timestamp>&resolution=<resolution>&counter=<counter_name>
+    
+Parameters
+
+Parameter	 Description
+---------    -----------
+start_time   The beginning of the time period to search
+end_time     The end of the time period to search
+resolution   The interval at which counters are displayed. 
+counter_name The name of the counter to be retrieved.
+
+The following resolutions are supported:
+
+* all
+* minute
+* five_minutes
+* half_hour
+* hour
+* six_day
+* day
+* week
+* month
+
+For example, if the interval is day, and the start time and end time values span 4 days, you will get aggregate counts for each of the 4 days.
+
+## Example request
+
+For example, to retrieve a time range of values, with a granularity of "day", for a counter called "button_clicks", the GET request would look like this:
+
+    curl -X GET https://api.usergrid.com/my-org/my-app/counters?start_time=1315119600000&end_time=1315724400000&resolution=day&counter=button_clicks
+    
+## Example response
+
+    {
+     action: "get",
+        uri: "http://api.usergrid.com/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/counters",
+        timestamp: 1315354369272,
+        duration: 28,
+        counters: [
+            {
+                name: "button_clicks",
+                values: [
+                    {
+                        value: 2
+                        timestamp: 1315180800000
+                    },
+                    {
+                        value: 1
+                        timestamp: 1315267200000
+                    },
+                    {
+                        value: 1
+                        timestamp: 1315353600000
+                    }
+                ]
+            }
+        ]
+    }
+		
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e17b4888/docs/counters-and-events/tbd.md
----------------------------------------------------------------------
diff --git a/docs/counters-and-events/tbd.md b/docs/counters-and-events/tbd.md
deleted file mode 100644
index f65681d..0000000
--- a/docs/counters-and-events/tbd.md
+++ /dev/null
@@ -1 +0,0 @@
-# Coming soon...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e17b4888/docs/index.rst
----------------------------------------------------------------------
diff --git a/docs/index.rst b/docs/index.rst
index 6800aa4..5512b71 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -101,7 +101,9 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Counters and Events
   
-   counters-and-events/tbd
+   counters-and-events/events-and-counters
+   counters-and-events/creating-and-incrementing-counters
+   counters-and-events/retrieving-counters
    
 .. _organization-and-application-management:
 


[2/9] incubator-usergrid git commit: Switch over to generating api-docs via Groovy, Swagger and Mustache.java.

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/usergrid-swagger.yaml
----------------------------------------------------------------------
diff --git a/docs/usergrid-swagger.yaml b/docs/usergrid-swagger.yaml
deleted file mode 100644
index a8b956b..0000000
--- a/docs/usergrid-swagger.yaml
+++ /dev/null
@@ -1,2316 +0,0 @@
-swagger: "2.0"
-info:
-  title: Usergrid API
-  description:  "Usergrid API"
-  version: 1.0.0
-host: api.usergrid.com
-schemes:
-  - https
-basePath: /
-produces:
-  - application/json
-paths:
-  /management/users:
-    post:
-      summary: "Creating an admin user."
-      description: "Create a whole new admin user."
-      parameters:
-        - name: adminuserproperty
-          in: body
-          description: "One or more sets of user properties of which username is mandatory and must be unique."
-          required: true
-          schema:
-            $ref: CreateAdminUser
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of new created Admin user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/users/{userId}:     
-    put:
-      summary: "Updating an admin user."
-      description: "Update the info of an admin user."
-      parameters:
-        - $ref: "#/parameters/userId"
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of user's details."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-    get:
-      summary: "Getting an admin user."
-      description: "Retrieve details about an admin user."
-      parameters:
-        - $ref: "#/parameters/userId"
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of user's details"
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/users/resetpw:
-    post:
-      summary: "Completing a password reset."
-      description: "Complete the password reset through getting the newpassword and the old one for identification."
-      parameters:
-        - name: ResetPWMsg
-          in: body
-          description: "Parameters and value for the Captcha challenge, the admin user's response to the Captcha challenge, and the admin user's email address."
-          required: true
-          schema: 
-            $ref: ResetPWMsg
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-    get:
-      summary: "Initiating a password reset."
-      description: "Initiate the reset of an admin user's password."
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/users/{userId}/password:
-    put:
-      summary: "Setting an admin user's password."
-      description: "Update an admin user's password through getting the newpassword and the old one for identification."
-      parameters:
-        - $ref: "#/parameters/userId"
-        - name: ResetPW
-          in: body
-          description: "The user's old and new password."
-          required: true
-          schema:
-            $ref: ResetPW
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/users/{userId}/activate:
-    get:
-      summary: "Activating an admin user."
-      description: "Activate an admin user from a link provIded in an email notification."
-      parameters:
-        - $ref: "#/parameters/userId"
-        - name: token
-          in: query
-          description: "Activation token's query statement."
-          required: true
-          type: string
-        - name: confirm_email
-          in: query
-          description: "Query statement of whether send confimation email or not."
-          required: true
-          type: boolean
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/users/{userId}/reactivate:
-    get:
-      summary: "Reactivating an admin user."
-      description: "Reactivate an expired admin user."
-      parameters:
-        - $ref: "#/parameters/userId"
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/users/{userId}/feed:
-    get:
-      summary: "Getting an admin user's activity feed."
-      description: "Retrieve an admin user's activity feed."
-      parameters:
-        - $ref: "#/parameters/userId"
-      tags:
-        - ActivityFeed
-      responses:
-        "200":
-          description: "An array of user's activity"
-          schema:
-            $ref: ActivityFeed
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/users/{userId}/activities:
-    post:
-      summary: "Posting a user activity."
-      description: "Create an activity in the activities collection."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"
-        - $ref: "#/parameters/userId-3"
-        - name: CreateActivity
-          in: body
-          description: "One or more sets of activity properties."
-          required: true
-          schema:
-            $ref: CreateActivity
-      tags:
-        - ActivityFeed
-      responses:
-        "200":
-          description: "An array of user's activity."
-          schema:
-            $ref: ActivityFeed
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/groups/{groupId}/activities:
-    post:
-      summary: "Posting an activity to a group."
-      description: "Create an activity to a specific group. In this case the activity is created in the activities collection and is accessible at the /activities endpoint to users who have the permission to read that endpoint. In addition, a relationship is established between the activity and the group, and because of that, the activity will appear in the group’s feed. The group 'owns' the activity. Also, the activity will be published in the feed of all users that are members of the group."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"
-        - $ref: "#/parameters/groupId" 
-        - name: CreateActivity
-          in: body
-          description:  "One or more sets of activity properties."
-          required: true
-          schema:
-            $ref: CreateActivity
-      tags:
-        - ActivityFeed
-      responses:
-        "200":
-          description:  "An array of user's activity."
-          schema:
-            $ref: ActivityFeed
-        default:
-          description:  "Unexpected error."
-          schema:
-            $ref: Error 
-  /management/orgs:
-    post:
-      summary: "Creating an orgnization."
-      description: "Create an orgnization through a form post."
-      parameters:
-        - name: CreateOrg
-          in: body
-          description: "A set of orgnization properties supplied through a form."
-          required: true
-          schema:
-            $ref: CreateOrg
-      tags:
-        - Orgnization
-      responses:
-        "200":
-          description: "An array of created Orgnization."
-          schema:
-            $ref: Orgnization
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /management/orgs/{orgId}:
-    get:
-      summary: "Getting an orgnization."
-      description: "Retrieve an orgnization given a specified UUId or username."
-      parameters:
-        - $ref: "#/parameters/orgId"
-      tags:
-        - Orgnization
-      responses:
-        "200":
-          description: "An array of created Orgnization."
-          schema:
-            $ref: Orgnization
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /management/orgs/{orgId}/activate:
-    get:
-      summary: "Activating an orgnization."
-      description: "Activate an orgnization from a link provIded in an email notification."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - name: token
-          in: query
-          description: "Activation token."
-          required: true
-          type: string          
-        - name: confirm_email
-          in: query
-          description: "Send confirmation email or not."
-          required: true
-          type: boolean  
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error   
-  /management/orgs/{orgId}/reactivate:    
-    get:
-      summary: "Reactivating an orgnization"
-      description: "Reactivate an expired orgnization."
-      parameters:   
-        - $ref: "#/parameters/orgId"
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /management/orgs/{orgId}/credentials:
-    post:
-      summary: "Generating orgnization client credentials."
-      description: "Generate whole new credentials for an orgnization client."
-      parameters:
-        - $ref: "#/parameters/orgId"
-      tags:
-        - Credential
-      responses:
-        "200":
-          description: "An array of Credential"
-          schema:
-            $ref: Credential
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    get:
-      summary: "Retrieving orgnization client credentials."
-      description: "Retrieve the credentials for an orgnization client."
-      parameters:
-        - $ref: "#/parameters/orgId"
-      tags:
-        - Credential
-      responses:
-        "200":
-          description: "An array of Credential"
-          schema:
-            $ref: Credential
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /management/orgs/{orgId}/feed:
-    get:
-      summary: "Getting an orgnization's activity feed."
-      description: "Retrieve an orgnization's activity feed."
-      parameters:
-        - $ref: "#/parameters/orgId"
-      tags:
-        - ActivityFeed
-      responses:
-        "200":
-          description: "An array of the orgnization's ActivityFeed."
-          schema:
-            $ref: ActivityFeed
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error   
-  /management/orgs/{orgId}/apps:
-    post:
-      summary: "Creating an orgnization application."
-      description: "Create an application for an orgnization through a form post."
-      parameters:   
-        - $ref: "#/parameters/orgId"
-        - name: CreateApp
-          in: body
-          description: "A set of orgnization properties supplied through a form."
-          required: true
-          schema:
-            $ref: CreateApp   
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /management/orgs/{orgId}/apps/{appId}:
-    delete:
-      summary: "Removing an application from the orgnization."
-      description: "Remove an application from an orgnization through providing both Id of application and organization."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"
-      tags:
-        - AppData
-      responses:
-        "200":
-          description: "An array of deleted application info."
-          schema:
-            $ref: AppData
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/orgs/{orgId}/apps/{appId}/credentials:
-    post:
-      summary: "Generating application credentials."
-      description: "Generate the client Id and client secret credentials for an application in an orgnization."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"
-      tags:
-        - Credential
-      responses:
-        "200":
-          description: "An array of generated credentials info."
-          schema:
-            $ref: Credential
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-    get:
-      summary: "Getting application credentials."
-      description: "Retrieve the client Id and client secret credentials for an application in an orgnization."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"
-      tags:
-        - Credential
-      responses:
-        "200":
-          description: "An array of retrieved credentials info."
-          schema:
-            $ref: Credential
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/orgs/{orgId}/apps:
-    get:
-      summary: "Getting the applications in an orgnization."
-      description: "Retrieve the applications in an orgnization through providing both Id of application and organization."
-      parameters:
-        - $ref: "#/parameters/orgId"
-      tags:
-        - AppData
-      responses:
-        "200":
-          description: "An array of retrieved application data."
-          schema:
-            $ref: AppData
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /management/orgs/{orgId}/users/{userId}:
-    put:
-      summary: "Adding an admin user to an orgnization."
-      description: "Add an existing admin user to an orgnization."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/userId-2"     
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of new added Admin user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/orgs/{orgId}/users:
-    get:
-      summary: "Getting the admin users in an orgnization."
-      description: "Retrieve details about the admin users in an orgnization."
-      parameters:
-        - $ref: "#/parameters/orgId"
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of retrieved Admin user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /management/orgs/{orgId}/users/{userId}:
-    delete:
-      summary: "Removing an admin user from an orgnization."
-      description: "Remove an admin user from an orgnization through providing both Id of application and organization."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/userId-2" 
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of deleted Admin user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-
-  /{orgId}/{appId}/{collectionId}:
-    get:
-      summary: "Retrieving sets of entities from a collection."
-      description: "Use the GET method to retrieve a set of entities from a collection."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"
-        - $ref: "#/parameters/collectionId"
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of retrieved collection's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /{orgId}/{appId}/{entitytype}:
-    post:
-      summary: "Creating a custom entity."
-      description: "When a new entity is created, Usergrid will automatically create a corresponding collection if one does not already exist. The collection will automatically be named with the plural form of the entity type. "
-      parameters: 
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - name: entitytype
-          in: path
-          description: "The entity type to create."
-          required: true
-          type: string
-        - name: entityproperty
-          in: body
-          description: "The properties of the entity."
-          required: true
-          schema:
-            $ref: CreateEntities  
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of created custom entity's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/{collectionId}/{entityId}:
-    get:
-      summary: "Retrieving an entity."
-      description: "Retrieve an entity through providing Id of application, organization, collection and entity."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - $ref: "#/parameters/collectionId"
-        - $ref: "#/parameters/entityId"  
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of retrieved entity's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    put:
-      summary: "Updating an entity."
-      description: "One or more properties can be updated with a single request."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - $ref: "#/parameters/collectionId"
-        - $ref: "#/parameters/entityId" 
-        - name: entityproperty
-          in: body
-          description: "The properties of the entity."
-          required: true
-          schema:
-            $ref: CreateEntities 
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of updated entity's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error         
-    delete:
-      summary: "Deleting an entity."
-      description: "Delete an entity from the collection."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - $ref: "#/parameters/collectionId"
-        - $ref: "#/parameters/entityId" 
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of deleted entity's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error   
-  /{orgId}/{appId}/{collectionId}:
-    get:
-      summary: "Query a collection。"
-      description: "Retrieve collection through query statement."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - $ref: "#/parameters/collectionId"
-        - name: queryStatement
-          in: query
-          description: "Any values specified in the query statement should be enclosed in single-quotes."
-          required: true
-          type: string
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of retrieved collection's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    put:
-      summary: "Update a collection by query"
-      description: "Update collection through query statement."
-      parameters: 
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - $ref: "#/parameters/collectionId"
-        - name: queryStatement
-          in: query
-          description: "Any values specified in the query statement should be enclosed in single-quotes."
-          required: true
-          type: string
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of updated collection's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/{collectionId}/{entityId1}/{relation}/{entityId2}:
-    post:
-      summary: "Add an entity to a collection."
-      description: "Add an entity to a collection through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - $ref: "#/parameters/collectionId"    
-        - name: entityId1
-          in: path
-          description: "The Id of the 1st entity."
-          required: true
-          type: string 
-        - name: relation
-          in: path
-          description: "The relation between 1st entity and 2nd entity."
-          required: true
-          type: string 
-        - name: entityId2
-          in: path
-          description: "The Id of the 2nd entity."
-          required: true
-          type: string
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of added entity's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    delete:
-      summary: "Remove an entity from a collection."
-      description: "Remove an entity from a collection through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - $ref: "#/parameters/collectionId"     
-        - name: entityId1
-          in: path
-          description: "The Id of the 1st entity."
-          required: true
-          type: string 
-        - name: relation
-          in: path
-          description: "The relation between 1st entity and 2nd entity."
-          required: true
-          type: string 
-        - name: entityId2
-          in: path
-          description: "The Id of the 2nd entity."
-          required: true
-          type: string
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of deleted entity's info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/events:
-    post:
-      summary: "Create an event."
-      description: "Create an event through providing both Id of orgnization and application."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - name: CreateEvent
-          in: body
-          description: "The required property of the event."
-          required: true
-          schema:
-            $ref: CreateEvent        
-      tags:
-        - Event
-      responses:
-        "200":
-          description: "An array of created event's info."
-          schema:
-            $ref: Event
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error  
-  /{orgId}/{appId}/groups:
-    post:
-      summary: "Create a new group."
-      description: "Create a new group through providing both Id of orgnization and application."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - name: groupproperty
-          in: body
-          description: "The property of the created group."
-          required: true
-          schema:
-            $ref: CreateGroup
-      tags:
-        - Group
-      responses:
-        "200":
-          description: "An array of created group's info."
-          schema:
-            $ref: Group
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error  
-  /{orgId}/{appId}/groups/{groupId}/users/{userId}:
-    post:
-      summary: "Add a user to a group."
-      description: "Add a user to a group through providing all the identifications."
-      parameters:        
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/groupId"
-        - $ref: "#/parameters/userId-3" 
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of added user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error  
-    delete:
-      summary: "Delete user from a group."
-      description: "Delete user from a group through providing all the identifications."
-      parameters:   
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/groupId"
-        - $ref: "#/parameters/userId-3" 
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of deleted user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{org_Id}/{app_Id}/groups/{groupId}:
-    get:
-      summary: "Get a group."
-      description: "Get a group through through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/groupId"
-      tags:
-        - Group
-      responses:
-        "200":
-          description: "An array of retrieved group's info."
-          schema:
-            $ref: Group
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    put:
-      summary: "Update a group."
-      description: "Update a group through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/groupId"
-      tags:
-        - Group
-      responses:
-        "200":
-          description: "An array of updated group's info."
-          schema:
-            $ref: Group
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/groups/{groupId}/feed:
-    get: 
-      summary: "Get a group's feed."
-      description: "Get a group's feed through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/groupId" 
-      tags:
-        - ActivityFeed
-      responses:
-        "200":
-          description: "An array of group's activity."
-          schema:
-            $ref: ActivityFeed
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/roles:
-    post:
-      summary: "Create a new role."
-      description: "Create a new role through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - name: roleproperty
-          in: body
-          description: "The required properties of the role."
-          required: true
-          schema:
-            $ref: AddRole      
-      tags:
-        - Role
-      responses:
-        "200":
-          description: "An array of created role's info."
-          schema:
-            $ref: Role
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    get:
-      summary: "Get the roles in an application"
-      description: "Retrieve the roles in an application through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-      tags:
-        - Role
-      responses:
-        "200":
-          description: "An array of retrieved role's info."
-          schema:
-            $ref: Role
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error  
-  /{orgId}/{appId}/roles/{rolename}:
-    delete:
-      summary: "Delete a role."
-      description: "Remove a role through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - name: rolename
-          in: path
-          description: "The name of the role."
-          required: true
-          type: string
-      tags:
-        - Role
-      responses:
-        "200":
-          description: "An array of deleted role's info."
-          schema:
-            $ref: Role
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error  
-  /{orgId}/{appId}/roles/{roleId}/permissions:
-    post:
-      summary: "Add permissions to a role."
-      description: "Add permissions to a role through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/roleId"
-        - name: permissionproperty
-          in: body
-          description: "the properties of permissions"
-          required: true
-          schema:
-            $ref: AddPermission
-      tags:
-        - Permission
-      responses:
-        "200":
-          description: "An array of created permission's info."
-          schema:
-            $ref: Permission
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    get:
-      summary: "Get permissions for a role."
-      description: "Retrieve permissions for a role through providing all the identifications."
-      parameters: 
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/roleId"
-      tags:
-        - Permission
-      responses:
-        "200":
-          description: "An array of retrieved permission's info."
-          schema:
-            $ref: Permission
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error  
-  /{orgId}/{appId}/roles/{roleId}/permissions:
-    delete:
-      summary:  "Delete permissions from a role."
-      description:  "Remove permissions from a role. "
-      parameters:      
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/roleId"
-        - name: grant_url_pattern
-          in: query
-          description: "The query statement of the url pattern."
-          required: true
-          type: string
-      tags:
-        - Permission
-      responses:
-        "200":
-          description: "An array of deleted permission's info."
-          schema:
-            $ref: Permission
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/roles/{roleId}/users/{userId}:
-    post:
-      summary: "Add a user to a role."
-      description: "Add a user to a role through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/roleId"
-        - $ref: "#/parameters/userId-3"
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of added user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    delete:
-      summary: "Delete a user from a role."
-      description: "Remove a user from a role through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/roleId"
-        - $ref: "#/parameters/userId-3" 
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of deleted user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/roles/{roleId}/users:
-    get:
-      summary: "Get the users in a role."
-      description: "Retrieve the users in a role through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/roleId"
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of retrieved user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/users:
-    post:
-      summary: "Create a user in the users collection."
-      description: "Create a user in the users collection through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - name: CreateUser
-          in: body
-          description: "The properties of the user."
-          required: true
-          schema:
-            $ref: CreateUser
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of created user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-    get:
-      summary: "Query to get users."
-      description: "Retrieve users though query statement."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - name: queryStatement
-          in: query
-          description: "The query statement of the User."
-          required: true
-          type: string
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of retrieved user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /{orgId}/{appId}/users/{user}/password:
-    post:
-      summary: "Set a user's password or reset the user's existing password."
-      description: "Set a user's password or reset the user's existing password."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"  
-        - name: username
-          in: path
-          description: "The username of the user."
-          required: true
-          type: string
-        - name: ResetPW
-          in: body
-          description: "The user's old and new password."
-          required: true
-          schema:
-            $ref: ResetPW    
-      tags:
-        - Action
-      responses:
-        "200":
-          description: "An array of complete messages."
-          schema:
-            $ref: Action
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error   
-  /{orgId}/{appId}/users/{userId}:
-    get:
-      summary:  "Retrieve a user."
-      description:  "Retrieve a user through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/userID-2" 
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of retrieved user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-    put:
-      summary: "Update a user"
-      description: "Update a user through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/userID-3" 
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of updated user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error  
-    delete:
-      summary: "Delete a user."
-      description: "Remove a user through providing all the identifications."
-      parameters:    
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/userID-3" 
-      tags:
-        - User
-      responses:
-        "200":
-          description: "An array of deleted user's info."
-          schema:
-            $ref: User
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /{orgId}/{appId}/users/{userId}/{relation}:
-    get:
-      summary: "Query a user's collections or connections."
-      description: "Retrieve a user's collections or connections through query statement."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/userID-3"      
-        - name: relation
-          in: path
-          description:  "The relation between user and collections."
-          required: true
-          type: string
-        - name: queryStatement
-          in: query
-          description:  "The query statement of the user."
-          required: true
-          type: string
-      tags:
-        - Entity
-      responses:
-        "200":
-          description: "An array of user's collections info."
-          schema:
-            $ref: Entity
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /{orgId}/{appId}/users/{userId}/feed:
-    get:
-      summary: "Get a user's feed."
-      description: "Retrieve a user's feed through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/userID-3"         
-      tags:
-        - ActivityFeed
-      responses:
-        "200":
-          description: "An array of user's activity feed."
-          schema:
-            $ref: ActivityFeed
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-
-  /{orgId}/{appId}/devices/{deviceId}/notifications:
-    post:
-      summary: "Creating notifications for a single device."
-      description: "Create notifications for a single device. This request will target a specific device entity."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/deviceId"
-        - $ref: "#/parameters/notification"
-        - $ref: "#/parameters/scheduleNotificaiton" 
-        - $ref: "#/parameters/setExpiration"
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of created notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /{orgId}/{appId}/devices/*/notifications:
-    post:
-      summary: "Creating notifications for all devices."
-      description:  "Create notifications for all devices. This request will target all device entities."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/notification"
-        - $ref: "#/parameters/scheduleNotificaiton" 
-        - $ref: "#/parameters/setExpiration"
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of created notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description:  "Unexpected error."
-          schema:
-            $ref: Error
-  /{orgId}/{appId}/users/{userId}/notifications:
-    post:
-      summary: "Creating notifications for a user."
-      description: "Create notifications for a user. This request will target a specific user entity."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/userId-3" 
-        - $ref: "#/parameters/notification"
-        - $ref: "#/parameters/scheduleNotificaiton" 
-        - $ref: "#/parameters/setExpiration"
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of created notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error
-  /{orgId}/{appId}/groups/{path}/notifications:
-    post:
-      summary: "Creating notifications for a group."
-      description: "Create notifications for a group. This request will target all users associated with a specific group entity."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - name: path
-          in: path
-          description:  "The path of the group."
-          required: true
-          type: string
-        - $ref: "#/parameters/notification"
-        - $ref: "#/parameters/scheduleNotificaiton" 
-        - $ref: "#/parameters/setExpiration"
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of created notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error           
-  /{orgId}/{appId}/devices:
-    post:
-      summary: "Creating notifications for user through location."
-      description: "Create notifications for user through targeting by location and providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/notification"
-        - $ref: "#/parameters/scheduleNotificaiton" 
-        - $ref: "#/parameters/setExpiration"
-        - name: queryStatement
-          in: query
-          description: "The query statement of the location of the user."
-          required: true
-          type: string
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of created notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error       
-  /{orgId}/{appId}/notifications:
-    get:
-      summary: "Getting one or more notifications."
-      description: "Retrieve one or more notifications through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"    
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of retrieved notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error             
-  /{orgId}/{appId}/{receiptId}/*/notifications:
-    get:
-      summary: "Getting notifications associated with one or more receipts."
-      description: "Retrieve notifications associated with one or more receipts through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/receiptId" 
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of retrieved notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/{notificationId}/*/queue:
-    get:
-      summary: "Getting the list of devices associated with one or more notifications before the notifications are sent"
-      description: "Retrieve the list of devices associated with one or more notifications before the notifications are sent through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/notificationId" 
-      tags:
-        - Devices
-      responses:
-        "200":
-          description: "An array of retrieved device's info."
-          schema:
-            $ref: Device
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  "/my-org/sandbox/notifications/{notificationId}":
-    put:
-      summary: "Canceling sent notifications."
-      description: "Cancel sent notifications through providing the Id of the notification."
-      parameters:
-        - $ref: "#/parameters/notificationId"
-        - name: cancelMsg
-          in: body
-          description: "Indicete whether is canceled or not."
-          required: true
-          schema:
-            $ref: CancelMSG        
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of canceled notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/notifications/{notificationId}:
-    delete:
-      summary: "Deleting unsent notifications."
-      description: "Remove unsent notifications through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/notificationId"
-      tags:
-        - Notification
-      responses:
-        "200":
-          description: "An array of deleted notification's info."
-          schema:
-            $ref: Notification
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error  
-  /{orgId}/{appId}/receipts:
-    get:
-      summary: "Getting one or more receipts."
-      description: "Retrieve one or more receipts through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId"        
-      tags:
-        - Receipt
-      responses:
-        "200":
-          description: "An array of retrieved receipt's info."
-          schema:
-            $ref: Receipt
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/{deviceId}/*/receipts:
-    get:
-      summary: "Getting receipts associated with one or more devices."
-      description: "Retrieve receipts associated with one or more devices through providing all the identifications."
-      parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/deviceId"
-      tags:
-        - Receipt
-      responses:
-        "200":
-          description: "An array of retrieved receipt's info."
-          schema:
-            $ref: "#/definitions/Receipt"
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error 
-  /{orgId}/{appId}/{notificationId}/*/receipts:
-   get:
-     summary: Get receipts for one or more notifications."
-     description: Retrieve receipts for one or more notifications through providing all the identifications."
-     parameters:
-        - $ref: "#/parameters/orgId"
-        - $ref: "#/parameters/appId" 
-        - $ref: "#/parameters/notificationId"
-     tags:
-        - Receipt
-     responses:
-        "200":
-          description: "An array of retrieved receipt's info."
-          schema:
-            $ref: "Receipt"
-        default:
-          description: "Unexpected error."
-          schema:
-            $ref: Error       
-
-parameters:
-  userId:
-    name: userId
-    in: path
-    description: "One of the user's identification which includes username, real name, email address or UUID."
-    required: true
-    type: string
-  userId-1:
-    name: userId-1
-    in: path
-    description: "One of the user's identification which includes username, real name, email address or UUID."
-    required: true
-    type: string
-  userId-2:
-    name: userId-2
-    in: path
-    description: "One of the user's identification which includes username, email address or UUID."
-    required: true
-    type: string
-  userId-3:
-    name: userId-3
-    in: path
-    description: "One of the user's identification which includes username or UUID."
-    required: true
-    type: string
-  appId:
-    name: appId
-    in: path
-    description: "One of the application's identification which includes name or uuid."
-    required: true
-    type: string 
-  orgId:
-    name: orgId
-    in: path
-    description: "One of the orgnization's identification which includes name or uuid."
-    required: true
-    type: string 
-  groupId:
-    name: groupId
-    in: path
-    description: "One of the group's identification which includes name or uuid."
-    required: true
-    type: string 
-  deviceId:
-    name: deviceId
-    in: path
-    description: "One of the device's identification which includes name or uuid."
-    required: true
-    type: string  
-  notificationId:
-    name: notificationId
-    in: path
-    description: "One of the notification's identification which includes name or uuid."
-    required: true
-    type: string        
-  receiptId:
-    name: receiptId
-    in: path
-    description: "One of the receipt's identification which includes name or uuid."
-    required: true
-    type: string 
-  collectionId:
-    name: collectionId
-    in: path
-    description: "One of the collection's identification which includes name or uuid."
-    required: true
-    type: string 
-  roleId:
-    name: roleId
-    in: path
-    description: "One of the role's identification which includes name or uuid."
-    required: true
-    type: string 
-  entityId:
-    name: entityId
-    in: path
-    description: "One of the entity's identification which includes name or uuid."
-    required: true
-    type: string 
-  notification:
-    name: notification
-    in: body
-    description: "These parameters are used when forming the notification portion of the request."
-    required: true
-    schema:
-      $ref: CreateNotifications 
-  scheduleNotification:  
-    name: scheduleNotification
-    in: body
-    description: "To schedule a notification for a later time add the deliver parameter with a UNIX timestamp to the body of your request."
-    required: false
-    schema:
-      $ref: ScheduleNotification
-  setExpiration: 
-    name: setExpiration
-    in: body
-    description: "If a push service can't deliver a message to a device and needs to resend it you can set a notification to expire after a certain date/time."
-    required: false
-    schema:
-      $ref: SetExpiration
-
-definitions:
-  CancelMSG:
-    required:
-      - canceled
-    properties:
-      canceled:
-        type: boolean
-  Receipt:
-    properties:
-      uuid:
-        type: string
-        description:  "Unique entity Id."
-      type:
-        type: string
-        description:  "Type of entity."
-      created:
-        type: number
-        description:  "UTC timestamp in milliseconds of when the entity was created."
-        format: int64
-      modified:
-        type: number
-        description:  "UTC timestamp in milliseconds of when the entity was last modified."
-        format: int64
-      payloads:
-        type: string
-        description:  "The push notifications to be delivered."
-      errorMessage:
-        type: string
-        description:  "Error message returned by the notification service (APNs or GCM) if the notification fails entirely."
-      errorCode:
-        type: string
-        description:  "Error code returned by the notification service."
-      sent: 
-        type: number
-        description:  "UTC timestamp in milliseconds for when the notification was sent."
-      metadata:
-        $ref: Metadata   
-      completeMsg:
-        $ref: Action
-  Device:
-    properties:
-      uuid:
-        type: string
-        description:  "Unique entity Id."
-      type:
-        type: string
-        description:  "Type of entity."
-      name: 
-        type: string
-        description:  "Notifier display name."
-      created:
-        type: number
-        description:  "UTC timestamp in milliseconds of when the entity was created."
-        format: int64
-      modified:
-        type: number
-        description:  "UTC timestamp in milliseconds of when the entity was last modified."
-        format: int64
-      metadata:
-        $ref: Metadata   
-      completeMsg:
-        $ref: Action
-#  ScheduleNotification:
-#    required:
-#      - timestamp
-#    properties:
-#      timestamp:
-#        type: number
-#        description: "UTC timestamp in milliseconds of when schedule notifications."
-#        format: int64
-#  SetExpiration:
-#    required:
-#      - timestamp
-#    properties:
-#      timestamp:
-#        type: number
-#        description: "UTC timestamp in milliseconds of when set expirations."
-#        format: int64
-  Notification:
-    required:
-      - payloads
-    properties:
-      uuid:
-        type: string
-        description:  "Unique entity Id."
-      type:
-        type: string
-        description:  "Type of entity."
-      created:
-        type: number
-        description:  "UTC timestamp in milliseconds of when the entity was created."
-        format: int64
-      modified:
-        type: number
-        description:  "UTC timestamp in milliseconds of when the entity was last modified."
-        format: int64
-      payloads:
-        type: string
-        description:  "The push notifications to be delivered."
-      errorMessage:
-        type: string
-        description:  "Error message returned by the notification service (APNs or GCM) if the notification fails entirely."
-      scheduled:
-        type: boolean
-        description:  "whether the notification is currently scheduled for delivery."
-      state:
-        type: string
-        description:  "The current delivery status of the notification 'FINISHED', 'SCHEDULED' or 'CANCELED'."
-      metadata:
-        $ref: Metadata 
-      completeMsg:
-        $ref: Action
-  Notifier:
-    required:
-      - provider
-      - environment
-    properties:
-      uuid:
-        type: string
-        description:  "Unique entity Id."
-      type:
-        type: string
-        description:  "Type of entity."
-      name: 
-        type: string
-        description:  "Notifier display name."
-      created:
-        type: number
-        description:  "UTC timestamp in milliseconds of when the entity was created."
-        format: int64
-      modified:
-        type: number
-        description:  "UTC timestamp in milliseconds of when the entity was last modified."
-        format: int64
-      provider:
-        type: string
-        description:  "Push notification provider 'apple' or 'google'."
-      environment:
-        type: string
-        description:  "The environment that corresponds to your app 'development' or 'production'."
-      metadata:
-        $ref: Metadata
-  CreateNotifications:
-    type: array
-    items:
-      $ref: CreateNotification
-  CreateNotification:
-    required:
-      - notifier
-      - message
-    properties:
-      notifier:
-        $ref: Notifier
-      message:
-        type: string
-        description:  "The push notitfication message that will be delivered to the user."
-  Permission:
-    properties:
-      applicationName: 
-        type: string
-        description:  "The name of the application of the permission."
-      entity:
-        $ref: Entity
-      url:
-        type: string
-        description:  "The url of the permission."
-      applicationId:
-        type: string
-        description:  "The UUID of the application."
-      parameters:
-        type: string
-        description:  "The parameters of the permission."
-      orgnization:
-        type: string
-        description:  "The orgnization of the permission."
-      permissiondata:
-          $ref: AddPermission
-  AddPermission:
-    required:
-      - operation
-      - resource_path
-    properties:
-      operation:
-        type: string
-        description:  "A comma-delimited set of HTTP methods (GET, PUT, POST, DELETE) that are allowed for the specified resource path."
-      resource_path:
-        type: string
-        description:  "The path to the resources to be accessed."
-  Role:
-    properties:
-      applicationName:
-        type: string
-        description:  "The application name of the event."
-      count:
-        type: number
-        description:  "The numebr of the roles."
-        format: int32
-      entity:
-        $ref: Entity
-      url:
-        type: string
-        description:  "The url of the event."
-      applicationId:
-        type: string
-        description:  "The application UUID of the event."
-      parameters:
-        type: string
-        description:  "The parameters of the event."
-      orgnization:
-        type: string
-        description:  "The title of the orgnization."
-      completeMsg:
-        $ref: Action    
-      path:
-        type: string  
-        description:  "The path of the role."
-  AddRole:
-    required:
-      - title
-      - role name
-    properties:
-      title:
-        type: string
-        description:  "The title of the role."
-      role name:
-        type: string
-        description:  "The name of the role."
-  Event:
-    properties:
-      applicationName:
-        type: string
-        description:  "The application name of the event."
-      entity:
-        $ref: Entity
-      url:
-        type: string
-        description:  "The url of the event."
-      applicationId:
-        type: string
-        description:  "The application UUID of the event."
-      parameters:
-        type: string
-        description:  "The parameters of the event."
-      orgnization:
-        type: string
-        description:  "The title of the orgnization."
-      completeMsg:
-        $ref: Action
-#  CreateEvent:
-#    required:
-#      - timestamp
-#    properties:
-#      timestamp:
-#        type: number
-#        format : int32
-  Group:
-    properties:
-      uuid:
-        type: string
-        description:  "The UUID of the group."
-      type:
-        type: string
-        description:  "The type of the group."
-      created:
-        type: string
-        description:  "The created Id for the group."
-      modified:
-        type: string
-        description:  "The modified Id for the group."
-      path:
-        type: string
-        description:  "The path of the group."
-      metadata:
-        $ref: Metadata
-      title:
-        type: string
-        description:  "The title of the group."
-      completeMsg:
-        $ref: Action
-  CreateGroup:
-    required:
-      - title
-      - path
-    properties:
-      title: 
-        type: string
-        description:  "The title of the group."
-      path:
-        type: string
-        description:  "The path of the group."
-  CreateEntities:
-    type: array
-    items:
-      $ref: CreateEntity
-  CreateEntity:
-    properties:
-      property:
-        type: string
-        description:  "The property of the entity."
-      value:
-        type: string
-        description:  "The relevant value of the property."
-  Entity:
-    properties:
-      applicationId:
-        type: string
-        description:  "The application Id of the entity."
-      parameters:
-        type: string
-        description:  "The parameters of the entity."
-      path:
-        type: string
-        description:  "The path of the entity."
-      url:
-        type: string
-        description:  "The url of the entity."
-      entityproperty:
-        $ref: Entity
-      orgnization:
-        type: string
-        description:  "The name of the orgnization."
-      applicationName:
-        type: string
-        description:  "The name of the application."
-      count:
-        type: number
-        description:  "The number of the entities retrieved."
-        format: int32
-      completeMsg:
-        $ref: Action
-  CreateApp:
-    required:
-      - token
-      - name
-    properties:
-      token:
-        type: string        
-        description:  "The OAuth2 access token."
-      name:
-        type: string
-        description:  "The name of the application."
-  Credential:
-    properties:
-      client_Id:
-        type: string
-        description:  "The Id of the client."
-      client_secret:
-        type: string
-        description:  "The secret of the client."
-      completeMsg:
-        $ref: Action
-  Orgnization:
-    properties:
-      applicationId:
-        type: string
-        description:  "The application Id of the owner."
-      username:
-        type: string
-        description:  "The username of the owner."
-      name:
-        type: string
-        description:  "The name of the owner."
-      email:
-        type: string
-        description:  "The email of the owner."
-      activated:
-        type: boolean
-        description:  "Indicate whether the account is activated or not."
-      disabled:
-        type: boolean
-        description:  "Indicate whether the account is disabled or not."
-      uuid:
-        type: string
-        description:  "The UUID of the owner."
-      adminUser:
-        type: boolean
-        description:  "Indicate whether the use is a adminUser or not."
-      displayEmail:
-        type: string
-        description:  "The display of the email of the owner."
-      htmldisplayEmail:
-        type: string
-        description:  "The HTML display of the email of the owner."
-      orgname:
-        type: string
-        description:  "The name of the orgnization."
-      orguuId: 
-        type: string
-        description:  "The UUID of the orgnization."
-      applicationdata:
-        $ref: AppData
-      completeMsg:
-        $ref: Action
-  AppData:
-    properties:
-      tester/sandbox: 
-        type: string
-        description:  "The UUID of tester/sandbox."
-      tester/app1:
-        type: string
-        description:  "The UUID of tester/app1."
-      tester/app2:
-        type: string
-        description:  "The UUID of tester/app2."
-      completeMsg:
-        $ref: Action
-  CreateOrg:
-    required:
-      - orgnization
-      - username
-      - name
-      - email
-      - password
-    properties:
-      orgnization:
-        type: string
-      username:
-        type: string
-      name:
-        type: string
-      email:
-        type: string
-      password:
-        type: string
-  CreateActivity:
-    required:
-      - displayName
-      - uuid
-      - username
-      - verb
-      - content
-    properties:
-      displayName:
-        type: string
-      uuid:
-        type: string
-      username:
-        type: string
-      image:
-        $ref: ImageModel
-      verb:
-        type: string
-      content:
-        type: string
-  ImageModel:
-    properties:
-      duration:
-        type: number
-        format: int32
-      height:
-        type: number
-        format: int32
-      url:
-        type: string
-      wIdth:
-        type: integer
-        format: int32
-      email:
-        type: string
-  ResetPWMsg:
-    required:
-      - recaptcha_response
-      - recaptcha_challenge
-      - email
-    properties:
-      recaptcha_response:
-        type: string
-        description: "Parameters and value for the Captcha challenge."
-      recaptcha_challenge:
-        type: string
-        description: "The admin user's response to the Captcha challenge."
-      email:
-        type: string
-  ResetPW:
-    required:
-      - password
-      - newpassword
-    properties:
-      password:
-        type: string
-      newpassword:
-        type: string
-  AdminUserUpdate:
-    properties:
-      city: 
-        type: string
-      state:
-        type: string
-  CreateAdminUser:
-    required:
-      - username
-    properties:
-      username:
-        type: string
-      email:
-        type: string
-      name:
-        type: string
-      password:
-        type: string
-  CreateUser:
-    required:
-      - username
-    properties:
-      username:
-        type: string
-  User:
-    properties:
-      applicationId:
-        type: string
-        description:  "The application Id of a user."
-      username:
-        type: string
-        description:  "The username of a user."
-      name:
-        type: string
-        description:  "The name of a user."
-      email:
-        type: string
-        description:  "The email of a user."
-      activated:
-        type: boolean
-        description:  "Indicate whether the account is activated or not."
-      disabled:
-        type: boolean
-        description:  "Indicate whether the account is disabled or not."
-      uuid:
-        type: string
-        description:  "The UUID of a user."
-      adminUser:
-        type: boolean
-        description:  "Indicate whether the use is a adminUser or not."
-      displayEmail:
-        type: string
-        description:  "The display of the email of a user."
-      htmldisplayEmail:
-        type: string
-        description:  "The HTML display of the email of a user."
-      orgnization:
-        type: string
-        description:  "The orgnization of the user."
-      picture:
-        type: string
-        description:  "The uri of the user's picture."
-      uri:
-        type: string
-        description:  "The uri of the user."
-      path:
-        type: string
-        description:  "The path of the user."
-      completeMsg:
-        $ref: Action
-  Action:
-    properties:
-      action:
-        type: string
-        description:  "The requested action."
-      status:
-        type: string
-        description:  "The status of the requested action."
-      timestamp:
-        type: number
-        description:  "The timestamp of the requested action."
-        format: int64
-      duration:
-        type: number
-        description:  "The duration of the requested action."
-        format: int32
-      token:
-        type: string 
-        description:  "The token required for getting an AdminUser."
-  ActivityFeed:
-    properties:
-      entityproperty:
-        $ref: Entity
-      category:
-        type: string
-        description:  "The category of the activity."
-      metadataproperty:
-        $ref: Metadata
-      objectproperty:
-        $ref: Object
-      title:
-        type: string
-        description:  "The title of the activity."
-      verb:
-        type: string
-        description:  "The verb of the activity."
-      published:
-        type: number
-        description:  "UTC timestamp of the feed publish time."
-        format: int64
-      verb:
-        type: string
-        description:  "The verb of the activity."
-      completeMsg:
-        $ref: Action
-  Object:
-    properties:
-      displayname:
-        type: string
-        description:  "The display of the name of the object."
-      objecttype:
-        type: string
-        description:  "The type of the object."
-      objectuuId:
-        type: string
-        description:  "The UUID of the object."
-      entitytype:
-        type: string
-        description:  "The entitytype of the object."
-  Metadata:
-    properties:
-      cursor:
-        type: string
-        description:  "The cursor of the metadata."
-      path:
-        type: string
-        description:  "The path of the metadata."
-      sets:
-        $ref: Sets    
-      collections:
-        $ref: Collections
-  Collections:
-    properties:
-      activities:
-        type: string
-      feed:
-        type: string
-      roles:
-        type: string
-      users:
-        type: string 
-  Sets:
-    properties:
-      rolenames:
-        type: string
-      permissions:
-        type: string
-  Actor:
-    properties:
-      displayname:
-        type: string
-        description:  "The display of the name of the actor."
-      objecttype:
-        type: string
-        description:  "The type of the actor."
-      objectuuId:
-        type: string
-        description:  "The UUID of the actor."
-      entitytype:
-        type: string
-        description:  "The entitytype of the actor."
-  Entity:
-    properties:
-      uuid:
-        type: string
-        description:  "The UUID of the entity."
-      type:
-        type: string
-        description:  "The type of the entity."
-      created:
-        type: number
-        description:  "UTC timestamp of entity creation time."
-        format: int64
-      modified:
-        type: number
-        description:  "UTC timestamp of entity modified time."
-        format: int64
-      actorproperty:
-        $ref: Actor
-      metadata:
-        $ref: Metadata
-      name:
-        type: string
-        description:  "The name of the entity."
-      message:
-        type: string
-  Error:
-    properties:
-      code:
-        type: integer
-        format: int32
-      message:
-        type: string
-      fields:
-        type: object
-        
-        
\ No newline at end of file


[4/9] incubator-usergrid git commit: Switch over to generating api-docs via Groovy, Swagger and Mustache.java.

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/collections.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/collections.txt b/docs/rest-endpoints/sources/collections.txt
deleted file mode 100644
index cb0370b..0000000
--- a/docs/rest-endpoints/sources/collections.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Content-type	Description	Detail
/{org_id}/{app_id}/	GET	application/json	Retrieve all collections	Detail
/{org_id}/{app_id}/{collection}	POST	application/json	Create a new entity or collection	Detail
/{org_id}/{app_id}/{collection}/{identifier}	GET	application/json	Retrieve an entity	Detail
/{org_id}/{app_id}/{collection}/{identifier}	PUT	application/json	Update an entity	Detail
/{org_id}/{app_id}/{collection}/{identifier}	DELETE	application/json	Delete an entity	Detail
/{org_id}/{app_id}/{collection}?{query}	GET	application/json	Query a collection	Detail
/{org_id}/{app_id}/{collection}?{query}	PUT	application/json	Update a collection by query	Detail
/{org_id}/{app_id}/{collection}/{entity_id}/{relationship}?{query}	GET	application/json	Query an entity's collections or connections	Detail
/{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_id}	POST	application/json	Add an entity to a collection or create a connection	Detail
/{org_id}/{app_
 id}/{collection}/{first_entity_id}/{relationship}/{second_entity_type}/{second_entity_id}	POST	application/json	Add an entity to a collection or create a connection	Detail
/{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_id}/{second_entity_type}/{second_entity_id}	DELETE	application/json	Remove an entity from a collection or delete a connection	Detail
/{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_type}/{second_entity_id}	DELETE	application/json	Remove an entity from a collection or delete a connection	Detail
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/csv2md.groovy
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/csv2md.groovy b/docs/rest-endpoints/sources/csv2md.groovy
deleted file mode 100644
index 25815d0..0000000
--- a/docs/rest-endpoints/sources/csv2md.groovy
+++ /dev/null
@@ -1,43 +0,0 @@
-def dir = new File(".");
-def files = dir.list();
-files.each() { fileName ->
-    if ( fileName.endsWith(".txt") ) {
-        
-        def baseName = fileName.substring(0, fileName.length() - 4);
-
-        def outputFile = new File("../" + baseName + ".md");
-        outputFile.withWriter('utf-8') { writer ->
-
-            def inputFile = new File(fileName);
-            def count = 0;
-            writer.writeLine "# ${baseName.capitalize()}"
-            writer.writeLine ""
-            writer.writeLine ""
-            writer.writeLine "<!-- DO NOT EDIT THIS GENERATED FILE -->";
-            writer.writeLine ""
-            writer.writeLine "<table class='usergrid-table rest-endpoints-table'>";
-
-            inputFile.eachLine { line ->
-                def parts = line.split("\\t");
-                def evenodd = count % 2 ? "even" : "odd";
-                if ( count == 0 ) {
-                    writer.writeLine  "  <tr>";
-                    parts.each() { part ->
-                        writer.writeLine  "    <th>" + part + "</th>";
-                    }
-                    writer.writeLine  "  </tr>";
-                } else {
-                    writer.writeLine  "  <tr class='ug-${evenodd} usergrid-table'>";
-                    parts.each() { part ->
-                        writer.writeLine  "    <td>" + part + "</td>";
-                    }
-                    writer.writeLine  "  </tr>";
-                }
-                count++;
-            }
-            writer.writeLine  "</table>";
-
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/events.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/events.txt b/docs/rest-endpoints/sources/events.txt
deleted file mode 100644
index 20a4178..0000000
--- a/docs/rest-endpoints/sources/events.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Content-type	Description	Detail
/{org_id}/{app_id}/events	POST	application/json	Create an event	Detail
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/groups.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/groups.txt b/docs/rest-endpoints/sources/groups.txt
deleted file mode 100644
index e94dcf9..0000000
--- a/docs/rest-endpoints/sources/groups.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Content-type	Description	Detail
/{org_id}/{app_id}/groups	POST	application/json	Create a new group	Detail
/{org_id}/{app_id}/groups/{identifier}/users/{uuid|username}	POST	application/json	Add a user to a group	Detail
/{org_id}/{app_id}/groups/{identifier}	GET	application/json	Get a group	Detail
/{org_id}/{app_id}/groups/{identifier}	PUT	application/json	Update a group	Detail
/{org_id}/{app_id}/groups/{identifier}/users/{uuid|username}	DELETE	application/json	Delete user from a group	Detail
/{org_id}/{app_id}/groups/{identifier}/feed	GET	application/json	Get a group's feed	Detail
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/organizations.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/organizations.txt b/docs/rest-endpoints/sources/organizations.txt
deleted file mode 100644
index d3cd079..0000000
--- a/docs/rest-endpoints/sources/organizations.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Description	Detail	
/management/organizations	POST	application/json	Create an organization	Detail
/management/organizations/{identifier}	GET	application/json	Retrieve an organization	Detail
/management/organizations/{identifier}/activate?token={token}&confirm={confirm_email}	GET	application/json	Activate an organization	Detail
/management/organizations/{identifier}/reactivate	GET	application/json	Reactivate an organization	Detail
/management/organizations/{identifier}/credentials	POST	application/json	Generate organization client credentials	Detail
/management/organizations/{identifier}/credentials	GET	application/json	Retrieve organization client credentials	Detail
/management/organizations/{identifier}/feed	GET	application/json	Retrieve an organization's activity feed	Detail
/management/organizations/{identifier}/apps	POST	application/json	Create an organization application	Detail
/management/organizations/{identifier}/applications|apps/{app_name}|{uuid}/ credenti
 als	POST	application/json	Generate credentials for an organization application	Detail
/management/organizations/{identifier}/applications|apps/ {app_name}|{uuid}/credentials	GET	application/json	Get credentials for an organization application	Detail
/management/organizations/{identifier}/applications|apps	GET	application/json	Get the applications in an organization	Detail
/management/organizations/{identifier}/users/{username|email|uuid}	PUT	application/json	Adding an admin user to an organization	Detail
/management/organizations/{identifier}/users	GET	application/json	Getting the admin users in an organization	Detail
/management/organizations/{org-identifier}/users/{user-identifier}	DELETE	application/json	Removing an admin user from an organization	Detail

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/roles.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/roles.txt b/docs/rest-endpoints/sources/roles.txt
deleted file mode 100644
index bfd2d33..0000000
--- a/docs/rest-endpoints/sources/roles.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Description	Detail	
/{org_id}/{app_id}/roles	POST	application/json	Create a new role	Detail
/{org_id}/{app_id}/roles	GET	application/json	Get the roles in an application	Detail
/{org_id}/{app_id}/roles/{rolename}	DELETE	application/json	Delete a role	Detail
/{org_id}/{app_id}/roles/{rolename|role_id}/permissions	GET	application/json	Get permissions for a role	Detail
/{org_id}/{app_id}/roles/{rolename|role_id}/permissions	POST	application/json	Add permissions to a role	Detail
/{org_id}/{app_id}/roles/{rolename|role_id}/permissions?permission={grant_url_pattern}	DELETE	application/json	Delete permissions from a role	Detail
/{org_id}/{app_id}/roles/{role_id}/users/{uuid|username}/roles/{role_id}	POST	application/json	Add a user to a role	Detail
/{org_id}/{app_id}/users/{identifier}/roles/{role_id}	POST	application/json	Add a user to a role	Detail
/{org_id}/{app_id}/roles/{role_id}/users	GET	application/json	Get the users in a role	Detail
/{org_id}/{app_id}/roles/{role_
 id}/users/{uuid|username}	DELETE	application/json	Delete a user from a role	Detail
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/sources/users.txt
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/sources/users.txt b/docs/rest-endpoints/sources/users.txt
deleted file mode 100644
index f0f91c5..0000000
--- a/docs/rest-endpoints/sources/users.txt
+++ /dev/null
@@ -1 +0,0 @@
-End-Point	Method	Description	Detail	
/{org_id}/{app_id}/users	POST	application/json	Create a user in the users collection	Detail
/{org_id}/{app_id}/users/{user}/ password	POST	application/json	Set a user's password or reset the user's existing password	Detail
/{org_id}/{app_id}/users/{identifier}	GET	application/json	Retrieve a user	Detail
/{org_id}/{app_id}/users/{identifier}	PUT	application/json	Update a user	Detail
/{org_id}/{app_id}/users/{identifier}	DELETE	application/json	Delete a user	Detail
/{org_id}/{app_id}/users?{query}	GET	application/json	Query to get users	Detail
/{org_id}/{app_id}/groups/{group-identifier}/users/{user-identifier}	POST	application/json	Add a user to a group	Detail
/{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_id}	POST	application/json	Add a user to a collection or create a connection	Detail
/{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_type}/{second_entity_id}	POST	application/json	Ad
 d a user to a collection or create a connection	Detail
/{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_id}	DELETE	application/json	Remove a user from a collection or delete a connection	Detail
/{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/second_entity_type}/{second_entity_id}	DELETE	application/json	Remove a user from a collection or delete a connection	Detail
/{org_id}/{app_id}/users/{identifier}/{relationship}?{query}	GET	application/json	Query a user's collections or connections	Detail
/{org_id}/{app_id}/users/{identifier}/feed	GET	application/json	Get a user's feed	Detail
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/rest-endpoints/users.md
----------------------------------------------------------------------
diff --git a/docs/rest-endpoints/users.md b/docs/rest-endpoints/users.md
deleted file mode 100644
index 48305f8..0000000
--- a/docs/rest-endpoints/users.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# Users
-
-
-<!-- DO NOT EDIT THIS GENERATED FILE -->
-
-<table class='usergrid-table rest-endpoints-table'>
-  <tr>
-    <th>End-Point</th>
-    <th>Method</th>
-    <th>Description</th>
-    <th>Detail</th>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/users</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Create a user in the users collection</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/users/{user}/ password</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Set a user's password or reset the user's existing password</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/users/ {uuid|username|email_address}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Retrieve a user</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/users/ {uuid|username}</td>
-    <td>PUT</td>
-    <td>application/json</td>
-    <td>Update a user</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/users/{uuid|username}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Delete a user</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/users?{query}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Query to get users</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/groups/ {uuid|groupname}/users/{uuid|username}</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Add a user to a group</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}/ {first_entity_id}/{relationship}/ {second_entity_id} or /{org_id}/{app_id}/{collection}/ {first_entity_id}/{relationship}/ {second_entity_type}/{second_entity_id}</td>
-    <td>POST</td>
-    <td>application/json</td>
-    <td>Add a user to a collection or create a connection</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/{collection}/ {first_entity_id}/{relationship}/ {second_entity_id} or /{org_id}/{app_id}/{collection}/ {first_entity_id}/{relationship}/ {second_entity_type}/{second_entity_id}</td>
-    <td>DELETE</td>
-    <td>application/json</td>
-    <td>Remove a user from a collection or delete a connection</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-odd usergrid-table'>
-    <td>/{org_id}/{app_id}/users/{uuid|username}/ {relationship}?{query}</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Query a user's collections or connections</td>
-    <td>Detail</td>
-  </tr>
-  <tr class='ug-even usergrid-table'>
-    <td>/{org_id}/{app_id}/users/ {uuid|username}/feed</td>
-    <td>GET</td>
-    <td>application/json</td>
-    <td>Get a user's feed</td>
-    <td>Detail</td>
-  </tr>
-</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/src/main/groovy/ApiDocGenerator.groovy
----------------------------------------------------------------------
diff --git a/docs/src/main/groovy/ApiDocGenerator.groovy b/docs/src/main/groovy/ApiDocGenerator.groovy
new file mode 100644
index 0000000..810ca53
--- /dev/null
+++ b/docs/src/main/groovy/ApiDocGenerator.groovy
@@ -0,0 +1,176 @@
+/*
+ * Generates API docs from Swagger.
+ */
+
+// Depdency management with Grape:
+//    http://docs.groovy-lang.org/latest/html/documentation/grape.html
+
+import io.swagger.models.parameters.RefParameter
+@Grab(group = 'io.swagger', module = 'swagger-parser', version = '1.0.8')
+@Grab(group = 'io.swagger', module = 'swagger-compat-spec-parser', version = '1.0.8')
+@Grab(group = 'com.github.spullara.mustache.java', module = 'compiler', version = '0.8.18-SNAPSHOT')
+
+import io.swagger.parser.*;
+import io.swagger.models.*;
+import com.github.mustachejava.*;
+
+
+public class ApiDocGenerator {
+    
+    def parser = new SwaggerParser();
+    def swagger = parser.read("src/main/resources/usergrid-swagger.yaml");
+   
+    // Mustache reference: http://mustache.github.io/mustache.5.html
+    // mustache.java info: https://github.com/spullara/mustache.java
+    def writer = new OutputStreamWriter(new FileOutputStream("rest-endpoints/api-docs.md"));
+    def mf = new DefaultMustacheFactory();
+
+    def mustacheBase = "src/main/resources";
+    def operationTemplate = mf.compile(new FileReader("${mustacheBase}/operation.mustache"), "operation");
+    def modelTemplate = mf.compile(new FileReader("${mustacheBase}/model.mustache"), "operation");
+    
+
+    public static void main( String[] args ) {
+        def adg = new ApiDocGenerator();
+        adg.generate();
+    }
+    
+    def generate() {
+
+        // organize methods by tag
+        def tagsToUrlOps = [:]
+        
+        swagger.getPaths().each { pathEntry ->
+            def url = pathEntry.key;
+            def path = pathEntry.value;
+           
+            def tag; // assume each opeation has only one tag
+            def method;
+            def operation;
+            
+            if (path.get != null) {
+                tag = path.get.tags[0];
+                method = "GET";
+                operation = path.get;
+            }
+            if (path.post != null) {
+                tag = path.post.tags[0];
+                method = "POST";
+                operation = path.post;
+            }
+            if (path.delete != null) {
+                tag = path.delete.tags[0];
+                method = "DELETE";
+                operation = path.delete;
+            }
+            if (path.put != null) {
+                tag = path.put.tags[0];
+                method = "PUT";
+                operation = path.put;
+            }
+
+            def urlOps = tagsToUrlOps[tag];
+            if ( urlOps == null ) {
+                urlOps = [];
+                tagsToUrlOps[tag] = urlOps;
+            }
+            def urlOp = [:];
+            urlOp.url = url;
+            urlOp.method = method;
+            urlOp.operation = operation;
+            urlOps.add(urlOp); 
+        }
+
+        writer.println "\n# Methods";
+        
+        tagsToUrlOps.each { entry -> 
+            def tag = entry.key;
+            def urlOps = entry.value;
+//            writer.println "\n<div class='hr'/>";
+            writer.println "\n## ${tag} Methods";
+            urlOps.each { urlOp ->
+                formatOperation( urlOp );
+            };
+        };
+
+        writer.println "\n# Models";
+        
+        swagger.getDefinitions().each { definitionEntry -> 
+            def name = definitionEntry.key;
+            def model = definitionEntry.value;
+            formatModel( name, model );
+        };
+    }
+
+    def formatOperation( urlOp ) {
+
+        def url = urlOp.url;
+        def method = urlOp.method;
+        def op = urlOp.operation;
+        
+        // put responses in array form, mustache doesn't play nice with associative arrays
+        def responses = [];
+        op.getResponses().each { responseEntry -> 
+            def response = [:];
+            response.status = responseEntry.key;
+            response.description = responseEntry.value.description;
+            if ( responseEntry.value.schema != null) {
+                response.schema = responseEntry.value.schema.ref;
+                response.schemaAnchor = responseEntry.value.schema.ref.toLowerCase();
+            }
+            responses.add(response);
+        }
+
+        def params = [];
+        op.getParameters().each { parameter -> 
+            def param = [:];
+            param.name = parameter.name;
+            param.required = parameter.required;
+            param.description = parameter.description;
+            param.in = parameter.in;
+            if (parameter.in == "body" && parameter.schema != null) {
+                param.schemaRef = parameter.schema.ref;
+                param.schemaAnchor = parameter.schema.ref.toLowerCase();
+            } else if (parameter.in == "path") {
+                param.type = parameter.type;
+            }
+            params.add(param);
+        }
+        
+        def scope = [:];
+        scope.url = url;
+        scope.method = method;
+        scope.description = op.getDescription();
+        scope.summary = op.getSummary();
+        scope.tags = op.getTags();
+        scope.responses = responses;
+        scope.parameters = params;
+       
+        operationTemplate.execute(writer, scope);
+        writer.flush();
+    }
+    
+    def formatModel(String name, Model model) {
+
+        // put properties in array form, mustache doesn't play nice with associative arrays
+        def props = [];
+        model.getProperties().each { property -> 
+            def prop = [:];
+            prop.name = property.key;
+            prop.type = property.value.type;
+            prop.title = property.value.title;
+            prop.description = property.value.description;
+            prop.access = property.value.access;
+            prop.readOnly = property.value.readOnly;
+            prop.required = property.value.required;
+            prop.position = property.value.position;
+            props.add(prop);   
+        };
+        def scope = [:];
+        scope.name = name;
+        scope.properties = props;
+        modelTemplate.execute(writer, scope);
+        writer.flush(); 
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/src/main/resources/model.mustache
----------------------------------------------------------------------
diff --git a/docs/src/main/resources/model.mustache b/docs/src/main/resources/model.mustache
new file mode 100644
index 0000000..4e6e8b5
--- /dev/null
+++ b/docs/src/main/resources/model.mustache
@@ -0,0 +1,21 @@
+
+## {{name}}
+
+__Properties__ 
+
+<table width="80%" class="usergrid-table">
+    <tr>
+        <th>Name</th>
+        <th>Type</th>
+        <th>Description</th>
+        <th>Required</th>
+    </tr>
+    {{#properties}}
+    <tr>
+        <td>{{name}}</td>
+        <td>{{type}}</td>
+        <td>{{description}}</td>
+        <td>{{required}}</td>
+    </tr>
+    {{/properties}}
+</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/445ac3ec/docs/src/main/resources/operation.mustache
----------------------------------------------------------------------
diff --git a/docs/src/main/resources/operation.mustache b/docs/src/main/resources/operation.mustache
new file mode 100644
index 0000000..d19ec70
--- /dev/null
+++ b/docs/src/main/resources/operation.mustache
@@ -0,0 +1,21 @@
+
+<h2 class="usergrid-{{method}}-heading">{{method}} {{url}}</h2>
+
+{{description}}
+
+<h3>Parameters</h3>
+
+{{#parameters}}
+* __{{name}}__ ({{#type}}({{type}}){{/type}}{{#schemaRef}}[{{schemaRef}}](#{{schemaAnchor}}){{/schemaRef}})
+{{description}} (Specified in {{in}}).
+{{/parameters}}
+
+<h3>Responses</h3>
+
+{{#responses}}
+__{{#status}}{{status}}{{/status}}{{^status}}Default{{/status}}__
+
+* Description: {{description}}
+* Schema: [{{schema}}](#{{schemaAnchor}})
+    
+{{/responses}}


[8/9] incubator-usergrid git commit: Converted geolocation page.

Posted by sn...@apache.org.
Converted geolocation page.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/840c4a0d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/840c4a0d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/840c4a0d

Branch: refs/heads/ug2-doc-update
Commit: 840c4a0d7efdd3e5c0ba5cbee62ee392822306ac
Parents: 961a38f
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Aug 3 16:16:53 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Aug 3 16:16:53 2015 -0400

----------------------------------------------------------------------
 docs/geolocation/geolocation.md     | 72 +++++++++++++++++++++++++++++++-
 docs/index.rst                      | 20 ++++-----
 docs/reference/presos-and-videos.md | 22 ++++------
 3 files changed, 89 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/840c4a0d/docs/geolocation/geolocation.md
----------------------------------------------------------------------
diff --git a/docs/geolocation/geolocation.md b/docs/geolocation/geolocation.md
index f22475c..ede4e3c 100644
--- a/docs/geolocation/geolocation.md
+++ b/docs/geolocation/geolocation.md
@@ -1,2 +1,72 @@
-# Geolocation
+# Geolocating your Entities 
+Many of today's apps are enhanced by the use of geolocation – wireless detection of the physical location of a remote device. These apps determine the user's position and use this data to enhance user experience. For example, apps can capture the exact location where a picture was taken or determine what businesses stored in the database to return to the user based on their current location.
+
+API Services provides a standard format for storing geolocation information in any entity, as well as syntax for querying that data based on distance from a latitude/longitude point.
+
+## Saving location data in an entity
+In API Services, geolocation data is saved in the location property of an entity with latitude and longitude sub-properites in the following format:
+
+    "location": {	
+        "latitude": <latitude_coordinate>,
+        "longitude": <longitude_coordinate>  
+    } 	
+    
+An entity's geolocation can be specified when the entity is [created](../data-storage/entities.html#creating-custom-data-entities) or added later by [updating](../data-storage/entities.html#updating-data-entities) an existing entity.
+
+For example, the following entity describes a restaurant:
+
+	{
+	    "uuid" : "03ae956a-249f-11e3-9f80-d16344f5a0e1",
+	    "type" : "restaurant",
+	    "name" : "Rockadero",
+			"location": {
+			    "latitude": 37.779632,
+			    "longitude": -122.395131  
+			} 
+	    "created" : 1379975113142,
+	    "modified" : 1379975113142,
+	    "metadata" : {
+	      "path" : "/restaurants/03ae956a-249f-11e3-9f80-d16344f5a0e1"
+	}      
+	
+## Querying location data
+Location-aware apps require the ability to return content and results based on the user's current location. To easily enable this, API Services supports the following query parameter to retrieve entities within a specified distance of any geocoordinate based on its location property:
+
+	location within <distance_in_meters> of <latitude>, <longitude>
+	
+The returned results are sorted from nearest to furthest. Entities with the same location are returned in the order they were created.
+
+The location parameter can be appended to any standard API Services query. For more information on how to query your API Services data, see Querying your data.
+
+For example, here is how you would find all the devices within 8,046 meters (~10 miles) of the center of San Francisco:
+
+	curl -X GET https://api.usergrid.com/your-org/your-app/devices?ql=location within 8046 of 37.774989,-122.419413
+	
+## Enrich your app with location data
+Location-awareness has become a feature users expect in many types of mobile applications because of its ability to create a more personalized and relevant experience for each user. With this in mind, the geolocation feature in API Services was designed to work with many of the available [default data entities](../api-docs.html#models) to allow app developers to easily integrate powerful in-app features that can increase user engagement.
+
+Here are just a few of the ways that saving location data to a data entity can improve an app:
+
+<table class="usergrid-table">
+<tr>
+  <th>Entity</th>
+  <th>Usage</th>
+</tr>
+<tr>
+  <td>user</td>
+  <td>Save the location of a user's home as part of their profile in the ``users`` collection to suggest upcoming special events or activities located nearby, or to display advertisements that are relevant based on the user's proximity to a business.</td>
+</tr>
+<tr>
+  <td>device</td>
+  <td>Periodically save the location data returned from a user's device, then query the ``devices`` collection to send offers and alerts to user's that are located near your business with a [push notification](../push-notifications/push-notifications-overview).</td>
+</tr>
+<tr>
+  <td>activity</td>
+  <td>Create stronger social connections by associating a user ``activity`` with the location where it occurred. The activity can then be displayed to nearby friends and family, or used to enrich the user's activity stream.</td>
+</tr>
+<tr>
+  <td>asset</td>
+  <td>Save user photos with location data in the ``asset collection`` to allow users to retrieve and sort their memories based on when and where they happened.</td>
+</tr>
+</table>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/840c4a0d/docs/index.rst
----------------------------------------------------------------------
diff --git a/docs/index.rst b/docs/index.rst
index 0bafb65..6800aa4 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -55,14 +55,6 @@ Apache Usergrid Documentation
    entity-connections/retrieving-entities
    entity-connections/disconnecting-entities
    
-.. _push-notifications:
-
-.. toctree::
-   :maxdepth: 2
-   :caption: Push Notifications
-  
-   push-notifications/tbd.md
-   
 .. _security-and-authentication:
 
 .. toctree::
@@ -93,7 +85,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Geo-location
    
-   geolocation/tbd
+   geolocation/geolocation
    
 .. _asset-and-file-management:
 
@@ -118,7 +110,15 @@ Apache Usergrid Documentation
    :caption: Organizations and Applications
    
    orgs-and-apps/tbd
-   
+  
+.. _push-notifications:
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Push Notifications
+  
+   push-notifications/tbd.md
+      
 .. _rest-endpoints:
 
 .. toctree::

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/840c4a0d/docs/reference/presos-and-videos.md
----------------------------------------------------------------------
diff --git a/docs/reference/presos-and-videos.md b/docs/reference/presos-and-videos.md
index 19caa13..2112d11 100644
--- a/docs/reference/presos-and-videos.md
+++ b/docs/reference/presos-and-videos.md
@@ -1,7 +1,12 @@
-# Presentations
+# Presentations & Videos
+
+## Building Mobile Apps with Apache Usergrid
+- Screen-cast of a talk given by Dave Johnson at the All Things Open 2014, Raleigh, NC.
+
+<iframe width="560" height="315" src="https://www.youtube.com/embed/DjFG-QbxxLw" frameborder="0" allowfullscreen></iframe>
 
 ## How to Contribute to Apache Usergrid
-- David Johnson, [ApacheCon NA 2014](http://apacheconnorthamerica2014.sched.org/event/29971aabd3c86398be2ae93403c7d1d2)
+- David Johnson at [ApacheCon NA 2014](http://apacheconnorthamerica2014.sched.org/event/29971aabd3c86398be2ae93403c7d1d2)
 
 <iframe src="http://www.slideshare.net/slideshow/embed_code/33275731" width="600" height="400" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe>
 
@@ -20,18 +25,7 @@
 
 <iframe src="http://www.slideshare.net/slideshow/embed_code/9476483" width="600" height="400" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width
 
-# Videos
-
-Talks and presentations about Usergrid.
-
-## Building Mobile Apps with Apache Usergrid
-
-Screen-cast of a talk given by Dave Johnson at the All Things Open 2014, Raleigh, NC.
-
-<iframe width="560" height="315" src="https://www.youtube.com/embed/DjFG-QbxxLw" frameborder="0" allowfullscreen></iframe>
-
 ## Cassandra at Apigee, Usergrid Powering Mobile
-
-Video of talk given by Ed Anuff at the Cassandra Summit 2012, Santa Clara, CA.
+- Video of talk given by Ed Anuff at the Cassandra Summit 2012, Santa Clara, CA.
 
 <iframe width="640" height="360" src="http://www.youtube.com/embed/RuJwIBu3jvs?rel=0" frameborder="0" allowfullscreen></iframe>
\ No newline at end of file


[7/9] incubator-usergrid git commit: Converted the security & authentication section.

Posted by sn...@apache.org.
Converted the security & authentication section.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/961a38f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/961a38f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/961a38f4

Branch: refs/heads/ug2-doc-update
Commit: 961a38f4465c38a6a6599bfc4356eeea6dd3a9d7
Parents: 445ac3e
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Aug 3 14:07:38 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Aug 3 14:07:38 2015 -0400

----------------------------------------------------------------------
 docs/README.md                                  |  25 ++-
 docs/_static/css/theme.css                      |   4 +
 docs/asset-and-files/tbd.md                     |   1 +
 docs/counters-and-events/tbd.md                 |   1 +
 docs/geolocation/tbd.md                         |   1 +
 docs/index.rst                                  |  31 ++--
 docs/orgs-and-apps/tbd.md                       |   1 +
 docs/push-notifications/tbd.md                  |   1 +
 docs/sdks/tbd.md                                |   1 +
 docs/security-and-auth/app-security.md          |  19 +++
 .../authenticating-api-requests.md              |  38 +++++
 ...henticating-users-and-application-clients.md | 128 +++++++++++++++
 .../changing-token-time-live-ttl.md             |  61 +++++++
 docs/security-and-auth/facebook-sign.md         | 158 +++++++++++++++++++
 .../security-and-auth/revoking-tokens-logout.md |  32 ++++
 docs/security-and-auth/roles-and-permissions.md |  18 ---
 docs/security-and-auth/securing-your-app.md     |  44 ++++++
 docs/security-and-auth/securitymodel0.png       | Bin 0 -> 91321 bytes
 .../user-authentication-types.md                |  63 ++++++++
 docs/security-and-auth/using-permissions.md     | 115 ++++++++++++++
 docs/src/main/resources/operation.mustache      |   2 +-
 docs/user-management/tbd.md                     |   1 +
 22 files changed, 709 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/README.md
----------------------------------------------------------------------
diff --git a/docs/README.md b/docs/README.md
index 6da14cf..204e90d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -43,6 +43,27 @@ A note about tables: simple tables are easy and you can find examples (e.g. conn
 but for tables with multiple lines in each cell, you'll probably want to use a raw HTML table,
 and there are plenty of examples of that around too.
 
-### The REST documentation 
+### The REST API documentation 
 
-TBD
+The REST API documentation in ``rest-endpoints/api-docs.md`` is generated from a Swagger file in the 
+directory ``src/main/resources``, so DO NOT edit that file directly.
+
+If you need to update the REST API docs, you should edit the usergrid-swagger.yaml file and then
+ re-generate the file. 
+
+If you need to change the formatting of the REST API docs, then you will need to edit the Mustache
+templates in ``src/main/resource`` and you may need to edit the Groovy script that does the 
+generation: ``src/main/groovy/ApiDocGenerator``.
+ 
+You will need:
+* Groovy 2.x
+* [Mustache.java](https://github.com/spullara/mustache.java) 
+
+Unfortunately, you will have to Git Clone Mustatche.java before you can run the generation script.
+
+This is the command to run the generation:
+
+	groovy src/main/groovy/ApiDocGenerator.groovy
+	
+The script will update the file ``rest-endpoints/api-docs.md`` and when you are happy with your
+update you should commit and push that file with Git.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/_static/css/theme.css
----------------------------------------------------------------------
diff --git a/docs/_static/css/theme.css b/docs/_static/css/theme.css
index 17d12b3..870e633 100755
--- a/docs/_static/css/theme.css
+++ b/docs/_static/css/theme.css
@@ -5352,6 +5352,10 @@ h2.usergrid-DELETE-heading {
     background-color: red;
 }
 
+.rst-footer-buttons {
+    margin-bottom: 2em;
+}
+
 /* css from petstore example */
 
 body {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/asset-and-files/tbd.md
----------------------------------------------------------------------
diff --git a/docs/asset-and-files/tbd.md b/docs/asset-and-files/tbd.md
new file mode 100644
index 0000000..f65681d
--- /dev/null
+++ b/docs/asset-and-files/tbd.md
@@ -0,0 +1 @@
+# Coming soon...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/counters-and-events/tbd.md
----------------------------------------------------------------------
diff --git a/docs/counters-and-events/tbd.md b/docs/counters-and-events/tbd.md
new file mode 100644
index 0000000..f65681d
--- /dev/null
+++ b/docs/counters-and-events/tbd.md
@@ -0,0 +1 @@
+# Coming soon...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/geolocation/tbd.md
----------------------------------------------------------------------
diff --git a/docs/geolocation/tbd.md b/docs/geolocation/tbd.md
new file mode 100644
index 0000000..f65681d
--- /dev/null
+++ b/docs/geolocation/tbd.md
@@ -0,0 +1 @@
+# Coming soon...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/index.rst
----------------------------------------------------------------------
diff --git a/docs/index.rst b/docs/index.rst
index bcbca10..0bafb65 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -61,7 +61,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Push Notifications
   
-   push-notifications/users-devices
+   push-notifications/tbd.md
    
 .. _security-and-authentication:
 
@@ -69,7 +69,15 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Security and Authentication
   
-   security-and-auth/roles-and-permissions
+   security-and-auth/app-security
+   security-and-auth/using-permissions
+   security-and-auth/authenticating-users-and-application-clients
+   security-and-auth/user-authentication-types
+   security-and-auth/changing-token-time-live-ttl
+   security-and-auth/authenticating-api-requests
+   security-and-auth/revoking-tokens-logout
+   security-and-auth/facebook-sign
+   security-and-auth/securing-your-app
    
 .. _user-management-and-social-graph:
 
@@ -77,8 +85,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: User Management and Social Graph
   
-   user-management/activity
-   user-management/groups
+   user-management/tbd
    
 .. _geolocation:
 
@@ -86,7 +93,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Geo-location
    
-   geolocation/geolocation
+   geolocation/tbd
    
 .. _asset-and-file-management:
 
@@ -94,8 +101,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Assets and Files
   
-   asset-and-files/assets
-   asset-and-files/file-storage-configuration
+   asset-and-files/tbd
    
 .. _counters-and-events:
 
@@ -103,7 +109,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Counters and Events
   
-   counters-and-events/events-and-counters
+   counters-and-events/tbd
    
 .. _organization-and-application-management:
 
@@ -111,9 +117,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Organizations and Applications
    
-   orgs-and-apps/applications
-   orgs-and-apps/organizations-admins
-
+   orgs-and-apps/tbd
    
 .. _rest-endpoints:
 
@@ -129,10 +133,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Client SDKs
 
-   sdks/ios
-   sdks/java
-   sdks/javascript
-   sdks/usage
+   sdks/tbd
    
 .. _installation:
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/orgs-and-apps/tbd.md
----------------------------------------------------------------------
diff --git a/docs/orgs-and-apps/tbd.md b/docs/orgs-and-apps/tbd.md
new file mode 100644
index 0000000..f65681d
--- /dev/null
+++ b/docs/orgs-and-apps/tbd.md
@@ -0,0 +1 @@
+# Coming soon...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/push-notifications/tbd.md
----------------------------------------------------------------------
diff --git a/docs/push-notifications/tbd.md b/docs/push-notifications/tbd.md
new file mode 100644
index 0000000..f65681d
--- /dev/null
+++ b/docs/push-notifications/tbd.md
@@ -0,0 +1 @@
+# Coming soon...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/sdks/tbd.md
----------------------------------------------------------------------
diff --git a/docs/sdks/tbd.md b/docs/sdks/tbd.md
new file mode 100644
index 0000000..f65681d
--- /dev/null
+++ b/docs/sdks/tbd.md
@@ -0,0 +1 @@
+# Coming soon...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/app-security.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/app-security.md b/docs/security-and-auth/app-security.md
new file mode 100644
index 0000000..9dcf3e2
--- /dev/null
+++ b/docs/security-and-auth/app-security.md
@@ -0,0 +1,19 @@
+# Security & token authentication
+
+Any app you put into production should feature security that protects your app, your users, and your app's data. Implementing security means taking steps in your mobile app's code and in your API Services BaaS application.
+
+__Important__: When you register for the API Services BaaS, you get a sandbox application that you can use to try things out. This application is not for use in production. By default, the sandbox application is not protected by any security measures whatsoever. Use the sandbox only for experimentation, and only with data that isn't in any way sensitive.
+
+When securing your app, follow these high-level steps:
+
+1. Define the rules that will govern access by your app's users to your app's data and features. You do this with the admin portal by creating permission rules, then associating those rules with your users. For more information, see [Using Permissions](managing-access-defining-permission-rules.html).
+2. Write code through which your app's users can verify who they are to your application. You do this by writing code that uses their username and password as credentials to initially authenticate with your application, then uses a token thereafter. (This authentication style supports the OAuth 2.0 model.) For more information, see [Authenticating users & app clients](autheticating-users-and-application-clients.html).
+3. Be sure to use coding best practices that help ensure that your app is protected from malicious attacks. For more information, see [Security best practices](security-best-practices.html).
+
+The following illustration describes these high-level areas.
+
+.. image:: securitymodel0.png
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/authenticating-api-requests.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/authenticating-api-requests.md b/docs/security-and-auth/authenticating-api-requests.md
new file mode 100644
index 0000000..c48bebd
--- /dev/null
+++ b/docs/security-and-auth/authenticating-api-requests.md
@@ -0,0 +1,38 @@
+# Authenticating API requests
+
+With the exception of the 'sandbox' application that is created with every API BaaS organization, all applications are secured by default. This means that to access your data store, a valid access token must be sent with all API requests to authenticate that the requester is authorized to make API calls to the resources they are attempting the access.
+
+This article describes how to use access tokens to access the API BaaS API, and how to manage access tokens, including revoking and changing token time to live.
+
+For information on generating access tokens/authenticating users and clients, see Authenticating users and application clients.
+
+## Authenticating with access tokens
+When you obtain an access token, you must provide it with every subsequent API call that you make. There are two ways to provide your access token.
+
+You can add the token to the API query string:
+
+    https://<usergrid-host>/{org-name}/{app-name}/users?access_token={access_token}
+    
+You can include the token in an HTTP authorization header:
+
+    Authorization: Bearer {access_token}
+
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">

+Note: The API BaaS documentation assumes you are providing a valid access token with every API call whether or not it is shown explicitly in the examples. Unless the documentation specifically says that you can access an API endpoint without an access token, you should assume that you must provide it. One application that does not require an access token is the sandbox application. The Guest role has been given full permissions (/** for GET, POST, PUT, and DELETE) for this application. This eliminates the need for a token when making application level calls to the sandbox app. For further information on specifying permissions, see Managing access by defining permission rules.
+</p></div>
+
+## Authenticating with client ID and client secret
+
+Another option for authenticating your API requests is using either your organization client ID and client secret, or your application client ID and client secret, which will authenticate your request as an organization or application admin, respectively. Organization credentials can be found in the 'Org Overview' section of the admin portal, and application credentials can be found in the 'Getting Started' section of the admin portal.
+
+<div class="admonition warning"> <p class="first admonition-title">WARNING</p> <p class="last">

+Warning: For server-side use only
+You should never authenticate this way from a client-side app such as a mobile app. A hacker could analyze your app and extract the credentials for malicious use even if those credentials are compiled and in binary format. See Security best practices for additional considerations in keeping access to your app and its data secure.
+</p></div>
+
+This can be a convenient way to authenticate API requests, since there is no need to generate and manage an access token, but please note that you should be very cautious when implementing this type of authentication. Organization-level authentication grants full permission to perform any supported call against your organization and every application in it, and application-level authentication grants full permission to perform any supported call against all of the resources in an application. Should your client id and client secret be compromised, a malicious user would gain broad access to your organization or application.
+
+To authenticate using client id and secret, append the following parameters to your request URL:
+
+    client_id=<your-client-id>&client_secret=<your-client-secret>
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/authenticating-users-and-application-clients.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/authenticating-users-and-application-clients.md b/docs/security-and-auth/authenticating-users-and-application-clients.md
new file mode 100644
index 0000000..54dded0
--- /dev/null
+++ b/docs/security-and-auth/authenticating-users-and-application-clients.md
@@ -0,0 +1,128 @@
+# Authenticating users & app clients
+
+To protect your App Services application data, one of the steps you'll take is to authenticate your app's users. By ensuring that they are who they say they are, you can help ensure that your application's data is available in secure ways. After you've created permission rules that define access to your application and have associated these rules with users, you'll want to add code that authenticates your user, as described in this topic.
+
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">

+You manage access to your application's data by creating permission rules that govern which users can do what. Users authenticated as Application User have access according to these rules. For more about managing permissions, see [Using Permissions](using-permissions.html).
+</p></div>
+
+
+## Authentication levels
+App Services supports four levels of authentication:
+
+* __Application user__: Grant's user access to an API Services application, based on the roles and permissions assigned to the user.
+* __Application client__: Grants full access to perform API requests against an API Services application.
+* __Organization client__: Grants full access to perform API requests against an API Services organization.
+* __Admin user__: Grants full access to perform API requests against any API Services organization that the user is an admin of.
+
+Because the scope of access provided by the application client, organization client, and admin user authentication levels is so broad (and as a result, so powerful), it's a bad practice to use them from a mobile app or any client-side code. Instead, they're better suited to server-side implementations, such as web applications.
+
+For a more detailed description of available authentication levels, see [Authentication levels](user-authentication-types.html).
+
+## Application user authentication (user login)
+Using the username and password values specified when the user entity was created, your app can connect to the App Services application endpoint to request an access token. It's also acceptable to use the user's email address in place of the username.
+
+### Using the SDKs
+When a user is logged in using the Apigee iOS, JavaScript, node.JS and Android SDKs, the returned token is automatically stored in the ApigeeDataClient (iOS), DataClient (Android), or Apigee.Client (JavaScript/node.JS) class instance, and will be sent to the API with all subsequent method calls.
+
+#### Request syntax
+
+    curl -X POST "https://api.usergrid.com/<orgName>/<appName>/token" -d '{"grant_type":"password", "username":<username>, "password":<password>}'
+
+#### Example request
+
+    curl -X POST "https://api.usergrid.com/my-org/my-app/token" -d '{"grant_type":"password", "username":"john.doe", "password":"testpw"}'
+		
+#### Example response
+
+The results include the access token needed to make subsequent API requests on behalf of the application user:
+
+    {
+    "access_token": "5wuGd-lcEeCUBwBQVsAACA:F8zeMOlcEeCUBwBQVsAACA:YXU6AAABMq0hdy4",
+    "expires_in": 3600,
+        "user": {
+            ...
+        }
+    }
+		
+## Application client authentication
+Using your app’s client id and client secret values, your app can connect to the App Services application endpoint to request an access token. The client ID and secret for your app can be found in 'Getting Started' section of the API Services admin portal, under 'Server App Credentials'.
+
+<div class="admonition warning"> <p class="first admonition-title">WARNING</p> <p class="last">

+Warning: You should never authenticate this way from a client-side app such as a mobile app. A hacker could analyze your app and extract the credentials for malicious use even if those credentials are compiled and in binary format. See "safe mobile access" in [Authenticating API requests](authenticating-api-requests.html) for additional considerations in keeping access to your app and its data secure.
+</p></div>
+
+### Request syntax
+
+    curl -X POST "https://api.usergrid.com/<orgName>/<appName>/token" -d '{"grant_type":"client_credentials", "client_id":<application_clientID>, "client_secret":"<application_client_secret>"}'
+    
+### Example request
+
+    curl -X POST "https://api.usergrid.com/my-org/my-app/token" -d '{"grant_type":"client_credentials", "client_id":"YXB7NAD7EM0MEeJ989xIxPRxEkQ", "client_secret":"YXB7NAUtV9krhhMr8YCw0QbOZH2pxEf"}'
+		
+### Example response
+
+The results include the access token needed to make subsequent API requests on behalf of the application:
+
+    {
+        "access_token": "F8zeMOlcEeCUBwBQVsAACA:YXA6AAABMq0d4Mep_UgbZA0-sOJRe5yWlkq7JrDCkA",
+        "expires_in": 3600,
+        "application": {
+            ...  
+        }
+    }
+		
+## Admin user authentication
+If you do require admin user access, your app can connect to the App Services management endpoint to request an access token. Your app supplies the username and password of an admin user in the request.
+
+<div class="admonition warning"> <p class="first admonition-title">WARNING</p> <p class="last">

+Warning: Authenticating as an admin user grants full access to one or more organizations and all of the applications contained in those organizations. Due to this, be cautious when implementing this type of authentication in client-side code. Instead, consider implementing admin user access in server-side code only. See "safe mobile access" in [Authenticating API requests](authenticating-api-requests.html) for additional considerations in keeping access to your app and its data secure.
+</p></div>
+
+### Request syntax
+
+    curl -X POST "https://api.usergrid.com/management/token" -d '{"grant_type":"password", "username":<admin_username>, "password":<admin_password>}'
+    
+### Example Request
+
+    curl -X POST "https://api.usergrid.com/management/token"  -d '{"grant_type":"password", "username":"testadmin", "password":"testadminpw"}'
+
+### Example response
+
+The results include the access token needed to make subsequent API requests on behalf of the admin user:
+
+    {
+        "access_token": "f_GUbelXEeCfRgBQVsAACA:YWQ6AAABMqz_xUyYeErOkKjnzN7YQXXlpgmL69fvaA",
+        "expires_in": 3600,
+        "user": {
+            ...
+        }
+    }		    
+		
+## Organization client authentication
+If you do require organization level access, your app can connect to the App Services management endpoint to request an access token. Access to an organization requires the client id and client secret credentials. The client ID and secret for your organization can be found on the 'Org Administration' page of the API Services admin console under 'Organization API Credentials'.
+
+<div class="admonition warning"> <p class="first admonition-title">WARNING</p> <p class="last">

+Warning: You should never authenticate this way from a client-side app such as a mobile app. A hacker could analyze your app and extract the credentials for malicious use even if those credentials are compiled and in binary format. See "safe mobile access" in [Authenticating API requests](authenticating-api-requests.html for additional considerations in keeping access to your app and its data secure.
+</p></div>
+
+### Request syntax
+
+    curl -X POST "https://api.usergrid.com/management/token" -d '{"grant_type":"client_credentials", "client_id":<org_clientID>, "client_secret":<org_client_secret>}'
+    
+### Example request
+
+    curl -X POST "https://api.usergrid.com/management/token" -d '{"grant_type":"client_credentials", "client_id":"YXB7NAD7EM0MEeJ989xIxPRxEkQ", "client_secret":"YXB7NAUtV9krhhMr8YCw0QbOZH2pxEf"}'
+	
+### Example response
+
+The results include the access token needed to make subsequent API requests to the organization:
+
+    {
+        "access_token": "gAuFEOlXEeCfRgBQVsAACA:b3U6AAABMqz-Cn0wtDxxkxmQLgZvTMubcP20FulCZQ",
+        "expires_in": 3600,
+        "organization": {
+            ...
+        }
+    }
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/changing-token-time-live-ttl.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/changing-token-time-live-ttl.md b/docs/security-and-auth/changing-token-time-live-ttl.md
new file mode 100644
index 0000000..1dcdd4e
--- /dev/null
+++ b/docs/security-and-auth/changing-token-time-live-ttl.md
@@ -0,0 +1,61 @@
+# Changing token expiration (time-to-live)
+
+An access token has a “time-to-live” (ttl), which is the maximum time that the access token will be valid for use within the application. With the API Baas, you can change the default ttl for all application user tokens, set the ttl for an individual token at the time of creation, or revoke one or more tokens. This gives you a high degree of control over access to your API Baas account and data store.
+
+## Default ttl
+By default, all tokens have a system-defined time-to-live of 7 days (604800 seconds). Note that Token ttl is specified in milliseconds, but when a token is created, the API response will return the ttl in seconds.
+
+## Changing the default ttl
+You can change the default ttl for all application user tokens (that is, tokens associated with a user entity) by updating the application entity’s accesstokenttl property. Changing the default ttl will only affect new tokens. Any existing tokens will not be affected.
+
+Please note that this does not apply to application client, organization client or admin user tokens. For more on obtaining tokens for these other authorization levels, see [Authenticating users and application clients](authenticating-users-and-application-clients.html).
+
+__Note__: If you set ttl=0, the token will never expire. This can pose a security risk and should be used with caution.
+
+### Request syntax
+
+    curl -X PUT https://api.usergrid.com/<org_name>/<app_name> -d '{"accesstokenttl":<ttl_in_milliseconds>}'
+    
+### Example Request
+
+    curl -X PUT https://api.usergrid.com/your-org/your-app -d '{"accesstokenttl":"1800000"}'
+    
+### Example response
+
+    {
+      "action" : "put",
+      "application" : "d878de4r-99a7-11e3-b31d-5373d7165c2d",
+      "params" : {
+        "access_token" : [ "DFR4d5M1mJmoEeOGVPncm-g9qgAAAURv_lfQ7uu6aYHjJJn7QCrGoVnvU-ob5Ko" ]
+      },
+      "uri" : "https://api.usergrid.com/amuramoto/secured",
+      "entities" : [ {
+        "uuid" : "d878de4r-99a7-11e3-b31d-5373d7165c2d",
+        "type" : "application",
+        "name" : "your-org/your-app",
+        "created" : 1392843003032,
+        "modified" : 1392843615777,
+        "accesstokenttl" : 1800000,
+        "organizationName" : "your-org",
+        "applicationName" : "your-app",
+        "apigeeMobileConfig" : "{...}",
+        "metadata" : {
+          "collections" : [ "activities", "assets", "devices", "events", "folders", "groups", "roles", "users" ]
+        }
+      } ],
+      "timestamp" : 1392843615767,
+      "duration" : 28,
+      "organization" : "your-org",
+      "applicationName" : "your-app"
+    }
+
+## Changing ttl when a token is created
+When you request an access token, you can override its ttl by including a ttl property in the body of the request when the token is created. This applies to tokens for all authentication levels, including application user, admin user, organization client, and application client authentication levels.
+
+The ttl must be equal to or less than the value of the application entity's accesstokenttl property. If you specify a ttl value greater than the value of accesstokenttl, an error message is returned that indicates the maximum time to live value that can be specified.
+
+For example, the following would create an application user token with a ttl of 180000000 milliseconds:
+
+    curl -X POST https://api.usergrid.com/your-org/your-app/token -d '{"username":"someUser", "password":"somePassword", "grant_type":"password", "ttl":"180000000"}'
+    
+__Note__: If you set ttl=0, the token will never expire. This can pose a security risk and should be used with caution.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/facebook-sign.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/facebook-sign.md b/docs/security-and-auth/facebook-sign.md
new file mode 100644
index 0000000..55be0de
--- /dev/null
+++ b/docs/security-and-auth/facebook-sign.md
@@ -0,0 +1,158 @@
+# Facebook sign in
+
+You can authenticate your App Services requests by logging into Facebook. To access App Services resources, you need to provide an access token with each request (unless you use the sandbox app). You can get an access token by connecting to an appropriate web service endpoint and providing the correct client credentials — this is further described in Authenticating users and application clients. However, you can also obtain an access token by logging into Facebook.
+
+To enable authentication to App Services through Facebook, do the following in your app:
+
+1. Make a login call to the Facebook API (do this using the Facebook SDK or API). If the login succeeds, a Facebook access token is returned.
+2. Send the Facebook access token to App Services. If the Facebook access token is valid and the user does not already exist in App Services, App Services provisions a new App Services user. It also returns an App Services access token, which you can use for subsequent App Services API calls. Behind the scenes, App Services uses the Facebook access token to retrieve the user's profile information from Facebook.
+3. If the Facebook access token is invalid, Facebook returns an OAuth authentication error, and the login does not succeed.
+
+The request to authenticate to App Services using a Facebook access token is:
+
+    GET https://api.usergrid.com/{my_org}/{my_app}/auth/facebook?fb_access_token={fb_access_token}
+    
+where:
+
+* ``{my_org}`` is the organization UUID or organization name.
+* ``{my_app}`` is the application UUID or application name.
+* ``{fb_access_token}`` is the Facebook access token.
+
+## Facebook login example
+The Facebook technical guides for login present detailed information on how to add Facebook login to your app. Instructions are provided for JavaScript, iOS, and Android.
+
+In brief, here are the steps for JavaScript. You can see these steps implemented in the Facebook login example packaged with the JavaScript SDK for App Services (which you can download in ZIP format or tar.gz format). The Facebook login example is in the /examples/facebook directory of the extracted download. The code example snippets shown below are taken from the Facebook login example.
+
+### Step 1: Create a Facebook app
+Create a new app on the Facebook App Dashboard. Enter your app's basic information. Once created, note the app ID shown at the top of the dashboard page.
+
+### Step 2: Invoke the Facebook OAuth dialog
+Invoke the Facebook OAuth Dialog. To do that, redirect the user's browser to a URL by inserting the following Javascript code after the opening <body> tag in your app’s HTML file:
+
+    https://www.facebook.com/dialog/oauth/?
+        client_id={YOUR_APP_ID}
+        &redirect_uri={YOUR_REDIRECT_URL}
+        &state={YOUR_STATE_VALUE}
+        &scope={COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES}
+        &response_type={YOUR_RESPONSE_TYPE}
+    
+where:
+
+``{YOUR_APP_ID}`` is the app ID.
+``{YOUR_REDIRECT_URL}`` is the application UUID or application name.
+``{YOUR_STATE_VALUE}`` is a unique string used to maintain application state between the request and callback.
+``{COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES}`` is a comma separated list of permission names which you would like the user to grant your application.
+``{YOUR_RESPONSE_TYPE}``is the requested response type, either code or token. Defaults to code. Set the response type to token. With the response type set to token, the Dialog's response will include an OAuth user access token in the fragment of the URL the user is redirected to, as per the client-side authentication flow.
+
+Here is how it’s done in the Facebook login example:
+
+    var apiKey = $("#api-key").val();
+    var location = window.location.protocol + '//' + window.location.host;
+    var path = window.location.pathname;
+
+    var link = "https://www.facebook.com/dialog/oauth?client_id=";
+    link += apiKey;
+    link += "&redirect_uri=";
+    link += location+path
+    link += "&scope&COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES&response_type=token";
+
+    //now forward the user to facebook
+    window.location = link;
+    
+Notice that the response type is set to token. As a result, a Facebook access token will be appended to the URL to which the user is redirected.
+
+### Step 3: Add the JavaScript SDK for Facebook
+Add the following Javascript SDK initialization code after the code that invokes the Facebook OAuth Dialog. The code will load and initialize the JavaScript SDK in your HTML page. Replace ``YOUR_APP_ID`` with the App ID noted in Step 1, and WWW.YOUR_DOMAIN.COM with your own domain.
+
+    window.fbAsyncInit = function() {
+        FB.init({
+          appId      : 'YOUR_APP_ID', // App ID
+          channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
+          status     : true, // check login status
+          cookie     : true, // enable cookies to allow the server to access the session
+          xfbml      : true  // parse XFBML
+        });
+    
+Here is how the window.fbAsynchInit() function is implemented in the Facebook login example:
+
+    //load up the facebook api sdk
+      window.fbAsyncInit = function() {
+        FB.init({
+          appId      : '308790195893570', // App ID
+          channelUrl : '//usergridsdk.dev//examples/channel.html', // Channel File
+          status     : true, // check login status
+          cookie     : true, // enable cookies to allow the server to access the session
+          xfbml      : true  // parse XFBML
+        });
+      };
+      
+### Step 4. Setup FB.login
+Whenever a user is either not logged into Facebook or not authorized for an app, it is useful to prompt them with the relevant dialog. The ``FB.login()`` Javascript SDK function automatically displays the correct one to the user.
+
+To integrate ``FB.login()`` function in your existing code:
+
+    function login() {
+        FB.login(function(response) {
+            if (response.authResponse) {
+                // connected
+            } else {
+                // cancelled
+            }
+        });
+    }
+
+Here is how ``FB.login()`` is implemented in the Facebook login example:
+
+    function login(facebookAccessToken) {
+        client.loginFacebook(facebookAccessToken, function(err, response){
+          var output = JSON.stringify(response, null, 2);
+          if (err) {
+            var html = '<pre>Oops!  There was an error logging you in. \r\n\r\n';
+            html += 'Error: \r\n' + output+'</pre>';
+          } else {
+            var html = '<pre>Hurray!  You have been logged in. \r\n\r\n';
+            html += 'Facebook Token: ' + '\r\n' + facebookAccessToken + '\r\n\r\n';
+            html += 'Facebook Profile data stored in Usergrid: \r\n' + output+'</pre>';
+          }
+          $('#facebook-status').html(html);
+        })
+      }
+ 
+The ``client.loginFacebook()`` function is provided by the App Services JavaScript SDK. It uses the Facebook auth token to obtain an App Services auth token. If the Facebook access token is valid and the user does not already exist in App Services, the function creates a user entity for the user. It also uses the Facebook access token to retrieve the user's profile information from Facebook.
+
+Here is what the ``client.loginFacebook()`` function looks like:
+
+    Apigee.Client.prototype.loginFacebook = function (facebookToken, callback) {
+      var self = this;
+      var options = {
+        method:'GET',
+        endpoint:'auth/facebook',
+        qs:{
+          fb_access_token: facebookToken
+        }
+      };
+      this.request(options, function(err, data) {
+        var user = {};
+        if (err && self.logging) {
+          console.log('error trying to log user in');
+        } else {
+          user = new Apigee.Entity('users', data.user);
+          self.setToken(data.access_token);
+        }
+        if (typeof(callback) === 'function') {
+          callback(err, data, user);
+        }
+      });
+    }
+
+Notice that the function also returns an App Services access token, which you can use for subsequent App Services API calls.
+
+Remember to create a client for your app, which is the main entry point to the JavaScript SDK for App Services. You need to do this before you can use the SDK. Here’s the code to create a client:
+
+    var client = new Apigee.Client({
+        orgName:'yourorgname',
+        appName:'yourappname',
+        logging: true, //optional - turn on logging, off by default
+        buildCurl: true //optional - turn on curl commands, off by default
+    });
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/revoking-tokens-logout.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/revoking-tokens-logout.md b/docs/security-and-auth/revoking-tokens-logout.md
new file mode 100644
index 0000000..ffbadcb
--- /dev/null
+++ b/docs/security-and-auth/revoking-tokens-logout.md
@@ -0,0 +1,32 @@
+# Revoking tokens (logout)
+
+Under certain circumstances, you may need to explicitly revoke one or more tokens associated with a user entity, such as when a user logs out of your app. This is accomplished by making a PUT request to the /revoketoken and /revoketokens endpoints.
+
+## Revoking tokens (user logout)
+If a user has been logged in using the Apigee iOS, Android, JavaScript or node.JS SDKs, the returned token is automatically stored in the ApigeeDataClient (iOS), DataClient (Android), Apigee.Client (JavaScript), Usergrid.Client (node.JS) class instance. Calling the logout method of the SDK will destroy the token on the server, as well as in the client object.
+
+### Request syntax
+
+Revoke all tokens associated with a user entity
+
+    curl -X PUT https://api.usergrid.com/<org_name>/<app_name>/users/<user_uuid_or_username>/revoketokens
+		
+Revoke a specific token associated with a user entity
+
+    curl -X PUT https://api.usergrid.com/<org_name>/<app_name>/users/<user_uuid_or_username>/revoketoken?token=<token_to_revoke>			
+		
+### Example request
+
+    curl -X PUT https://api.usergrid.com/your-org/your-app/users/someUser/revoketokens
+		
+Example response
+
+    {
+      "action" : "revoked user token",
+      "timestamp" : 1382050891455,
+      "duration" : 24
+    }
+            
+### Revoking admin user tokens
+
+The /revoketoken and /revoketokens endpoints also work for revoking admin user tokens by making a PUT request to /management/users/<org_admin_username>/

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/roles-and-permissions.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/roles-and-permissions.md b/docs/security-and-auth/roles-and-permissions.md
deleted file mode 100644
index d237c13..0000000
--- a/docs/security-and-auth/roles-and-permissions.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Roles & Permissions
-
-## Roles
-
-A role represents a set of permissions that enable certain operations to
-be performed on a specific endpoint. You can assign a user to a role,
-and in this way give the user the permissions associated with that role.
-
-**Note:** The /rolenames endpoint is no longer valid. If your code currently
-makes calls to /rolenames, you need to change the calls to use /roles.
-
-## Permissions
-
-Each role contains multiple permissions. Permissions work by whitelisting by default, meaning any permission that is not explicitely granted is denied by default. Permission is an HTTP verb (GET to allow reads, POST to allow creation, PUT to allow edits and DELETE to allow deletes) combined with a path, with optional wildcards. For example the permission put:/users/* allows editing any user.
-
-Permissions can be added to roles, groups or to users directly, and a user’s permission is the combination of its personal permissions and the permissions of any role he’s been assigned, and the permissions of any group he’s a member of.
-
-Permissions are only valid within the scope of a single application, so the permission paths do not need to be prefixed with /org\_name\_or\_uuid/app\_name\_or\_uuid.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/securing-your-app.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/securing-your-app.md b/docs/security-and-auth/securing-your-app.md
new file mode 100644
index 0000000..7030aef
--- /dev/null
+++ b/docs/security-and-auth/securing-your-app.md
@@ -0,0 +1,44 @@
+# Security best practices
+
+There a number of actions you should take to ensure that your app is secure before you put it into production. The following is not an exhaustive list, but offers some common best practices you should consider following to keep your app secure when using the API BaaS.
+
+## Never use the 'sandbox' for a production app
+By default, every new API BaaS account has an app named “sandbox” that is already created under your new organization. This app is no different than any other app that you might create, except that the Guest role has been given full permissions (that is, /** for GET, POST, PUT, and DELETE). This eliminates the need for a token when making application level calls, and can make it much easier to get your app up and running; however, it also means that any data in the sandbox application is completely unsecured.
+
+As with any other app, you can secure the sandbox application by updating its roles and permissions. For more on working with permissions and roles, see [Using Permissions](using-permissions.html).
+
+## Review permissions in your apps
+Prior to launching your app into a production environment, it is advisable to review all the roles and permissions you have set up, as well as the groups and users you have assigned those permissions and roles to. During development, you may find that you added various permissions which may or may not still be required once the app is complete. Review all permissions and delete any that are no longer required.
+
+Prior to taking your app live, you should secure it by removing any unnecesary Guest permissions. (See [Using Permissions](using-permissions.html) for further information about setting permissions.) After you secure your the app, any calls to the API will need to include an OAuth token. Oauth tokens (also called access tokens) are obtained by the API in response to successful authentication calls. Your app saves the token and uses it for all future calls during that session. Learn more about access tokens in Authenticating users and application clients.
+
+## Edit the 'default' role
+When preparing an application for production use, a good first step is to edit permission rules for the Default role. The permissions in this role will be applied to every user who authenticates with a valid access token.
+
+For example, in the Default role, you will most likely first want to remove the permission rule that grants full access to all authenticated users:
+
+    GET,PUT,POST,DELETE:/users/me/**
+
+For more on roles, see [Using Permissions](using-permissions.html).
+
+Review test accounts
+If you created any test user or test administrator accounts during development, these should also be reviewed for relevancy and security. Delete any test accounts that are no longer needed. If these accounts are still needed, make sure that passwords have been secured to the standards required by your app.
+
+## Use https
+Make sure that any calls you make to the API are done using the secure https protocol, and not the insecure http protocol. 
+
+If your app is a web app, that is, an app served by a web server, make sure that the app is served using https.
+
+## Acquire access tokens in a secure way
+There are various methods for acquiring an access token (see [Authenticating users and application clients](authenticating-users-and-application-clients.html). One method is to use the application or organization level client secret-client id combination. This method should not be used in client applications (this is, apps that are deployed to a device, and which authenticate and make calls against the API).
+
+That’s because a hacker could analyze your app (even a compiled, binary distribution of your app), and retrieve the secret-id combination. Armed with this information, an attacker could gain full access to the data in your account.
+
+Instead, use application user credentials. This means that your app’s users should provide a username and password. Your app would use these to authenticate against the API and retrieve an access token.
+
+The client secret-client id combination should be used only in secure, server-side applications where there is no possibility of a hacker gaining control of the credentials.
+
+## Treat mobile clients as untrustworthy
+For mobile access, it is recommended that you connect as an application user with configured access control policies. Mobile applications are inherently untrusted because they can be easily examined and even decompiled.
+
+Any credentials stored in a mobile app should be considered secure only to the Application User level. This means that if you don’t want the user to be able to access or delete data in your API BaaS application, you need to make sure that you don’t enable that capability through roles or permissions. Because most web applications talk to the database using some elevated level of permissions, such as root, it’s generally a good idea for mobile applications to connect with a more restricted set of permissions. For more information on restricting access through permission rules, see [Using Permissions](using-permissions.html).

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/securitymodel0.png
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/securitymodel0.png b/docs/security-and-auth/securitymodel0.png
new file mode 100644
index 0000000..9f3ee82
Binary files /dev/null and b/docs/security-and-auth/securitymodel0.png differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/user-authentication-types.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/user-authentication-types.md b/docs/security-and-auth/user-authentication-types.md
new file mode 100644
index 0000000..79e140f
--- /dev/null
+++ b/docs/security-and-auth/user-authentication-types.md
@@ -0,0 +1,63 @@
+# Authentication levels
+
+App Services supports four levels of authentication, but only one of them is used when checking a registered user's permissions. The other three levels are useful for authenticating other application or web clients that require higher-level access to your App Services application or organization. Because the scope of access that the other authentication levels provide is so broad (and as a result, so powerful), it's a bad practice to use them from a mobile app. Instead, they're better suited to other client apps, such as web applications.
+
+## Configuring authentication levels
+Access permissions can only be configured for the 'application user' – this can be done both programmatically and in the admin portal. The application, organization and admin clients cannot be configured, and can only be accessed programmatically via the API.
+
+For more about creating and managing roles and permissions for application users, see Managing access by defining permission rules. For a look at how security features fit together, see App Security Overview.
+
+## User authentication level
+
+<table class="usergrid-table">
+<tr>
+    <th>Authentication Level</th>
+    <th>Description</th>
+</tr>
+<tr>
+    <td>Application user</td>
+    <td>This is the standard authentication type you will use to implement user login for your app. The application user level allows access to your App Services application as governed by the permission rules you create and associated with users and user groups. For more on setting permissions see Managing access by defining permission rules. Each Application User is represented by a User entity in your App Services application. For more about the User entity, see User.</td>
+</tr>
+</table>
+
+## Admin authentication levels
+
+<div class="admonition warning"> <p class="first admonition-title">WARNING</p> <p class="last">

+Warning: Safe use of admin authentication levels. Never use client ID and client secret, or any hard-coded credentials to authenticate this way from a client-side app, such as a mobile app. A hacker could analyze your app and extract the credentials for malicious use even if those credentials are compiled and in binary format. Even when authenticating with username and password, be cautious when using these authentication levels since they grant broad access to your App Services account. See "safe mobile access" in Authenticating API requests for additional considerations in keeping access to your app and its data secure.</p></div>
+
+<table class="usergrid-table">
+<tr>
+    <th>Authentication Level</th>
+    <th>Description</th>
+</tr>
+<tr>
+   <td>Application client</td>
+   <td>Grants full access to perform any operation on an App Services application (but not other applications within the same organization).
+        
+   <p>Authentication at this level is useful in a server-side application (not a mobile app) that needs access to resources through the App Services API. For example, imagine you created a website that lists every hiking trail in the Rocky Mountains. You would want anyone to be able to view the content, but would not want them to access the App Services API and all your data directly. Instead, you would authenticate as an application client in your server-side code to access the data via the API in order to serve it to your website's visitors.</p></td>
+</tr>
+<tr>
+   <td>Organization client</td>
+   <td>Grants full access to perform any operation on an App Services organization.
+        
+   <p>This authentication level provides the greatest amount of access to an individual organization, allowing a client to perform any operation on an App Services organization and any applications in that organization. This level of access should be used sparingly and carefully.</p></td>
+</tr>
+<tr>
+   <td>Admin user</td>
+   <td>Allows full access to perform any operation on all organization accounts of which the admin user is a member.
+        
+   <p>This authentication level is useful from applications that provide organization-wide administration features. For example, the App Services admin portal uses this level of access because it requires full access to the administration features.</p>
+        
+   Unless you have a specific need for administrative features, such as to run test scripts that require access to management functionality, you should not use the admin user authentication level.</td>
+</tr>
+</table>
+
+
+
+
+	
+
+
+	
+
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/security-and-auth/using-permissions.md
----------------------------------------------------------------------
diff --git a/docs/security-and-auth/using-permissions.md b/docs/security-and-auth/using-permissions.md
new file mode 100644
index 0000000..092d987
--- /dev/null
+++ b/docs/security-and-auth/using-permissions.md
@@ -0,0 +1,115 @@
+# Using permissions
+
+Permissions allow you to define user access to perform GET, POST, PUT, or DELETE operations on specific resources. When the user submits a request via your app code to the API BaaS API, the user’s permissions are checked against the resource paths that the user is trying to access. The request succeeds only if access to the resource is allowed by the permission rules you specify.
+
+## Permissions syntax
+In API BaaS, permissions are represented in the following format:
+
+    <operations>:<resource_path>
+    
+* ``<operations>``: A comma-delimited set of HTTP methods (``GET``, ``PUT``, ``POST``, ``DELETE``) that are allowed for the specified resource path. For example, ``get``, ``post`` would allow only ``GET`` and ``POST`` requests to be made to the specified resource.
+* ``<resource_path>``: The path to the resources to be accessed. For example, ``/users`` would apply the permission to the users collection, while ``/users/Tom`` would apply the permission to only the user entity with username 'Tom'.
+
+## Complex paths
+Complex paths can be defined using [Apache Ant pattern syntax](http://ant.apache.org/manual/dirtasks.html#patterns). The following special path variables are supported for the construction of complex paths:
+
+<table>
+<tr>
+   <td>Parameter</td>
+   <td>Description</td>
+</tr>
+<tr>
+   <td>*</td>
+   <td>Treated as a wildcard. Assigns the permission to all paths at the specified level in the path hierarchy. For example, ``/*`` would match any collection, while ``/users/Tom/*`` would match /users/Tom/likes and ``/users/Tom/owns``.</td>
+</tr>
+<tr>
+   <td>**</td>
+   <td>Assigns the permission to the path recursively. For example, ``**/likes`` would match ``/likes`` and ``/users/likes``, while ``/users/**`` would match ``/users`` and ``/users/likes``.</td>
+</tr>
+<tr>
+   <td>\${user}</td>
+   <td>Automatically sets the path segment to the UUID of the currently authenticated user. For example, if you sent a request with a valid access token for a user with UUID ``bd397ea1-a71c-3249-8a4c-62fd53c78ce7``, the path ``/users/${user}`` would be interpreted as ``/users/bd397ea1-a71c-3249-8a4c-62fd53c78ce7``, assigning the permission only to that user entity.</td>
+</tr>
+</table>
+
+## Assigning permissions
+Permissions can only be assigned to user, group or role entities. Assigning permissions to roles can be particularly useful, as it allows you to create sets of permissions that represent complex access definitions, which can then be assigned to user and group entities. For more on roles, see Using roles.
+       
+### Request syntax
+
+    curl -X POST https://api.usergrid.com/<org>/<app>/<collection>/<entity>/permissions -d '{"permission":<permissions>}'
+    
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or organization name
+app	        Application UUID or application name
+collection	The collection of the entity that the permissions are to be assigned to. 
+entity	    The UUID of the entity to assign the permissions to. For users, username and for groups, name are also accepted.
+permissions	The permissions to assign to the entity. See Permissions syntax for format.
+
+For collections, Valid values are users and groups.
+
+### Example request
+For example, the following cURL request would give the user 'Tom' POST permission to the /users collection:
+
+    curl -X POST https://api.usergrid.com/your-org/your-app/users/Tom/permissions -d '{"permission":"post:/users"}'
+    
+### Example response
+The newly assigned permission is returned in the data property of the response:
+
+		{
+		  "action" : "post",
+		  "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+		  "params" : { },
+		  "uri" : "https://api.usergrid.com/your-org/your-app",
+		  "entities" : [ ],
+		  "data" : [ "post:/users" ],
+		  "timestamp" : 1402349612382,
+		  "duration" : 19,
+		  "organization" : "your-org",
+		  "applicationName" : "your-app"
+		}
+		
+
+## Removing permissions
+Using a DELETE request, you can remove one of more permissions from a user, group, or role entity.
+
+### Request syntax
+
+    curl -X DELETE https://api.usergrid.com/<org>/<app>/<collection>/<entity>/permissions?=<permissions>
+    
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or organization name
+app	        Application UUID or application name
+collection	The collection of the entity that the permissions are to be assigned to. Valid values are users and groups.
+entity	    The UUID of the entity to assign the permissions to. For users, username and for groups, name are also accepted.
+permissions	The permissions to assign to the entity. See [Permissions syntax](using-permissions.html) for format.
+
+
+### Example request
+
+    curl -X DELETE https://api.usergrid.com/your-org/your-app/users/Tom/permissions?permission=post:/users
+    
+### Example response
+The deleted permission is returned in the params.permission property of the response:
+
+    {
+      "action" : "delete",
+      "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+      "params" : {
+        "permission" : [ "post:/users" ]
+      },
+      "uri" : "https://api.usergrid.com/your-org/your-app",
+      "entities" : [ ],
+      "data" : [ "post:/assets" ],
+      "timestamp" : 1402349951530,
+      "duration" : 20,
+      "organization" : "your-org",
+      "applicationName" : "your-app"
+    }		
+	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/src/main/resources/operation.mustache
----------------------------------------------------------------------
diff --git a/docs/src/main/resources/operation.mustache b/docs/src/main/resources/operation.mustache
index d19ec70..cce0524 100644
--- a/docs/src/main/resources/operation.mustache
+++ b/docs/src/main/resources/operation.mustache
@@ -6,7 +6,7 @@
 <h3>Parameters</h3>
 
 {{#parameters}}
-* __{{name}}__ ({{#type}}({{type}}){{/type}}{{#schemaRef}}[{{schemaRef}}](#{{schemaAnchor}}){{/schemaRef}})
+* __{{name}}__ ({{#type}}{{type}}{{/type}}{{#schemaRef}}[{{schemaRef}}](#{{schemaAnchor}}){{/schemaRef}})
 {{description}} (Specified in {{in}}).
 {{/parameters}}
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/961a38f4/docs/user-management/tbd.md
----------------------------------------------------------------------
diff --git a/docs/user-management/tbd.md b/docs/user-management/tbd.md
new file mode 100644
index 0000000..f65681d
--- /dev/null
+++ b/docs/user-management/tbd.md
@@ -0,0 +1 @@
+# Coming soon...
\ No newline at end of file