You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by ti...@apache.org on 2013/12/20 10:15:13 UTC
svn commit: r1552550 [1/13] - in /incubator/usergrid/site:
content/community/ content/docs/ layouts/ lib/helpers/ publish/community/
publish/docs/access-token/ publish/docs/activity/
publish/docs/admin-portal/ publish/docs/admin-user/ publish/docs/app-...
Author: timanglade
Date: Fri Dec 20 09:15:11 2013
New Revision: 1552550
URL: http://svn.apache.org/r1552550
Log:
Update content and SF Jan event date
Added:
incubator/usergrid/site/content/docs/collections.md
incubator/usergrid/site/content/docs/contributing.md
incubator/usergrid/site/content/docs/events-and-counters 2.md
incubator/usergrid/site/content/docs/getting-up-and-running-locally.md
incubator/usergrid/site/content/docs/group 2.md
incubator/usergrid/site/content/docs/groups.md
incubator/usergrid/site/content/docs/organizations-admins 2.md
incubator/usergrid/site/content/docs/query-language.md
incubator/usergrid/site/content/docs/relationships.md
incubator/usergrid/site/content/docs/roles-and-permissions.md
incubator/usergrid/site/content/docs/upgrading.md
incubator/usergrid/site/content/docs/users-devices.md
incubator/usergrid/site/publish/docs/events-and-counters 2/
incubator/usergrid/site/publish/docs/events-and-counters 2/index.html
incubator/usergrid/site/publish/docs/group 2/
incubator/usergrid/site/publish/docs/group 2/index.html
incubator/usergrid/site/publish/docs/organizations-admins 2/
incubator/usergrid/site/publish/docs/organizations-admins 2/index.html
Removed:
incubator/usergrid/site/content/docs/basic-query-syntax.md
incubator/usergrid/site/content/docs/data-types-supported-queries.md
incubator/usergrid/site/content/docs/entity-relationships.md
incubator/usergrid/site/content/docs/html5-javascript-sdk.md
incubator/usergrid/site/content/docs/queries-and-parameters.md
incubator/usergrid/site/content/docs/query-response-values.md
incubator/usergrid/site/content/docs/working-queries.md
Modified:
incubator/usergrid/site/content/community/index.html
incubator/usergrid/site/content/docs/assets.md
incubator/usergrid/site/content/docs/events-and-counters.md
incubator/usergrid/site/content/docs/index.html
incubator/usergrid/site/content/docs/organizations-admins.md
incubator/usergrid/site/layouts/default.html
incubator/usergrid/site/layouts/header.html
incubator/usergrid/site/lib/helpers/release.rb
incubator/usergrid/site/publish/community/index.html
incubator/usergrid/site/publish/docs/access-token/index.html
incubator/usergrid/site/publish/docs/activity/index.html
incubator/usergrid/site/publish/docs/admin-portal/index.html
incubator/usergrid/site/publish/docs/admin-user/index.html
incubator/usergrid/site/publish/docs/app-security/index.html
incubator/usergrid/site/publish/docs/application/index.html
incubator/usergrid/site/publish/docs/applications/index.html
incubator/usergrid/site/publish/docs/authenticating-users-and-application-clients/index.html
incubator/usergrid/site/publish/docs/authentication-and-access-app-services-0/index.html
incubator/usergrid/site/publish/docs/client-authorization/index.html
incubator/usergrid/site/publish/docs/creating-collections/index.html
incubator/usergrid/site/publish/docs/creating-custom-data-entities/index.html
incubator/usergrid/site/publish/docs/creating-new-application-admin-console/index.html
incubator/usergrid/site/publish/docs/data-model/index.html
incubator/usergrid/site/publish/docs/data-query-overview/index.html
incubator/usergrid/site/publish/docs/default-data-entities/index.html
incubator/usergrid/site/publish/docs/deleting-collections/index.html
incubator/usergrid/site/publish/docs/deleting-data-entities/index.html
incubator/usergrid/site/publish/docs/device/index.html
incubator/usergrid/site/publish/docs/displaying-app-services-api-calls-curl-commands/index.html
incubator/usergrid/site/publish/docs/facebook-sign/index.html
incubator/usergrid/site/publish/docs/features/index.html
incubator/usergrid/site/publish/docs/folder/index.html
incubator/usergrid/site/publish/docs/geolocation/index.html
incubator/usergrid/site/publish/docs/group/index.html
incubator/usergrid/site/publish/docs/html-5-example-messagee/index.html
incubator/usergrid/site/publish/docs/managing-access-defining-permission-rules/index.html
incubator/usergrid/site/publish/docs/messagee-example/index.html
incubator/usergrid/site/publish/docs/nodejs-module/index.html
incubator/usergrid/site/publish/docs/organization/index.html
incubator/usergrid/site/publish/docs/querying-data-admin-portal/index.html
incubator/usergrid/site/publish/docs/querying-your-app-services-data/index.html
incubator/usergrid/site/publish/docs/rest-api/index.html
incubator/usergrid/site/publish/docs/rest-endpoints/index.html
incubator/usergrid/site/publish/docs/retrieving-collections/index.html
incubator/usergrid/site/publish/docs/retrieving-data-entities/index.html
incubator/usergrid/site/publish/docs/role/index.html
incubator/usergrid/site/publish/docs/ruby-gem/index.html
incubator/usergrid/site/publish/docs/securing-your-app/index.html
incubator/usergrid/site/publish/docs/security-model/index.html
incubator/usergrid/site/publish/docs/updating-collections/index.html
incubator/usergrid/site/publish/docs/updating-data-entities/index.html
incubator/usergrid/site/publish/docs/uploading-files-and-assets/index.html
incubator/usergrid/site/publish/docs/user/index.html
incubator/usergrid/site/publish/docs/using-api/index.html
incubator/usergrid/site/publish/docs/using-sandbox-application/index.html
Modified: incubator/usergrid/site/content/community/index.html
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/community/index.html?rev=1552550&r1=1552549&r2=1552550&view=diff
==============================================================================
--- incubator/usergrid/site/content/community/index.html (original)
+++ incubator/usergrid/site/content/community/index.html Fri Dec 20 09:15:11 2013
@@ -20,17 +20,21 @@
</div>
</div>
<div class="row">
- <div class="col-md-4">
- <h3>SF Bay Area Hack Day #1 <small>January 24</small></h3>
- <p>Come learn how to deploy & use Usergrid and meet committers at the Apigee offices, 2pmâ6pm, Thursday January 24. <a href="http://www.meetup.com/apache-usergrid-bay-area/events/155130502/">Register on Meetup.com</a><p>
+ <div class="col-md-3">
+ <h3>SF Bay Area Hack Day #1 <small>January 23</small></h3>
+ <p>Come learn how to deploy & use Usergrid and meet committers at the Apigee offices, 2pmâ6pm, Thursday January 23. <a href="http://www.meetup.com/apache-usergrid-bay-area/events/155130502/">Register on Meetup.com</a><p>
</div>
- <div class="col-md-4">
- <h3>SF Bay Area Meetup #1 <small>January 24</small></h3>
+ <div class="col-md-3">
+ <h3>SF Bay Area Meetup #1 <small>January 23</small></h3>
<p>Canât join us for the afternoon hack day? Weâll host an evening meetup right afterwards! Or join us for both! <a href="http://www.meetup.com/apache-usergrid-bay-area/events/155130862/">Register on Meetup.com</a><p>
</div>
- <div class="col-md-4">
+ <div class="col-md-3">
+ <h3>Seoul Hack Day #1 <small>January 24</small></h3>
+ <p>KT is hosting a Usergrid evening in Gangnam, Seoul, South Korea! <a href="http://onoffmix.com/event/22000">Register on OnOffMix.com</a><p>
+ </div>
+ <div class="col-md-3">
<h3> </h3>
- <p><i>Want to organize a Usergrid event? <a href="#">Contact us!</a></i><p>
+ <p><i>Want to organize a Usergrid event? <a href="mailto:timanglade@apache.org">Contact us!</a></i><p>
</div>
</div>
</div>
@@ -94,7 +98,7 @@
</a>
<div class="col-md-3">
<h3> </h3>
- <p><i>Want to be added to this list? <a href="#">Contact us!</a></i><p>
+ <p><i>Want to be added to this list? <a href="mailto:timanglade@apache.org">Contact us!</a></i><p>
</div>
</div>
</div>
Modified: incubator/usergrid/site/content/docs/assets.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/assets.md?rev=1552550&r1=1552549&r2=1552550&view=diff
==============================================================================
--- incubator/usergrid/site/content/docs/assets.md (original)
+++ incubator/usergrid/site/content/docs/assets.md Fri Dec 20 09:15:11 2013
@@ -9,19 +9,6 @@ objects such as images, video, and audio
not have to be used for a binary object. For example, assets can be used
to model a file system.
-Using App services APIs you can create, retrieve, update, delete, and
-query asset entities. See You do not have access to view this node for
-descriptions of these APIs.
-
-Asset properties
-----------------
-
-The following are the system-defined properties for asset entities. You
-can create application-specific properties for an asset entity in
-addition to the system-defined properties. The system-defined properties
-are reserved. You cannot use these names to create other properties for
-an asset entity. In addition the assets name is reserved for the assets
-collection â you can't use it to name another collection.
Property Type Description
-------------- -------- ---------------------------------------------------------------------------------
@@ -34,13 +21,4 @@ collection â you can't use it to na
path string Relative path to the asset (mandatory)
content-type string Content type of the asset (for example, âimage/jpegâ)
-Set property
-------------
-
-Assets have the following set property.
-
- Set Type Description
- ------------- -------- ----------------------------------
- connections string Set of connections for the asset
-
Â
Added: incubator/usergrid/site/content/docs/collections.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/collections.md?rev=1552550&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/collections.md (added)
+++ incubator/usergrid/site/content/docs/collections.md Fri Dec 20 09:15:11 2013
@@ -0,0 +1,25 @@
+---
+title: Collections
+category: docs
+layout: docs
+---
+
+In Apache Usergrid, all entities are automatically associated with a corresponding
+collection based on the `type` property of the entity. You may create
+empty collections if you wish, but creating an entity of a new type will
+automatically create a corresponding collection for you. For example,
+creating a new custom "item" entity, creates an "items" collection.
+
+Queries are always limited in scope to the current collection. That should be your primary consideration for data modeling in Apache Usergrid.
+
+The following collections are reserved in the system
+
+* users
+* groups
+* activities
+* devices
+* assets
+* folders
+* queues
+* events
+* counters
\ No newline at end of file
Added: incubator/usergrid/site/content/docs/contributing.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/contributing.md?rev=1552550&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/contributing.md (added)
+++ incubator/usergrid/site/content/docs/contributing.md Fri Dec 20 09:15:11 2013
@@ -0,0 +1,9 @@
+---
+title: Contributing
+category: docs
+layout: docs
+---
+
+We welcome all contributions! If you want to submit code, please submit a pull request to [usergrid/usergrid](https://github.com/usergrid/usergrid/), using a [topic branch](http://git-scm.com/book/en/Git-Branching-Branching-Workflows).
+
+Weâd prefer if your commit messages referenced the issue at hand (if applicable). We donât have particular guidelines for commit messages but we appreciate branch names that observe the following format: `issue#-singleworddescription` (i.e. `325-twitter`) or just a single word if no issue exists on the topic. Thanks!
\ No newline at end of file
Added: incubator/usergrid/site/content/docs/events-and-counters 2.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/events-and-counters%202.md?rev=1552550&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/events-and-counters 2.md (added)
+++ incubator/usergrid/site/content/docs/events-and-counters 2.md Fri Dec 20 09:15:11 2013
@@ -0,0 +1,396 @@
+---
+title: Events and counters
+category: docs
+layout: docs
+---
+
+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.
+
+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.
+
+**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.
+
+Using App services APIs you can create an event.
+
+Creating a new event
+--------------------
+
+Use the POST method to create a new event in the events collection.
+
+### Request URI
+
+POST /{org\_id}/{app\_id}/events {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 |
++--------------------------------------+--------------------------------------+
+| request body | One or more sets of event |
+| | properties. You must provide a |
+| | timestamp property, but if you set |
+| | it to 0 it is assigned by the |
+| | system. |
+| | |
+| | { |
+| | "timestamp":0, |
+| | Â Â "category" : "advertising", |
+| | Â Â "counters" : { |
+| | "ad_clicks" : 5 |
+| | Â Â } |
+| | } |
++--------------------------------------+--------------------------------------+
+
+### Example - Request
+
+- [cURL](#curl_create_event)
+- [JavaScript (HTML5)](#javascript_create_event)
+- [Ruby](#ruby_create_event)
+- [Node.js](#nodejs_create_event)
+
+<!-- -->
+
+ curl -X POST "https://api.usergrid.com/my-org/my-app/events" -d '{"timestamp":0, "category" : "advertising", "counters" : {"ad_clicks" : 5}}'
+
+The example assumes use of the [JavaScript (HTML5)
+SDK](https://github.com/apigee/usergrid-javascript-sdk).
+
+ var options = {
+ method:'POST',
+ endpoint:'events',
+ body:{timestamp:0, category:'advertising', counters:{ad_clicks : 5}}
+ };
+ 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/'
+ result = app.create_event timestamp: '0', category: 'advertising', counters: { ad_clicks: 5 }
+ mynewevent = result.entity
+
+The example assumes use of the [Node.js
+module](https://github.com/apigee/usergrid-node-module).
+
+ var options = {
+ method:'POST',
+ endpoint:'events',
+ body:{timestamp:0, category:'advertising', counters:{ad_clicks : 5}}
+ };
+ 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": "/events",
+ Â Â Â Â Â Â "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/events",
+ Â Â Â Â Â Â "entities": [
+ Â Â Â Â Â Â Â Â {
+ Â Â Â Â Â Â Â Â Â Â "uuid": "ce07ea3c-68b5-11e1-a586-9227e40e3559",
+ Â Â Â Â Â Â Â Â Â Â "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"
+ }
+
+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.
+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
+ }
+ ]
+ }
+ ]
+ }
Modified: incubator/usergrid/site/content/docs/events-and-counters.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/events-and-counters.md?rev=1552550&r1=1552549&r2=1552550&view=diff
==============================================================================
--- incubator/usergrid/site/content/docs/events-and-counters.md (original)
+++ incubator/usergrid/site/content/docs/events-and-counters.md Fri Dec 20 09:15:11 2013
@@ -4,15 +4,6 @@ category: docs
layout: docs
---
-Events and counters
-===================
-
-**Beta Feature**\
-\
- Please note that this is currently a beta feature. As a result, some
-functionality may not work as expected.
-
-
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
@@ -26,125 +17,6 @@ for running highly targeted, custom repo
Events are also the primary way to store custom counter data for
analytics. See Counters (below) for further details.
-**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.
-
-Using App services APIs you can create an event.
-
-Creating a new event
---------------------
-
-Use the POST method to create a new event in the events collection.
-
-### Request URI
-
-POST /{org\_id}/{app\_id}/events {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 |
-+--------------------------------------+--------------------------------------+
-| request body | One or more sets of event |
-| | properties. You must provide a |
-| | timestamp property, but if you set |
-| | it to 0 it is assigned by the |
-| | system. |
-| | |
-| | { |
-| | "timestamp":0, |
-| | Â Â "category" : "advertising", |
-| | Â Â "counters" : { |
-| | "ad_clicks" : 5 |
-| | Â Â } |
-| | } |
-+--------------------------------------+--------------------------------------+
-
-### Example - Request
-
-- [cURL](#curl_create_event)
-- [JavaScript (HTML5)](#javascript_create_event)
-- [Ruby](#ruby_create_event)
-- [Node.js](#nodejs_create_event)
-
-<!-- -->
-
- curl -X POST "https://api.usergrid.com/my-org/my-app/events" -d '{"timestamp":0, "category" : "advertising", "counters" : {"ad_clicks" : 5}}'
-
-The example assumes use of the [JavaScript (HTML5)
-SDK](https://github.com/apigee/usergrid-javascript-sdk).
-
- var options = {
- method:'POST',
- endpoint:'events',
- body:{timestamp:0, category:'advertising', counters:{ad_clicks : 5}}
- };
- 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/'
- result = app.create_event timestamp: '0', category: 'advertising', counters: { ad_clicks: 5 }
- mynewevent = result.entity
-
-The example assumes use of the [Node.js
-module](https://github.com/apigee/usergrid-node-module).
-
- var options = {
- method:'POST',
- endpoint:'events',
- body:{timestamp:0, category:'advertising', counters:{ad_clicks : 5}}
- };
- 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": "/events",
- Â Â Â Â Â Â "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/events",
- Â Â Â Â Â Â "entities": [
- Â Â Â Â Â Â Â Â {
- Â Â Â Â Â Â Â Â Â Â "uuid": "ce07ea3c-68b5-11e1-a586-9227e40e3559",
- Â Â Â Â Â Â Â Â Â Â "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"
- }
Event properties
----------------
@@ -213,7 +85,7 @@ The System-defined properties are as fol
### Categorizing events
-As mentioned previously, you can link an event to a user or a group.
+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
@@ -306,30 +178,25 @@ counter. Imagine that you want to track
function within that module, say module\_1, function\_1, you could use a
counter like this:
-errors.module\_1.function\_1
+ errors.module_1.function_1
And then for a different function in the same module:
-errors.module\_1.function\_2
+ errors.module_1.function_2
And then for a different function in a different module:
-errors.module\_2.function\_3
+ 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
+ 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
Added: incubator/usergrid/site/content/docs/getting-up-and-running-locally.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/getting-up-and-running-locally.md?rev=1552550&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/getting-up-and-running-locally.md (added)
+++ incubator/usergrid/site/content/docs/getting-up-and-running-locally.md Fri Dec 20 09:15:11 2013
@@ -0,0 +1,74 @@
+---
+title: Getting Up & Running Locally
+category: docs
+layout: docs
+---
+
+## Requirements
+
+* [JDK 1.7](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
+* [Maven](http://maven.apache.org/)
+
+## Download
+
+Start by [downloading our latest code](https://github.com/usergrid/usergrid/archive/master.zip) and extract it.
+
+## Building
+
+From the command line, navigate to stack directory and type the following:
+
+ mvn clean install -DskipTests=true
+
+## Running
+
+Usergrid-core contains the persistence layer and shared utilities for powering the Usergrid service. The services layer is contained in usergrid-services and exposes a higher-level API that's used by the usergrid-rest web services tier.
+
+You can run Usergrid from the command-line from the
+jar in the usergrid/standalone project:
+
+ cd launcher; java -jar target/usergrid-launcher-*.jar
+
+After startup, your instance will be available on localhost, port 8080.
+To check itâs running properly, you can try loading our status page:
+
+ curl http://localhost:8080/status
+
+You can also run it as a webapp in Tomcat, by deploying the ROOT.war file generated in the usergrid/rest project.
+
+## Getting Started with the HTTP API
+
+Start by creating an Organization. Itâs the top-level structure in Usergrid:
+all Apps and Administrators must belong to an Organization. Hereâs how you create one:
+
+ curl -X POST \
+ -d 'organization=myfirstorg&username=myadmin&name=Admin&email=admin@example.com&password=password' \
+ http://localhost:8080/management/organizations
+
+You can see that creating an Organization creates an Administrator in the process. Letâs authenticate as him:
+
+ curl 'http://localhost:8080/management/token?grant_type=password&username=myadmin&password=password'
+
+This will return an access\_token. Weâll use this to authenticate the next two calls.
+Next, letâs create an Application:
+
+ curl -H "Authorization: Bearer [the management token from above]" \
+ -H "Content-Type: application/json" \
+ -X POST -d '{ "name":"myapp" }' \
+ http://localhost:8080/management/orgs/myfirstorg/apps
+
+⦠And a User for the Application:
+
+ curl -H "Authorization: Bearer [the management token from above]" \
+ -X POST "http://localhost:8080/myfirstorg/myapp/users" \
+ -d '{ "username":"myuser", "password":"mypassword", "email":"user@example.com" }'
+
+Letâs now generate an access token for this Application User:
+
+ curl 'http://localhost:8080/myfirstorg/myapp/token?grant_type=password&username=myuser&password=mypassword'
+
+This will also send back an access\_token, but limited in scope.
+Letâs use it to create a collection with some data in it:
+
+ curl -H "Authorization: Bearer [the user token]" \
+ -X POST -d '[ { "cat":"fluffy" }, { "fish": { "gold":2, "oscar":1 } } ]' \
+ http://localhost:8080/myfirstorg/myapp/pets
Added: incubator/usergrid/site/content/docs/group 2.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/group%202.md?rev=1552550&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/group 2.md (added)
+++ incubator/usergrid/site/content/docs/group 2.md Fri Dec 20 09:15:11 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/groups.md
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/groups.md?rev=1552550&view=auto
==============================================================================
--- incubator/usergrid/site/content/docs/groups.md (added)
+++ incubator/usergrid/site/content/docs/groups.md Fri Dec 20 09:15:11 2013
@@ -0,0 +1,42 @@
+---
+title: Groups
+category: docs
+layout: docs
+---
+
+You can organize app users into groups. Groups have their own Activity Feed, their own permissions and be a useful alternative to Roles, depending on how you model your data. Groups were originaly designed to emulate Facebook Groups, so they will tend to function about the same way Facebook Groups would.
+
+Groups are hierarchical. Every member of the group /groups/california/san-francisco is also a member of the group /groups/california.
+
+Groups are also a great way to model things such a topic subscriptions. For example, you could allow people to subscribe (i.e. become a member of the group and be alerted via Activities) to /groups/memes/dogs/doge or subscribe to all /groups/memes/dogs
+
+
+### 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
+
+ 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
+
+ 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
+
+Â
Modified: incubator/usergrid/site/content/docs/index.html
URL: http://svn.apache.org/viewvc/incubator/usergrid/site/content/docs/index.html?rev=1552550&r1=1552549&r2=1552550&view=diff
==============================================================================
--- incubator/usergrid/site/content/docs/index.html (original)
+++ incubator/usergrid/site/content/docs/index.html Fri Dec 20 09:15:11 2013
@@ -6,83 +6,4 @@ title: Overview
<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
+<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>
\ No newline at end of file