usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timangl...@apache.org
Subject svn commit: r1543106 [9/23] - in /incubator/usergrid/site: ./ content/ content/bootstrap/ content/community/ content/css/ content/docs/ content/font/ content/img/ content/img/check_flat/ content/js/ content/static/ layouts/ lib/ lib/helpers/ publish/ p...
Date Mon, 18 Nov 2013 18:51:22 GMT
Added: incubator/usergrid/site/content/docs/group.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/group.md?rev=1543106&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/group.md (added)
+++ incubator/usergrid/site/content/docs/group.md Mon Nov 18 18:51:18 2013
@@ -0,0 +1,936 @@
+---
+title: Group
+category: docs
+layout: docs
+---
+
+Group
+=====
+
+A group entity organizes users into a group. Using Apache Usergrid APIs you
+can create, retrieve, update, or delete a group. You can also add or
+delete a user to or from a group.
+
+See [Group entity properties](#group_properties) for a list of the
+system-defined properties for group entities. In addition, you can
+create group properties specific to your application.
+
+**Note:** Although not shown in the API examples below, you need to
+provide a valid access token with each API call. See [Authenticating
+users and application
+clients](/authenticating-users-and-application-clients) for details.
+
+Creating a new group
+--------------------
+
+Use the POST method to create a new group. Groups use paths to indicate
+their unique names. This allows you to create group hierarchies by using
+slashes. For this reason, you need to specify a path property for a new
+group.
+
+### Request URI
+
+POST /{org\_id}/{app\_id}/groups
+
+### Parameters
+
+  Parameter                 Description
+  ------------------------- ----------------------------------------
+  arg uuid|string org\_id   Organization UUID or organization name
+  arg uuid|string app\_id   Application UUID or application name
+
+### Example - Request
+
+-   [cURL](#curl_create_group)
+-   [JavaScript (HTML5)](#javascript_create_group)
+-   [Ruby](#ruby_create_group)
+-   [Node.js](#nodejs_create_group)
+
+<!-- -->
+
+    curl -X POST "https://api.usergrid.com/my-org/my-app/groups" -d '{"path":"mynewgroup"}'
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+    var options = {
+        method:'POST',
+        endpoint:'groups',
+        body:{ path:'mynewgroup' }
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+The example assumes use of the [Ruby
+SDK](https://github.com/scottganyo/usergrid_iron).
+
+    app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
+    app['groups'].post path: 'mynewgroup'
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+    var options = {
+        method:'POST',
+        endpoint:'groups',
+        body:{ path:'mynewgroup' }
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+### Example - Response
+
+    {
+    "action": "post",
+    "application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
+    "params": {},
+    "path": "/groups",
+    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/groups",
+
+    "entities": [
+        {
+          "uuid": "a668717b-67cb-11e1-8223-12313d14bde7",
+          "type": "group",
+          "created": 1331066016571,
+          "modified": 1331066016571,
+          "metadata": {
+            "path": "/groups/a668717b-67cb-11e1-8223-12313d14bde7",
+            "sets": {
+              "rolenames": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/rolenames",
+              "permissions": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/permissions"
+            },
+            "collections": {
+              "activities": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/activities",
+              "feed": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/feed",
+              "roles": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/roles",
+              "users": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users"
+            }
+          },
+          "path": "mynewgroup"
+        }
+     ],
+    "timestamp": 1331066016563,
+    "duration": 35,
+    "organization" : "my-org",
+    "applicationName": "my-app"
+    }
+
+Adding a user to a group
+------------------------
+
+Use the POST method to add a user to a group. If the named group does
+not yet exist, an error message is returned.
+
+### Request URI
+
+POST /{org\_id}/{app\_id}/groups/{uuid|groupname}/users/{uuid|username}
+
+### Parameters
+
+  Parameter                   Description
+  --------------------------- ----------------------------------------
+  arg uuid|string org\_id     Organization UUID or organization name
+  arg uuid|string app\_id     Application UUID or application name
+  arg uuid|string groupname   UUID or name of the group
+  arg uuid|string username    UUID or username of user
+
+### Example - Request
+
+-   [cURL](#curl_add_user)
+-   [JavaScript (HTML5)](#javascript_add_user)
+-   [Ruby](#ruby_add_user)
+-   [Node.js](#nodejs_add_user)
+
+<!-- -->
+
+    curl -X POST "https://api.usergrid.com/my-org/my-app/groups/mynewgroup/users/john.doe"
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+    var options = {
+        method:'POST',
+        endpoint:'groups/mynewgroup/users/john.doe'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+The example assumes use of the [Ruby
+SDK](https://github.com/scottganyo/usergrid_iron).
+
+    app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
+    app['groups/mynewgroup/users/john.doe'].post nil
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+    var options = {
+        method:'POST',
+        endpoint:'groups/mynewgroup/users/john.doe'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+### Example - Response
+
+    {
+    "action": "post",
+    "application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
+    "params": {},
+    "path": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users",
+    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/groups/a668717b-67cb-11e1-8223-12313d14bde7/users",
+
+    "entities": [
+          {
+            "uuid": "6fbc8157-4786-11e1-b2bd-22000a1c4e22",
+            "type": "user",
+            "nanme": "John Doe",
+            "created": 1327517852364015,
+            "modified": 1327517852364015,
+            "activated": true,
+            "email": "john.doe@mail.com",
+            "metadata": {
+              "connecting": {
+                "owners":   "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/connecting/owners"
+                 },
+              "path": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22",
+              "sets": {
+                "rolenames": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/rolenames",
+                "permissions": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/permissions"
+                 },
+              "collections": {
+                "activities": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/activities",
+                "devices": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/devices",
+                "feed": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/feed",
+                "groups": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/groups",
+                "roles": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/roles",
+                "following": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/following",
+                "followers": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/followers"
+                 }
+            },
+            "picture": "https://www.gravatar.com/avatar/90f823ba15655b8cc8e3b4d63377576f",
+            "username": "john.doe"
+          }
+       ],
+       "timestamp": 1331066031380,
+       "duration": 64,
+       "organization" : "my-org",
+       "applicationName": "my-app"
+    }
+
+Getting a group
+---------------
+
+Use the GET method to retrieve a group.
+
+### Request URI
+
+GET /{org\_id}/{app\_id}/groups/{uuid|groupname}
+
+### Parameters
+
+  Parameter                   Description
+  --------------------------- ----------------------------------------
+  arg uuid|string org\_id     Organization UUID or organization name
+  arg uuid|string app\_id     Application UUID or application name
+  arg uuid|string groupname   UUID or name of the group
+
+### Example - Request
+
+-   [cURL](#curl_get_group)
+-   [JavaScript (HTML5)](#javascript_get_group)
+-   [Ruby](#ruby_get_group)
+-   [Node.js](#nodejs_get_group)
+
+<!-- -->
+
+    curl -X GET "https://api.usergrid.com/my-org/my-app/groups/mynewgroup"
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+    var options = {
+        method:'GET',
+        endpoint:'groups/mynewgroup'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+The example assumes use of the [Ruby
+SDK](https://github.com/scottganyo/usergrid_iron).
+
+    app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
+    user = app['mynewgroup'].entity
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+    var options = {
+        method:'GET',
+        endpoint:'groups/mynewgroup'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+### Example - Response
+
+    {
+    "action": "get",
+    "application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
+    "params": {
+          "_": [
+            "1331066049869"
+          ]
+    },
+    "path": "/groups",
+    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/groups",
+
+    "entities": [
+        {
+          "uuid": "a668717b-67cb-11e1-8223-12313d14bde7",
+          "type": "group",
+          "created": 1331066016571,
+          "modified": 1331066016571,
+          "metadata": {
+            "path": "/groups/a668717b-67cb-11e1-8223-12313d14bde7",
+            "sets": {
+              "rolenames": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/rolenames",
+              "permissions": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/permissions"
+            },
+            "collections": {
+              "activities": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/activities",
+              "feed": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/feed",
+              "roles": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/roles",
+              "users": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users"
+            }
+          },
+          "path": "mynewgroup"
+        }
+    ],
+    "timestamp": 1331066050106,
+    "duration": 18,
+    "organization" : "my-org",
+    "applicationName": "my-app"
+    }
+
+Updating a group
+----------------
+
+Use the PUT method to update a group.
+
+### Request URI
+
+PUT /{org\_id}{app\_id}/groups/{uuid|groupname} {request body}
+
+### Parameters
+
+  Parameter                   Description
+  --------------------------- ----------------------------------------
+  arg uuid|string org\_id     Organization UUID or organization name
+  arg uuid|string app\_id     Application UUID or application name
+  arg uuid|string groupname   UUID or name of the group
+  request body                Set of entity properties
+
+### Example - Request
+
+-   [cURL](#curl_update_group)
+-   [JavaScript (HTML5)](#javascript_update_group)
+-   [Ruby](#ruby_update_group)
+-   [Node.js](#nodejs_update_group)
+
+<!-- -->
+
+    curl -X PUT "https://api.usergrid.com/my-org/my-app/groups/mynewgroup" -d '("foo":"bar"}'
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+    var options = {
+        method:'PUT',
+        endpoint:'groups/mynewgroup',
+        body:{ foo:'bar' }
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+The example assumes use of the [Ruby
+SDK](https://github.com/scottganyo/usergrid_iron).
+
+    app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
+    mynewgroup = app['groups/mynewgroup'].put foo: 'bar'
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+    var options = {
+        method:'PUT',
+        endpoint:'groups/mynewgroup',
+        body:{ foo:'bar' }
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+### Example - Response
+
+    {
+    "action": "put",
+    "application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
+    "params": {},
+    "path": "/groups",
+    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/groups",
+
+    "entities": [
+        {
+          "uuid": "a668717b-67cb-11e1-8223-12313d14bde7",
+          "type": "group",
+          "created": 1331066016571,
+          "modified": 1331066092191,
+          "foo": "bar",
+          "metadata": {
+            "path": "/groups/a668717b-67cb-11e1-8223-12313d14bde7",
+            "sets": {
+              "rolenames": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/rolenames",
+              "permissions": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/permissions"
+            },
+            "collections": {
+              "activities": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/activities",
+              "feed": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/feed",
+              "roles": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/roles",
+              "users": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users"
+            }
+          },
+          "path": "mynewgroup"
+        }
+    ],
+    "timestamp": 1331066092178,
+    "duration": 31,
+    "organization" : "my-org",
+    "applicationName": "my-app"
+    }
+
+Deleting a user from a group
+----------------------------
+
+Use the DELETE method to delete a user from the specified group.
+
+### Request URI
+
+DELETE
+/{org\_id}/{app\_id}/groups/{uuid|groupname}/users/{uuid|username}
+
+### Parameters
+
+  Parameter                   Description
+  --------------------------- ----------------------------------------
+  arg uuid|string org\_id     Organization UUID or organization name
+  arg uuid|string app\_id     Application UUID or application name
+  arg uuid|string groupname   UUID or name of the group
+  arg uuid|string username    UUID or username of user to be deleted
+
+### cURL Example - Request
+
+-   [cURL](#curl_delete_user_group)
+-   [JavaScript (HTML5)](#javascript_delete_user_group)
+-   [Ruby](#ruby_delete_user_group)
+-   [Node.js](#nodejs_delete_user_group)
+
+<!-- -->
+
+    curl -X DELETE "https://api.usergrid.com//my-org/my-app/groups/mynewgroup/users/john.doe"
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+    var options = {
+        method:'DELETE',
+        endpoint:'groups/mynewgroup/users/john.doe'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+The example assumes use of the [Ruby
+SDK](https://github.com/scottganyo/usergrid_iron).
+
+    app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
+    app['groups/mynewgroup/users/john.doe'].delete
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+    var options = {
+        method:'DELETE',
+        endpoint:'groups/mynewgroup/users/john.doe'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+### Example - Response
+
+    {
+    "action": "delete",
+    "application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
+    "params": {
+          "_": [
+            "1331066118009"
+          ]
+    },
+    "path": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users",
+    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/groups/a668717b-67cb-11e1-8223-12313d14bde7/users",
+
+    "entities": [
+          {
+            "uuid": "6fbc8157-4786-11e1-b2bd-22000a1c4e22",
+            "type": "user",
+            "name": "John Doe",
+            "created": 1327517852364015,
+            "modified": 1327517852364015,
+            "activated": true,
+            "email": "john.doe@mail.com",
+            "metadata": {
+              "connecting": {
+                "owners": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/connecting/owners"
+              },
+              "path": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22",
+              "sets": {
+                "rolenames": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/rolenames",
+                "permissions": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/permissions"
+              },
+              "collections": {
+                "activities": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/activities",
+                "devices": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/devices",
+                "feed": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/feed",
+                "groups": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/groups",
+                "roles": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/roles",
+                "following": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/following",
+                "followers": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users/6fbc8157-4786-11e1-b2bd-22000a1c4e22/followers"
+              }
+            },
+            "picture": "https://www.gravatar.com/avatar/90f823ba15655b8cc8e3b4d63377576f",
+            "username": "john.doe"
+          }
+    ],
+    "timestamp": 1331066118193,
+    "duration": 236,
+    "organization" : "my-org",
+    "applicationName": "my-app"
+    }
+
+Deleting a group
+----------------
+
+Use the DELETE method to delete a group.
+
+### Request URI
+
+DELETE /{org\_id}/{app\_id}/groups/{uuid|groupname}
+
+### Parameters
+
+  Parameter                   Description
+  --------------------------- ----------------------------------------
+  arg uuid|string org\_id     Organization UUID or organization name
+  arg uuid|string app\_id     Application UUID or application name
+  arg uuid|string groupname   UUID or name of the group
+
+### Example - Request
+
+-   [cURL](#curl_delete_group)
+-   [JavaScript (HTML5)](#javascript_delete_group)
+-   [Ruby](#ruby_delete_group)
+-   [Node.js](#nodejs_delete_group)
+
+<!-- -->
+
+    curl -X DELETE "https://api.usergrid.com//my-org/my-app/groups/mynewgroup"
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+    var options = {
+        method:'DELETE',
+        endpoint:'groups/mynewgroup'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+The example assumes use of the [Ruby
+SDK](https://github.com/scottganyo/usergrid_iron).
+
+    app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
+    app['groups/mynewgroup'].delete
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+    var options = {
+        method:'DELETE',
+        endpoint:'groups/mynewgroup'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+### Example - Response
+
+    {
+    "action": "delete",
+    "application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
+    "params": {
+        "_": [
+          "1331066144280"
+        ]
+    },
+    "path": "/groups",
+    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/groups",
+
+    "entities": [
+        {
+          "uuid": "a668717b-67cb-11e1-8223-12313d14bde7",
+          "type": "group",
+          "created": 1331066016571,
+          "modified": 1331066092191,
+          "foo": "bar",
+          "metadata": {
+            "path": "/groups/a668717b-67cb-11e1-8223-12313d14bde7",
+            "sets": {
+              "rolenames": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/rolenames",
+              "permissions": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/permissions"
+            },
+            "collections": {
+              "activities": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/activities",
+              "feed": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/feed",
+              "roles": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/roles",
+              "users": "/groups/a668717b-67cb-11e1-8223-12313d14bde7/users"
+            }
+          },
+          "path": "mynewgroup"
+        }
+    ],
+    "timestamp": 1331066144462,
+    "duration": 302,
+    "organization" : "my-org",
+    "applicationName": "my-app"
+    }
+
+Getting a group’s feed
+----------------------
+
+Use the GET method to retrieve the feed for a group. This gets a list of
+all the activities that have been posted to this group, that is, the
+activities for which this group has a relationship (owns).
+
+### Request URI
+
+GET /{org\_id}/{app\_id}/groups/{uuid|groupname}/feed
+
+### Parameters
+
+  Parameter                   Description
+  --------------------------- ----------------------------------------
+  arg uuid|string org\_id     Organization UUID or organization name
+  arg uuid|string app\_id     Application UUID or application name
+  arg uuid|string groupname   UUID or name of the group
+
+### Example - Request
+
+-   [cURL](#curl_get_group_feed)
+-   [JavaScript (HTML5)](#javascript_get_group_feed)
+-   [Ruby](#ruby_get_group_feed)
+-   [Node.js](#nodejs_get_group_feed)
+
+<!-- -->
+
+    curl -X GET "https://api.usergrid.com/my-org/my-app/groups/mygroup/feed"
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+    var options = {
+        method:'GET',
+        endpoint:'groups/mygroup/feed'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+The example assumes use of the [Ruby
+SDK](https://github.com/scottganyo/usergrid_iron).
+
+    app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
+    activities = app['groups/mygroup/feed'].collection
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+    var options = {
+        method:'GET',
+        endpoint:'groups/mygroup/feed'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+### Example - Response
+
+    {
+        "action": "get",
+        "application": "3400ba10-cd0c-11e1-bcf7-12313d1c4491",
+        "params":  {},
+        "path": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed",
+        "uri": "https://api.usergrid.com/my-org/my-app/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed",
+        "entities":  [
+           {
+            "uuid": "563f5d96-37f3-11e2-a0f7-02e81ae640dc",
+            "type": "activity",
+            "created": 1353952903811,
+            "modified": 1353952903811,
+            "actor":  {
+              "displayName": "John Doe",
+              "image":  {
+                "duration": 0,
+                "height": 80,
+                "url": "http://www.gravatar.com/avatar/",
+                "width": 80
+              },
+              "uuid": "1f3567aa-da83-11e1-afad-12313b01d5c1",
+              "email": "john.doe@gmail.com",
+            "username": "john.doe"
+            },
+            "content": "Hello World!",
+            "metadata":  {
+              "cursor": "gGkAAQMAgGkABgE7PeHCgwCAdQAQVj9dljfzEeKg9wLoGuZA3ACAdQAQVkVRCTfzEeKg9wLoGuZA3AA",
+              "path": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed/563f5d96-37f3-11e2-a0f7-02e81ae640dc"
+            },
+            "published": 1353952903811,
+            "verb": "post"
+          }
+        ],
+      "timestamp": 1353953272756,
+      "duration": 29,
+      "organization": "my-org",
+      "applicationName": "my-app"
+
+Getting all users in a group
+----------------------------
+
+Use the GET method to retrieve all the users in a group.
+
+### Request URI
+
+GET /{org\_id}/{app\_id}/groups/{uuid|groupname}/users
+
+### Parameters
+
+  Parameter                   Description
+  --------------------------- ----------------------------------------
+  arg uuid|string org\_id     Organization UUID or organization name
+  arg uuid|string app\_id     Application UUID or application name
+  arg uuid|string groupname   UUID or name of the group
+
+### Example - Request
+
+-   [cURL](#curl_get_group_users)
+-   [JavaScript (HTML5)](#javascript_get_group_users)
+-   [Ruby](#ruby_get_group_users)
+-   [Node.js](#nodejs_get_group_users)
+
+<!-- -->
+
+    curl -X GET "https://api.usergrid.com/my-org/my-app/groups/mygroup/users"
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+    var options = {
+        method:'GET',
+        endpoint:'groups/mygroup/users'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+The example assumes use of the [Ruby
+SDK](https://github.com/scottganyo/usergrid_iron).
+
+    app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
+    activities = app['groups/mygroup/users'].collection
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+    var options = {
+        method:'GET',
+        endpoint:'groups/mygroup/users'
+    };
+    client.request(options, function (err, data) {
+        if (err) {
+            //error
+        } else {
+            //success - data will contain raw results from API call
+        }
+    });
+
+### Example - Response
+
+    {
+      "action" : "get",
+      "application" : "e7127751-6985-11e2-8078-02e81aeb2129",
+      "params" : { },
+      "path" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users",
+      "uri" : "http://api.usergrid.com/myorg/sandbox/groups/d20976ff-802f-11e2-b690-02e81ae61238/users",
+      "entities" : [ {
+        "uuid" : "cd789b00-698b-11e2-a6e3-02e81ae236e9",
+        "type" : "user",
+        "name" : "barney",
+        "created" : 1359405994314,
+        "modified" : 1361894320470,
+        "activated" : true,
+        "email" : "barney@apigee.com",
+        "metadata" : {
+          "path" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9",
+          "sets" : {
+            "rolenames" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/rolenames",
+            "permissions" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/permissions"
+          },
+          "collections" : {
+            "activities" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/activities",
+            "devices" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/devices",
+            "feed" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/feed",
+            "groups" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/groups",
+            "roles" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/roles",
+            "following" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/following",
+            "followers" : "/groups/d20976ff-802f-11e2-b690-02e81ae66238/users/cd789b00-698b-11e2-a6e3-02e81aeb26e9/followers"
+          }
+        },
+        "name" : "barney",
+        "picture" : "http://www.gravatar.com/avatar/00767101f6b4f2cf5d02ed510dbcf0b4",
+        "test" : "fred",
+        "username" : "barney"
+      } ],
+      "timestamp" : 1361903248398,
+      "duration" : 24,
+      "organization" : "myorg",
+      "applicationName" : "sandbox"
+    }
+
+Group properties
+----------------
+
+The following are the system-defined properties for group entities. The
+system-defined properties are reserved. You cannot use these names to
+create other properties for a group entity. In addition the groups name
+is reserved for the group collection — you can't use it to name another
+collection.
+
+The look-up properties for the entities of type group are UUID and path,
+that is, you can use the uuid or path property to reference a group in
+an API call. However, you can search on a group using any property of
+the group entity. See [Queries and parameters](/queries-and-parameters)
+for details on searching.
+
+### General properties
+
+Groups have the following general properties.
+
+  Property   Type     Description
+  ---------- -------- ---------------------------------------------------------------------------------
+  uuid       UUID     Group’s unique entity ID
+  type       string   Type of entity, in this case “user”
+  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
+  path       string   Valid slash-delimited group path (mandatory)
+  title      string   Display name
+
+### Set properties
+
+Groups have the following set properties.
+
+  Set           Type     Description
+  ------------- -------- ---------------------------------------
+  connections   string   Set of connection types (e.g., likes)
+  rolenames     string   Set of roles assigned to a group
+  credentials   string   Set of group credentials
+
+### Collections
+
+Groups have the following collections.
+
+  Collection   Type       Description
+  ------------ ---------- ------------------------------------------------------
+  users        user       Collection of users in the group
+  activities   activity   Collection of activities a user has performed
+  feed         activity   Inbox of activity notifications a group has received
+  roles        role       Set of roles to which a group belongs
+
+ 

Added: incubator/usergrid/site/content/docs/html-5-example-messagee.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/html-5-example-messagee.md?rev=1543106&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/html-5-example-messagee.md (added)
+++ incubator/usergrid/site/content/docs/html-5-example-messagee.md Mon Nov 18 18:51:18 2013
@@ -0,0 +1,192 @@
+---
+title: Messagee Example
+category: docs
+layout: docs
+---
+
+Messagee Example
+================
+
+*Messagee* is a simple Twitter-style messaging application that
+leverages the extensive functionality of App services. This section
+describes some of the features of Messagee.
+
+There are three client versions of Messagee:
+
+-   An [iOS client](#iOS_client)
+-   An [Android client](#android_client)
+-   An [HTML5 client](#html5_client)
+
+The sections below describe how to create a new app, enter some test
+users, and run the app. You also learn how to use the App services admin
+portal, a user interface that streamlines data and application
+management in the App services system. The portal is also a reference
+application that shows how to incorporate App services APIs with
+JavaScript. For a more detailed discussion of the portal's
+functionality, see [Admin portal](/admin-portal).
+
+Creating a user account in App services
+---------------------------------------
+
+Go to [https://apigee.com/usergrid/](https://apigee.com/usergrid/) to
+access the login screen for the App services admin portal. If you are
+new to App services, sign up for an account to access the portal,
+specifying an organization (e.g., the name of your company or project
+team) and a username and password that you can use to authenticate.
+Because App services are designed for use by development teams, the same
+username can be associated with one or more organizations.
+
+If you create a new account, you receive a confirmation email that
+contains a URL that you must click to activate the account. After this,
+simply log in to the portal with your username and password.
+
+![](/docs/sites/docs/files/styles/large/public/login.png?itok=ws5DhLDI)
+
+Creating an app and users
+-------------------------
+
+When you have logged in, you need to create a new application.
+
+![](/docs/sites/docs/files/styles/large/public/portal-1.png?itok=4o63Ia-y)
+
+1.  2.  Enter a unique application name. The name must be unique to
+    avoid a conflict with another user running the same application.
+
+    ![](/docs/sites/docs/files/styles/large/public/portal-2.png?itok=yz8QznI7)
+
+3.  4.  Make sure that the portal shows the application name you entered
+    as the active application beneath the Applications menu **(1)**.
+
+    If the correct name is not displayed, click the menu and select your
+    application.
+
+    Next, you need to populate a test user *user-test-1* that is going
+    to log in to your copy of the server-side Messagee app.
+
+5.  6.  Click the Users box on the left side of the console **(2)**.
+
+    ![](/docs/sites/docs/files/styles/large/public/portal-3.png?itok=ncRlqPGQ)
+
+7.  8.  Click the Add button and enter the user information for your
+    application in the pop-up window (be sure to create a password you
+    can remember), and then click the Create button. Repeat these steps
+    to create a second username *test-user-2*.
+
+    ![](/docs/sites/docs/files/styles/large/public/portal-4.png?itok=X_kKe5Ke)
+
+9.  
+
+When you have finished all these steps, you have a new application and
+two new users.
+
+![](/docs/sites/docs/files/styles/large/public/portal-5.png?itok=jSmAcwc3)
+
+Now that you have created a uniquely named copy of the Messagee
+application as well as two user accounts (*test-user-1* and
+*test-user-2*), you are ready to test out the Messagee app. Use
+test-user-1 to log in to the app, and test-user-2 as the user to follow.
+
+To continue with the example, follow the instructions for a client app
+([iOS client](#iOS_client), [Android client](#android_client), or [HTML5
+client](#html5_client)).
+
+iOS client
+----------
+
+Messagee is available as an iPhone app that uses Apache Usergrid and
+RestKit. The source for the iOS version of Messagee is available in the
+/samples/messagee directory of the [Apache Usergrid iOS SDK](#ios_sdk)
+
+Here are the steps to run the Messagee app on iOS:
+
+1.  2.  Run Steps 1-6 under [Creating an app and users](#app_user).
+
+    These steps create a unique instance of the Messagee app on the
+    server and two test users, *test-user-1* and *test-user-2*.
+
+3.  4.  Access the Messagee server app by typing a URL similar to the
+    following into your iOS mobile client (replace \<Messagee\> with the
+    unique name of your application):
+
+    [https://api.usergrid.com](https://api.usergrid.com)/\<Messagee\>/index.html
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-1-chooseapp.jpg?itok=NSQcdJrj)
+
+5.  6.  On the mobile client, complete the registration information and
+    click Register.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-2-register.jpg?itok=Xzqe7mXV)
+
+7.  8.  Log in to the Messagee app by entering the *test-user-1* account
+    information created previously, and click the Sign in button.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-4-signin.jpg?itok=0M9QYU7b)
+
+    At this point, the message board is empty:
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-5-emptyfeed.jpg?itok=EWcUVMQN)
+
+9.  10. To post a message using the app, click the top-right icon in the
+    message board to create a message, write the message text, and send
+    it by clicking Post.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-6-newmsg.jpg?itok=Wj16l_5V)
+
+    **Note:** The posted message should appear in the message board
+    within few seconds.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-7-feed1msg.jpg?itok=RclSnHuU)
+
+    For your instance of the Messagee application to act like Twitter,
+    you need to "follow" another user.
+
+11. 12. In the message board, click Add People and add *test-user-2* as
+    a person that *test-user-1* follows.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-9-follow.jpg?itok=yJeaYnEj)
+
+13. 14. Log in as *test-user-2* and post a message as this user to the
+    message board.
+15. 16. Go back and log in as user *test-user-1*.
+
+    Because *test-user-1* follows *test-user-2*, you should see the
+    message sent by *test-user-2* in the message board.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-10-seeusermsg.jpg?itok=Wcd7avBh)
+
+17. 
+
+iOS SDK
+-------
+
+If you want to write iOS applications that connect to App services,
+[download the Apache Usergrid iOS
+SDK](http://www.apigee.com/docs/content/ios-sdk-redirect)
+
+**Note:** The Messagee iOS application uses RestKit, a popular REST
+framework for iOS, to communicate with App services. Because App
+services use a REST API, you can use any REST framework to talk with the
+service. However, the official App services iOS SDK provides a more
+convenient communication mechanism that you should use unless you're
+already using RestKit or some other framework in your project.
+
+Android client and SDK
+----------------------
+
+Messagee is available as a sample Android app that acts as a App
+services client. The source for the Android version is packaged with the
+Apache Usergrid Android SDK in the /samples/messagee directory.
+
+[Download the Apache Usergrid Android
+SDK](http://www.apigee.com/docs/content/android-sdk-redirect).
+
+Javascript/HTML5 client and SDK
+-------------------------------
+
+Messagee is also available as a sample HTML5 app that behaves in much
+the same way as the two previous examples. The source for the HTML5
+version is packaged with the Apache Usergrid Javascript/HTML5 SDK in the
+/samples/messagee directory.
+
+[Download the Apache Usergrid Javascript/HTML5
+SDK](http://www.apigee.com/docs/content/javascript-sdk-redirect).

Added: incubator/usergrid/site/content/docs/html5-javascript-sdk.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/html5-javascript-sdk.md?rev=1543106&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/html5-javascript-sdk.md (added)
+++ incubator/usergrid/site/content/docs/html5-javascript-sdk.md Mon Nov 18 18:51:18 2013
@@ -0,0 +1,5 @@
+---
+title: HTML5 / JavaScript SDK
+category: docs
+layout: docs
+---
\ No newline at end of file

Added: incubator/usergrid/site/content/docs/index.html
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/index.html?rev=1543106&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/index.html (added)
+++ incubator/usergrid/site/content/docs/index.html Mon Nov 18 18:51:18 2013
@@ -0,0 +1,88 @@
+---
+title: Overview
+---
+
+<p>Usergrid is an open-source Backend-as-a-Service (“BaaS” or “mBaaS”) composed of an integrated distributed NoSQL database, application layer and client tier with SDKs for developers looking to rapidly build web and/or mobile applications. It provides elementary services (user registration & management, data storage, file storage, queues) and retrieval features (full text search, geolocation search, joins) to power common app features.</p>
+
+<p>It is a multi-tenant system designed for deployment to public cloud environments (such as Amazon Web Services, Rackspace, etc.) or to run on traditional server infrastructures so that anyone can run their own private BaaS deployment.</p>
+
+<p>For architects and back-end teams, it aims to provide a distributed, easily extendable, operationally predictable and highly scalable solution. For front-end developers, it aims to simplify the development process by enabling them to rapidly build and operate mobile and web applications without requiring backend expertise.</p>
+
+</div>
+
+<hr>
+
+<div id="team-memebers">
+<h3>Members</h3>
+<table class="table table-striped">
+    <thead>
+        <tr>
+            <th>Id</th>
+            <th>Name</th>
+            <th>Email</th>
+            <th>Organization</th>
+            <th>Roles</th>
+        </tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td>akarasulu</td>
+            <td>Alex Karasulu</td>
+            <td>akarasulu@apache.org</td>
+            <td>-</td>
+            <td>-8</td>
+        </tr>
+        <tr>
+            <td>akarasulu</td>
+            <td>Alex Karasulu</td>
+            <td>akarasulu@apache.org</td>
+            <td>-</td>
+            <td>-8</td>
+        </tr>
+        <tr>
+            <td>akarasulu</td>
+            <td>Alex Karasulu</td>
+            <td>akarasulu@apache.org</td>
+            <td>-</td>
+            <td>-8</td>
+        </tr>
+    </tbody>
+</table>
+</div>
+
+<div id="team-contributors">
+<h3>Contributors</h3>
+<table class="table table-striped">
+    <thead>
+        <tr>
+            <th>Id</th>
+            <th>Name</th>
+            <th>Email</th>
+            <th>Organization</th>
+            <th>Roles</th>
+        </tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td>akarasulu</td>
+            <td>Alex Karasulu</td>
+            <td>akarasulu@apache.org</td>
+            <td>-</td>
+            <td>-8</td>
+        </tr>
+        <tr>
+            <td>akarasulu</td>
+            <td>Alex Karasulu</td>
+            <td>akarasulu@apache.org</td>
+            <td>-</td>
+            <td>-8</td>
+        </tr>
+        <tr>
+            <td>akarasulu</td>
+            <td>Alex Karasulu</td>
+            <td>akarasulu@apache.org</td>
+            <td>-</td>
+            <td>-8</td>
+        </tr>
+    </tbody>
+</table>
\ No newline at end of file

Added: incubator/usergrid/site/content/docs/managing-access-defining-permission-rules.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/managing-access-defining-permission-rules.md?rev=1543106&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/managing-access-defining-permission-rules.md (added)
+++ incubator/usergrid/site/content/docs/managing-access-defining-permission-rules.md Mon Nov 18 18:51:18 2013
@@ -0,0 +1,218 @@
+---
+title: Managing access by defining permission rules
+category: docs
+layout: docs
+---
+
+Managing access by defining permission rules
+============================================
+
+You control your app users' access to application resources by defining
+roles and permission rules. In your Apache Usergrid application, you assign
+application users a *role* that represents a set of permissions. Through
+these permissions, you allow users to perform certain operations (GET,
+POST, PUT, or DELETE) on specific resources. When the user submits a
+request via your app code to the Apache Usergrid 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.
+
+You specify roles for unauthenticated users and those who authenticate
+as an Application User, as defined in [Authenticating users and
+application clients](/authenticating-users-and-application-clients).
+Roles are not applied for the other authentication levels: Application,
+Admin User, and Organization. Access at these levels can't be restricted
+by roles and permission rules. You should allow clients to authenticate
+at these levels sparingly and carefully.
+
+Roles included by default
+-------------------------
+
+When defining user access to your application's data, you create roles,
+specify permission rules for them, then associate users with the roles.
+Apache Usergrid includes three predefined roles when you create an
+application.
+
+The following table lists the three roles included by default. Note that
+two of these are in effect and applied from the time your application is
+created (until you change them). Apache Usergrid applies the following
+default behavior:
+
+1.  An unauthenticated user is automatically added to the Guest role so
+    that they can register for a user account.
+2.  A user who has a user account and authenticates with it is
+    automatically added to the Default role. **Note that by default,
+    this role is very permissive.** Be sure to restrict it with specific
+    permission rules before deploying to production.
+
++-------------------------+-------------------------+-------------------------+
+| Role                    | Description             | Notes                   |
++=========================+=========================+=========================+
+| Guest                   | Default for             | Grants permission for a |
+|                         | unauthenticated users.  | user to create a user   |
+|                         | Includes a basic set of | account and for their   |
+|                         | permissions for         | device to be            |
+|                         | unregistered or         | registered. You can     |
+|                         | unauthenticated users.  | change permission rules |
+|                         | Users are automatically | based on your goals for |
+|                         | added to the Guest role | unregistered user       |
+|                         | before they’re          | access. This role is    |
+|                         | authenticated. After    | designed to provide     |
+|                         | they’re authenticated,  | access for people who   |
+|                         | users are automatically | haven't yet registered, |
+|                         | added to the Default    | and allow them to       |
+|                         | role.                   | register.               |
++-------------------------+-------------------------+-------------------------+
+| Default                 | Default for             | By default, **grants    |
+|                         | authenticated users.    | full access for all     |
+|                         | Includes permissions    | resources in your       |
+|                         | for the set of          | application**. A first  |
+|                         | operations you want an  | task in securing your   |
+|                         | authenticated user to   | application should be   |
+|                         | be able to perform.     | to restrict access by   |
+|                         | Users are added to this | redefining this role to |
+|                         | role after they're      | narrow the access it    |
+|                         | authenticated.          | provides. Remove the    |
+|                         |                         | default full permission |
+|                         |                         | rule and add            |
+|                         |                         | restrictive permission  |
+|                         |                         | rules for a production  |
+|                         |                         | deployment.             |
++-------------------------+-------------------------+-------------------------+
+| Administrator           | Unused until you        | Grants no access.       |
+|                         | associate it with users | Consider this a blank   |
+|                         | or groups. By default,  | slate. Add permission   |
+|                         | includes no permissions | rules and associate     |
+|                         | that provide access.    | this role with users    |
+|                         |                         | and groups as needed.   |
+|                         |                         |                         |
+|                         |                         | **Note**: The           |
+|                         |                         | Administrator role is   |
+|                         |                         | *not the same* as an    |
+|                         |                         | organization            |
+|                         |                         | administrator -- that   |
+|                         |                         | is, someone who         |
+|                         |                         | authenticates as an     |
+|                         |                         | Admin User. The Admin   |
+|                         |                         | User is an implicit     |
+|                         |                         | user created when you   |
+|                         |                         | create an organization. |
+|                         |                         | After authenticating,   |
+|                         |                         | the Admin User has full |
+|                         |                         | access to all of the    |
+|                         |                         | administration features |
+|                         |                         | of the Apache Usergrid     |
+|                         |                         | API. By comparison, the |
+|                         |                         | Administrator role is   |
+|                         |                         | simply a role           |
+|                         |                         | (initially without      |
+|                         |                         | permissions) that can   |
+|                         |                         | be assigned to any      |
+|                         |                         | user.                   |
++-------------------------+-------------------------+-------------------------+
+
+Defining your own roles and permissions
+---------------------------------------
+
+When preparing an application for production use, a good first step is
+to edit permission rules for the Default role. This role will be applied
+for every user who authenticates as an Application User.
+
+The admin portal is the best place to manage roles. While you can manage
+roles and permissions programmatically (see [Role](/role)),
+security-related calls from a mobile app will pose a security risk.
+Consider doing so only from a server-side web application.
+
+For easy-to-read examples, this section expresses permission rules in
+this way:
+
+    <operations>:<entity path pattern>
+
+-   \<operations\> is a comma-delimited set of REST operations
+    (GET, PUT, POST, DELETE) that are allowed for the specified entity
+    path.
+-   \<entity path pattern\> is a parameter evaluated using Apache Ant
+    pattern matching
+    (see [http://ant.apache.org/manual/dirtasks.html\#patterns](http://ant.apache.org/manual/dirtasks.html#patterns)).
+
+For example, in the Default role, first remove the permission rule that
+grants full access to all authenticated users. You could then begin by
+creating a rule that grants access for the authenticated user to makes
+changes only to data associated with their account. 
+
+    GET,PUT,POST,DELETE:/users/me/**
+
+Use the Admin Portal to make role and permission rule changes. On the
+left sidebar of the portal, click Users, then click Roles. This displays
+the roles defined for the application. To create a role, click the Add
+button (it looks like a person's silhouette). To delete a role, select
+the role you want to delete and click the Remove button (it looks like a
+trash can). To view the privileges in a role, click the role.
+
+Suppose you created a role named "customer". Here’s what the privileges
+for the role might look like:
+
+![](/docs/sites/docs/files/worker_permissions.png)
+
+Notice that specific privileges for operations are represented using
+checkboxes in the Permission Rules section. The path indicates the
+resource path for which the permissions apply. The permissions apply to
+all resources in the specified path directory and its subdirectories. As
+currently specified, the worker role has GET permission on the base
+directory path (/) and all resource paths below it (in other words, all
+resource paths).
+
+You can add a permission, by entering the entity path pattern in the
+Path field of the Add Permission Rule section, and checking the
+operation checkboxes (get, post, put, and delete) as appropriate. For
+example, the following adds permission to create a user:
+
+![](/docs/sites/docs/files/add_permission.png)
+
+Click Add, and the permission is added to the role.
+
+![](/docs/sites/docs/files/pemission_list.png)
+
+Permission rule examples
+------------------------
+
+Here are some examples to illustrate how permissions are specified:
+
+-   Authenticated user can change any data related to the:\
+
+        POST:/users/*
+
+-   A permission the permits the current user to make any changes to
+    resources associated with them:\
+
+        GET,PUT,POST,DELETE:/users/me/**
+
+-   A permission that allows someone to look at a specific user:\
+
+        GET:/users/john.doe
+
+-   A permission that allows the current user to see his activity feed:\
+
+        GET:/users/${user}/feed/*
+
+    The \${user} in the entity path refers to a variable that represents
+    the current user’s UUID.
+
+-   A permission allowing linked entities to be read:\
+
+        GET:/users/${user}/**
+
+    The /\*\* in the entity path is a wildcard that matches everything
+    under that path. This means that the full specification matches
+    multiple resource paths, including, but not limited to, the
+    following:
+
+        /users/${user}/feed
+        /users/${user}/feed/item1/a/b/c
+
+-   A permission that allows the current user to add himself or another
+    user to a group:\
+
+        POST:/groups/${user}/users/**
+
+

Added: incubator/usergrid/site/content/docs/messagee-example.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/messagee-example.md?rev=1543106&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/messagee-example.md (added)
+++ incubator/usergrid/site/content/docs/messagee-example.md Mon Nov 18 18:51:18 2013
@@ -0,0 +1,192 @@
+---
+title: Messagee Example
+category: docs
+layout: docs
+---
+
+Messagee Example
+================
+
+*Messagee* is a simple Twitter-style messaging application that
+leverages the extensive functionality of App services. This section
+describes some of the features of Messagee.
+
+There are three client versions of Messagee:
+
+-   An [iOS client](#iOS_client)
+-   An [Android client](#android_client)
+-   An [HTML5 client](#html5_client)
+
+The sections below describe how to create a new app, enter some test
+users, and run the app. You also learn how to use the App services admin
+portal, a user interface that streamlines data and application
+management in the App services system. The portal is also a reference
+application that shows how to incorporate App services APIs with
+JavaScript. For a more detailed discussion of the portal's
+functionality, see [Admin portal](/admin-portal).
+
+Creating a user account in App services
+---------------------------------------
+
+Go to [https://apigee.com/usergrid/](https://apigee.com/usergrid/) to
+access the login screen for the App services admin portal. If you are
+new to App services, sign up for an account to access the portal,
+specifying an organization (e.g., the name of your company or project
+team) and a username and password that you can use to authenticate.
+Because App services are designed for use by development teams, the same
+username can be associated with one or more organizations.
+
+If you create a new account, you receive a confirmation email that
+contains a URL that you must click to activate the account. After this,
+simply log in to the portal with your username and password.
+
+![](/docs/sites/docs/files/styles/large/public/login.png?itok=ws5DhLDI)
+
+Creating an app and users
+-------------------------
+
+When you have logged in, you need to create a new application.
+
+![](/docs/sites/docs/files/styles/large/public/portal-1.png?itok=4o63Ia-y)
+
+1.  2.  Enter a unique application name. The name must be unique to
+    avoid a conflict with another user running the same application.
+
+    ![](/docs/sites/docs/files/styles/large/public/portal-2.png?itok=yz8QznI7)
+
+3.  4.  Make sure that the portal shows the application name you entered
+    as the active application beneath the Applications menu **(1)**.
+
+    If the correct name is not displayed, click the menu and select your
+    application.
+
+    Next, you need to populate a test user *user-test-1* that is going
+    to log in to your copy of the server-side Messagee app.
+
+5.  6.  Click the Users box on the left side of the console **(2)**.
+
+    ![](/docs/sites/docs/files/styles/large/public/portal-3.png?itok=ncRlqPGQ)
+
+7.  8.  Click the Add button and enter the user information for your
+    application in the pop-up window (be sure to create a password you
+    can remember), and then click the Create button. Repeat these steps
+    to create a second username *test-user-2*.
+
+    ![](/docs/sites/docs/files/styles/large/public/portal-4.png?itok=X_kKe5Ke)
+
+9.  
+
+When you have finished all these steps, you have a new application and
+two new users.
+
+![](/docs/sites/docs/files/styles/large/public/portal-5.png?itok=jSmAcwc3)
+
+Now that you have created a uniquely named copy of the Messagee
+application as well as two user accounts (*test-user-1* and
+*test-user-2*), you are ready to test out the Messagee app. Use
+test-user-1 to log in to the app, and test-user-2 as the user to follow.
+
+To continue with the example, follow the instructions for a client app
+([iOS client](#iOS_client), [Android client](#android_client), or [HTML5
+client](#html5_client)).
+
+iOS client
+----------
+
+Messagee is available as an iPhone app that uses Apache Usergrid and
+RestKit. The source for the iOS version of Messagee is available in the
+/samples/messagee directory of the [Apache Usergrid iOS SDK](#ios_sdk)
+
+Here are the steps to run the Messagee app on iOS:
+
+1.  2.  Run Steps 1-6 under [Creating an app and users](#app_user).
+
+    These steps create a unique instance of the Messagee app on the
+    server and two test users, *test-user-1* and *test-user-2*.
+
+3.  4.  Access the Messagee server app by typing a URL similar to the
+    following into your iOS mobile client (replace \<Messagee\> with the
+    unique name of your application):
+
+    [https://api.usergrid.com](https://api.usergrid.com)/\<Messagee\>/index.html
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-1-chooseapp.jpg?itok=NSQcdJrj)
+
+5.  6.  On the mobile client, complete the registration information and
+    click Register.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-2-register.jpg?itok=Xzqe7mXV)
+
+7.  8.  Log in to the Messagee app by entering the *test-user-1* account
+    information created previously, and click the Sign in button.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-4-signin.jpg?itok=0M9QYU7b)
+
+    At this point, the message board is empty:
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-5-emptyfeed.jpg?itok=EWcUVMQN)
+
+9.  10. To post a message using the app, click the top-right icon in the
+    message board to create a message, write the message text, and send
+    it by clicking Post.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-6-newmsg.jpg?itok=Wj16l_5V)
+
+    **Note:** The posted message should appear in the message board
+    within few seconds.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-7-feed1msg.jpg?itok=RclSnHuU)
+
+    For your instance of the Messagee application to act like Twitter,
+    you need to "follow" another user.
+
+11. 12. In the message board, click Add People and add *test-user-2* as
+    a person that *test-user-1* follows.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-9-follow.jpg?itok=yJeaYnEj)
+
+13. 14. Log in as *test-user-2* and post a message as this user to the
+    message board.
+15. 16. Go back and log in as user *test-user-1*.
+
+    Because *test-user-1* follows *test-user-2*, you should see the
+    message sent by *test-user-2* in the message board.
+
+    ![](/docs/sites/docs/files/styles/large/public/iOS-10-seeusermsg.jpg?itok=Wcd7avBh)
+
+17. 
+
+iOS SDK
+-------
+
+If you want to write iOS applications that connect to App services,
+[download the Apache Usergrid iOS
+SDK](http://www.apigee.com/docs/content/ios-sdk-redirect)
+
+**Note:** The Messagee iOS application uses RestKit, a popular REST
+framework for iOS, to communicate with App services. Because App
+services use a REST API, you can use any REST framework to talk with the
+service. However, the official App services iOS SDK provides a more
+convenient communication mechanism that you should use unless you're
+already using RestKit or some other framework in your project.
+
+Android client and SDK
+----------------------
+
+Messagee is available as a sample Android app that acts as a App
+services client. The source for the Android version is packaged with the
+Apache Usergrid Android SDK in the /samples/messagee directory.
+
+[Download the Apache Usergrid Android
+SDK](http://www.apigee.com/docs/content/android-sdk-redirect).
+
+Javascript/HTML5 client and SDK
+-------------------------------
+
+Messagee is also available as a sample HTML5 app that behaves in much
+the same way as the two previous examples. The source for the HTML5
+version is packaged with the Apache Usergrid Javascript/HTML5 SDK in the
+/samples/messagee directory.
+
+[Download the Apache Usergrid Javascript/HTML5
+SDK](http://www.apigee.com/docs/content/javascript-sdk-redirect).

Added: incubator/usergrid/site/content/docs/nodejs-module.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/nodejs-module.md?rev=1543106&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/nodejs-module.md (added)
+++ incubator/usergrid/site/content/docs/nodejs-module.md Mon Nov 18 18:51:18 2013
@@ -0,0 +1,61 @@
+---
+title: Node.js module
+category: docs
+layout: docs
+---
+
+Installation
+------------
+
+From the command-line, run:
+
+```bash
+$ npm install usergrid
+```
+
+
+Client Initialization
+---------------------
+
+TODO
+
+
+
+Organizations
+-------------
+
+```javascript
+// Create an Organization
+var options = {
+    method:'POST',
+    endpoint:'management/orgs',
+    body:{ 
+          password:'test12345', 
+          email:'tester12345@gmail.com', 
+          name:'test', 
+          username:'tes123', 
+          organization:'testorg' 
+    }    
+};
+client.request(options, function (err, data) {
+    if (err) {
+        //error — POST failed
+    } else {
+        //success — data will contain raw results from API call        
+    }
+});
+
+
+// Read an Organization
+var options = {
+    method:'GET',
+    endpoint:'management/orgs/testorg'
+};
+client.request(options, function (err, data) {
+    if (err) {
+        //error — GET failed
+    } else {
+        //success — data will contain raw results from API call        
+    }
+});
+```
\ No newline at end of file



Mime
View raw message