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

[38/60] [abbrv] incubator-usergrid git commit: cherry picking docs from master

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

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/counters-and-events/events-and-counters.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/counters-and-events/events-and-counters.txt b/content/docs/_sources/counters-and-events/events-and-counters.txt
new file mode 100644
index 0000000..cbb0b93
--- /dev/null
+++ b/content/docs/_sources/counters-and-events/events-and-counters.txt
@@ -0,0 +1,8 @@
+# Counters & events
+Counters can be used to track statistics on many aspects of an application by keeping a running count of the number of times an action occurs in your app. Posting an event increments the counter. Counters can also be retrieved by time period, allowing you to generate reports on specific actions in your app.
+
+With 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.

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

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/data-queries/advanced-query-usage.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-queries/advanced-query-usage.txt b/content/docs/_sources/data-queries/advanced-query-usage.txt
new file mode 100644
index 0000000..4b78215
--- /dev/null
+++ b/content/docs/_sources/data-queries/advanced-query-usage.txt
@@ -0,0 +1,23 @@
+# Advanced query usage
+
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">

+Query examples in this content are shown unencoded to make them easier to read. Keep in mind that you might need to encode query strings if you're sending them as part of URLs, such as when you're executing them with the cURL tool.
+</p></div>
+
+## Attaching a query to all API calls
+
+
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">

+<p>JavaScript SDK only.</p>
+In some cases, it may be convenient to attach a query or other URI parameter to every call you make to Usergrid, such as a custom identifier or token. To do this with the Usergrid JavaScript SDK, add a qs property to your Usergrid.Client object when you initialize the SDK. For more on initializing the SDK, see our install guide.
+</p></div>
+
+For example, the following would append ?custom_id=1234 to every call sent from the Usergrid JavaScript SDK to Usergrid:
+
+    var options = {
+        orgName:'yourOrg',
+        appName:'yourApp',
+        qs:'custom_id=1234'
+    }
+    var dataClient = new Usergrid.Client(options);
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/data-queries/operators-and-types.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-queries/operators-and-types.txt b/content/docs/_sources/data-queries/operators-and-types.txt
new file mode 100644
index 0000000..c67ccd1
--- /dev/null
+++ b/content/docs/_sources/data-queries/operators-and-types.txt
@@ -0,0 +1,120 @@
+# Query operators & data types
+
+The following operators and data types are supported by the SQL-like query language in Usergrid.
+
+## Operators
+
+<table class="usergrid-table">
+    <tr>
+        <td>Operator</td>
+        <td>Purpose</td>
+        <td>Example</td>
+    </tr>
+    <tr>
+        <td>'<' or 'lt'</td>
+        <td>Less than</td>
+        <td>select * where quantity > '1000'</td>
+    </tr>
+    <tr>
+        <td>'<=' or 'lte'</td>
+        <td>Less than or equal to</td>
+        <td>Example</td>
+    </tr>
+    <tr>
+        <td>'=' or 'eq'</td>
+        <td>Equals</td>
+        <td>select * where price = '20.00'</td>
+    </tr>
+    <tr>
+        <td>'>=' or 'gte'</td>
+        <td>Greater than or equal to </td>
+        <td>select * where quantity >= '1000'</td>
+    </tr>
+    <tr>
+        <td>'>' or 'gt'</td>
+        <td>Greater than</td>
+        <td>select * where quantity > '1000'</td>
+    </tr>
+    <tr>
+        <td>not <some_expression></td>
+        <td>Subtraction of results</td>
+        <td>select * where quantity < '4000' and not quantity = '2000'</td>
+    </tr>
+    <tr>
+        <td>and</td>
+        <td>Union of results</td>
+        <td>select * where quantity > '1000' and quantity < '4000'</td>
+    </tr>
+    <tr>
+        <td>or</td>
+        <td>Intersection of results</td>
+        <td>select * where quantity = '1000' or quantity = '4000'</td>
+    </tr>
+    <tr>
+        <td>contains</td>
+        <td>Narrow by contained text</td>
+        <td>select * where title contains 'tale'</td>
+    </tr>
+</table>
+
+
+## Data types
+
+As you develop queries, remember that entity properties each conform to a particular data type. For example, in the default entity User, the name property is stored as a string, the created date as a long, and metadata is stored as a JSON object. Your queries must be data type-aware to ensure that query results are as you expect them to be.
+
+For example, if you create an entity with a price property with a value of 100.00, querying for 100 will return no results, since the API expected a decimal-delimited float value in your query.
+
+For a list of property data types for each default entities, see Default Data Entity Types.
+
+<table class="usergrid-table">
+    <tr>
+        <td>string</td>
+        <td><pre>'value', unicode '\uFFFF', octal '\0707'</pre></td>
+    </tr>
+    <tr>
+        <td>long</td>
+        <td><pre>1357412326021</pre> <br> Timestamps are typically stored as long values.</td>
+    </tr>
+    <tr>
+        <td>float</td>
+        <td><pre>10.1, -10.1, 10e10, 10e-10, 10E10, 10E-10</pre> <br>
+        Your query must be specific about the value you're looking for, down to the value 
+        (if any) after the decimal point.</td>
+    </tr>
+    <tr>
+        <td>boolean</td>
+        <td><pre>true | false</pre></td>
+    </tr>
+    <tr>
+        <td>UUID</td>
+        <td><pre>ee912c4b-5769-11e2-924d-02e81ac5a17b</pre></td>
+    </tr>
+    <tr>
+        <td>Array</td>
+        <td><pre>["boat", "car", "bike"]</pre></td>
+    </tr>
+    <tr>
+        <td>object</td>
+        <td><p>For a JSON object like this one:</p>
+            <pre>
+                {
+                 "items": [
+                  {
+                   "name": "rocks"
+                  },
+                  {
+                   "name": "boats"
+                  }
+                 ]
+                }
+            </pre>
+            <p>you can use dot notation to reach property values in the object:</p>
+            <pre>
+                 /mycollection/thing?ql="select * where items.name = 'rocks'"
+            </pre>
+            <p>Objects are often used to contain entity metadata, such as the activities 
+            associated with a user, the users associated with a role, and so on.</p>
+            <p>Please note that object properties are not indexed. This means queries 
+            using dot-notation will be much slower than queries on indexed entity properties.</p></td>
+    </tr>
+</table>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/data-queries/query-language.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-queries/query-language.txt b/content/docs/_sources/data-queries/query-language.txt
new file mode 100644
index 0000000..a491740
--- /dev/null
+++ b/content/docs/_sources/data-queries/query-language.txt
@@ -0,0 +1,427 @@
+# Query Language
+
+> Query examples in this content are shown unencoded to make
+> them easier to read. Keep in mind that you might need to encode query
+> strings if you're sending them as part of URLs, such as when you're
+> executing them with the cURL tool.
+
+The following example retrieves a list of restaurants (from a
+restaurants collection) whose name property contains the value "diner",
+sorting the list in ascending order by name:
+
+    /restaurants?ql=select * where name contains 'diner' order by name asc
+
+
+## Basic syntax
+
+Queries of Usergrid data for Apache Usergrid are made up of two kinds of
+statements: the path to the collection you want to query, followed by
+the query language statement containing your query. These two statements
+are separated by "?ql=" to indicate where the query language statement
+starts.
+
+To retrieve items from a collection, you would use a syntax such as the
+following:
+
+    /<collection>?ql=<query_statement>
+
+In the following example, the query is retrieving all users whose name
+is Gladys Kravitz.
+
+    /users?ql=select * where name = 'Gladys Kravitz'
+
+The following example selects all items except those that have an a
+property value of 5:
+
+    /items?ql=select * where NOT a = 5
+
+Note that there is a shortcut available when your query selects all
+items matching certain criteria -- in other words, where you use a
+statement that starts "select \* where". In this case, you can omit the
+first part of the statement and abbreviate it this way:
+
+    /items?ql=NOT a = 5
+
+You query your Apache Usergrid data by using a query syntax that's like
+Structured Query Language (SQL), the query language for relational
+databases. Unlike a relational database, where you specify tables and
+columns containing the data you want to query, in your Apache Usergrid
+queries you specify collections and entities.
+
+The syntax of Apache Usergrid queries only *resembles* SQL to
+make queries familiar and easier to write. However, the language isn't
+SQL. Only the syntax items documented here are supported.
+
+## Supported operators
+
+Comparisons
+
+* Less than `<` or `lt`
+* Less than or equal `<=` or `lte`
+* Equal `=` or `eq`
+* Greater than or equal `>=` or `gte`
+* Greater than `>` or `gt`
+* Not equal `NOT`
+
+Logical operations
+
+* Intersection of results `and`
+* Union of results `or`
+* Subtraction of results `not`
+
+
+## Query Response Format
+
+the query’s response is formatted in
+JavaScript Object Notation (JSON). This is a common format used for
+parameter and return values in REST web services.
+
+So for the following query:
+
+    /users?ql=select * where name = ‘Gladys Kravitz’
+
+...you would get a response such as the the one below. The JSON format
+arranges the data in name/value pairs. Many of the values correspond to
+specifics of the request, including the request’s HTTP action (GET), the
+application’s UUID, the request’s parameters (the query string you
+sent), and so on.
+
+Here, the query is asking for whole entities in the users collection.
+Data corresponding to the response is captured in the response’s
+`entities` array. The array has one member here, corresponding to the
+one user found by the query (another kind of query might have found more
+users). That one member gives the UUID of the entity (user), the entity
+type, and values for properties such as name, username, email, and so
+on.
+
+```json
+{
+  "action" : "get",
+  "application" : "8272c9b0-d86a-11e2-92e2-cdf1ce04c1c0",
+  "params" : {
+    "ql" : [ "select * where name = 'Gladys Kravitz'" ]
+  },
+  "path" : "/users",
+  "uri" : "http://api.usergrid.com/myorg/myapp/users",
+  "entities" : [ {
+    "uuid" : "d0d7d0ba-e97b-11e2-8cef-411c466c4f2c",
+    "type" : "user",
+    "name" : "Gladys Kravitz",
+    "created" : 1373472876859,
+    "modified" : 1373472876859,
+    "username" : "gladys",
+    "email" : "gladys@example.com",
+    "activated" : true,
+    "picture" : "http://www.gravatar.com/avatar/20c57d4f41cf51f2db44165eb058b3b2",
+    "metadata" : {
+      "path" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c",
+      "sets" : {
+        "rolenames" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/rolenames",
+        "permissions" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/permissions"
+      },
+      "connections" : {
+        "firstname" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/firstname",
+        "lastname" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/lastname"
+      },
+      "collections" : {
+        "activities" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/activities",
+        "devices" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/devices",
+        "feed" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/feed",
+        "groups" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/groups",
+        "roles" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/roles",
+        "following" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/following",
+        "followers" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/followers"
+      }
+    }
+  } ],
+  "timestamp" : 1374694196061,
+  "duration" : 48,
+  "organization" : "myorg",
+  "applicationName" : "myapp",
+  "count" : 1
+}
+```
+
+Compare the preceding example with the following for another kind of
+query. Imagine the following request string, where the query string is
+asking for only the values of two of the entity’s properties (username
+and name):
+
+    /users?ql=select username,name where name=’Gladys Kravitz’
+
+In the response JSON from this query, the return value is specified as
+the property of the `list` item -- here, an array containing only the
+values of the properties the query asked for, in the order they were
+requested (username first, then name).
+
+    {
+      "action" : "get",
+      "application" : "8272c9b0-d86a-11e2-92e2-cdf1ce04c1c0",
+      "params" : {
+        "ql" : [ "select username,name where name='Gladys Kravitz'" ]
+      },
+      "path" : "/users",
+      "uri" : "http://api.usergrid.com/myorg/myapp/users",
+      "list" : [ [ "gladys", "Gladys Kravitz" ] ],
+      "timestamp" : 1374697463190,
+      "duration" : 25,
+      "organization" : "myorg",
+      "applicationName" : "myapp",
+      "count" : 1
+    }
+
+
+## Data types supported in queries
+
+As you develop queries for your Apache Usergrid data, remember that entity
+properties each conform to a particular data type (whether the entity is
+included by default or an entity you defined). Your queries must
+acknowledge this, testing with values that conform to each property's
+data type. (You can view the list of property data types for the default
+entities at [Default Data Entities](/default-data-entities).)
+
+For example, in the default entity `User`, the `name` property is stored
+as a `string`, the created date as a `long`, and metadata is stored as a
+JSON object. Your queries must be data type-aware so that you can be
+sure that query results are as you expect them to be.
+
+So imagine you define an entity with a `price` property whose value
+might be `100.00`. Querying for `100` will return no results even if
+there are occurrences of `100.00` as `price` values in your data set.
+That's because the database expected a decimal-delimited `float` value
+in your query.
+
+
+Data Type     Examples                                                                                    Notes
+----------- ------------------------------------------------------------------------------------------- ---------
+`string`    `'value'`, `unicode '\uFFFF'`, `octal '\0707'`                                              true | false
+`long`      1357412326021                                                                               Timestamps are typically stored as `long` values.
+`float`     10.1, -10.1, 10e10, 10e-10, 10E10, 10e-10                                                   Your query must be specific about the value you're looking for, down to the value (if any) after the decimal point.
+`boolean`   true | false                                      
+`UUID`      ee912c4b-5769-11e2-924d-02e81ac5a17b                                                        UUID types are typically used for the unique IDs of entities. The value must conform to the following format (do not enclose with quotation marks): xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+
+
+`object`    For a JSON object like this one:
+
+```
+  {
+    "items":[
+      {"name":"rocks"},
+      {"name":"boats"}
+    ]
+  }
+```
+
+you can use dot notation to reach property values in the object: /mycollection/thing?ql="select * where items.name = 'rocks'"                        Objects are often used to contain entity metadata, such as the activities associated with a user, the users associated with a role, and so on.
+
+## Retrieving values for multiple properties
+
+Your query can return multiple kinds of values -- such as the values of
+multiple properties -- by specifying the property names in your select
+statement as a comma-separated list.
+
+For example, the following request returns the address and phone number
+of users whose name is Gladys Kravitz:
+
+    /users?ql=select address,phone_number where name = 'Gladys Kravitz'
+
+
+## Querying for the contents of text
+
+Your query can search the text of entity values of the string data type.
+For example, you can search a postal code field for values that start
+with a specific three numbers.
+
+For example, the following query selects all restaurants with the word
+`diner` in the name:
+
+    /restaurants?ql=select * where name contains 'diner'
+
+**Note:** Not all string properties of the default entities are
+indexed for searching. This includes the `User` entity's `username`
+property.
+
+This will return all users whose name property contains the word 'Kravitz'
+
+    /users?ql=select * where name contains 'Kravitz'
+
+This will return all users whose name property contains a word beginning with 'Krav'
+
+    /users?ql=select * where name contains 'Krav*'
+
+This will return all users whose name is exactly 'Gladys Kravitz'
+
+    /users?ql=select * where name = 'Gladys Kravitz'
+
+
+## Sorting results
+
+You can return query results that are sorted in the order you specify.
+Use the `order by` clause to specify the property to sort by, along with
+the order in which results should be sorted. The syntax for the clause
+is as follows `order by <property_name> asc | desc`
+
+The following table includes a few examples:
+
+    /users?ql=select * where lastname = 'Smith' order by firstname asc
+
+
+    /users?ql=select * where lastname = 'Smith' order by firstname desc
+
+
+    /users?ql=select * where lastname contains 'Sm*' order by lastname asc, firstname asc
+
+
+## Geoqueries
+
+Many of today's apps are enhanced by the use of *geolocation*, wireless
+detection of the physical location of a remote device. These apps are
+said to be *geolocation-aware* in that they query the device to
+determine the user's position and then use this data to further enhance
+the user's experience. For example, apps can capture the exact location
+where a picture was taken or a message was created.
+
+Usergrid support geolocation on any entity, both built in (e.g.,
+users, groups) and user defined.
+
+To add a location to any entity, include the following member to the
+JSON in a POST or PUT call:
+
+    "location": {
+        "latitude": 37.779632,
+        "longitude": -122.395131  
+    } 
+
+For example, to store a listing of restaurants and their locations,
+start by creating a collection called restaurants:
+
+    POST https://api.usergrid.com/org_name/app_name/restaurants
+
+Next, add a new entity to the collection:
+
+    POST https://api.usergrid.com/org_name/app_name/restaurants
+    {
+      "name": "Rockadero",
+      "address": "21 Slate Street, Bedrock, CA",
+      "location": {
+        "latitude": 37.779632,
+        "longitude": -122.395131
+      }
+    }
+
+This creates a new restaurant entity called "Rockadero" with the
+longitude and latitude included as part of the object.
+
+When a location is added to an entity, it is easy to make queries
+against that data. For example, to see all restaurants within a 10 mile
+radius of the user's location, make a GET call against that entity, and
+include a search query in the following format:
+
+    location within <distance in meters> of <latitude>, <longitude>
+
+If we use the location of our user Fred, we first need to convert miles
+to meters. 1 mile is equivalent to 1609.344 meters, so 10 miles is about
+16093 meters. Thus, the API call looks like this:
+
+    GET https://api.usergrid.com/org_name/app_name/restaurants?ql=location within 16093 of 37.776753, -122.407846
+
+
+## Managing large sets of results
+
+When your query might return more results than you want to display to
+the user at once, you can use the limit parameter with cursors or API
+methods to manage the display of results. By default, query results are
+limited to 10 at a time. You can adjust this by setting the limit
+parameter to a value you prefer.
+
+For example, you might execute a query that could potentially return
+hundreds of results, but you want to display 20 of those at a time to
+users. To do this, your code sets the limit parameter to 20 when
+querying for data, then provides a way for the user to request more of
+the results when they're ready.
+
+You would use the following parameters in your query:
+
++-------------------------+-------------------------+-------------------------+
+| Parameter               | Type                    | Description             |
++=========================+=========================+=========================+
+| `limit`                 | integer                 | Number of results to    |
+|                         |                         | return. The maximum     |
+|                         |                         | number of results is    |
+|                         |                         | 1,000. Specifying a     |
+|                         |                         | limit greater than      |
+|                         |                         | 1,000 will result in a  |
+|                         |                         | limit of 1,000.         |
+|                         |                         |                         |
+|                         |                         | Limit is applied to the |
+|                         |                         | collection, not the     |
+|                         |                         | query string. For       |
+|                         |                         | example, the following  |
+|                         |                         | query will find the     |
+|                         |                         | first 100 entities in   |
+|                         |                         | the books collection,   |
+|                         |                         | then from that set      |
+|                         |                         | return the ones with    |
+|                         |                         | author='Hemingway':     |
+|                         |                         |                         |
+|                         |                         |     /books?ql=author =  |
+|                         |                         | 'Hemingway'&limit=100   |
+|                         |                         |                         |
+|                         |                         | You can also use the    |
+|                         |                         | limit parameter on a    |
+|                         |                         | request without a query |
+|                         |                         | string. The following   |
+|                         |                         | example is shorthand    |
+|                         |                         | for selecting all books |
+|                         |                         | and limiting by 100 at  |
+|                         |                         | a time:                 |
+|                         |                         |                         |
+|                         |                         |     /books?limit=100    |
+|                         |                         |                         |
+|                         |                         | Using a limit on a      |
+|                         |                         | DELETE can help you     |
+|                         |                         | manage the amount of    |
+|                         |                         | time it takes to delete |
+|                         |                         | data. For example you   |
+|                         |                         | can delete all of the   |
+|                         |                         | books, 1000 at a time,  |
+|                         |                         | with the following:     |
+|                         |                         |                         |
+|                         |                         |     DELETE /books?limit |
+|                         |                         | =1000                   |
+|                         |                         |                         |
+|                         |                         | Keep in mind that       |
+|                         |                         | DELETE operations can   |
+|                         |                         | take longer to execute. |
+|                         |                         | Yet even though the     |
+|                         |                         | DELETE query call might |
+|                         |                         | time out (such as with  |
+|                         |                         | a very large limit),    |
+|                         |                         | the operation will      |
+|                         |                         | continue on the server  |
+|                         |                         | even if the client      |
+|                         |                         | stops waiting for the   |
+|                         |                         | result.                 |
++-------------------------+-------------------------+-------------------------+
+| `cursor`                | string                  | An encoded              |
+|                         |                         | representation of the   |
+|                         |                         | query position pointing |
+|                         |                         | to a set of results. To |
+|                         |                         | retrieve the next set   |
+|                         |                         | of results, pass the    |
+|                         |                         | cursor with your next   |
+|                         |                         | call for most results.  |
++-------------------------+-------------------------+-------------------------+
+
+For example:
+
+Select all users whose name starts with fred, and returns the first 50
+results:
+
+    /users?ql=select * where name = 'fred*'&limit=50
+
+Retrieve the next batch of users whose name is "fred", passing the
+cursor received from the last request to specify where the next set of
+results should begin:
+
+    /users?ql=select * where name = 'fred*'&limit=50&cursor=LTIxNDg0NDUxNDpnR2tBQVFFQWdITUFDWFJ2YlM1emJXbDBhQUNBZFFBUUQyMVZneExfRWVLRlV3TG9Hc1doZXdDQWRRQVFIYVdjb0JwREVlS1VCd0xvR3NWT0JRQQ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/data-queries/query-parameters.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-queries/query-parameters.txt b/content/docs/_sources/data-queries/query-parameters.txt
new file mode 100644
index 0000000..9f9fc68
--- /dev/null
+++ b/content/docs/_sources/data-queries/query-parameters.txt
@@ -0,0 +1,153 @@
+# Query parameters & clauses
+
+When querying your data, you can use your query string to get the data, then sort and manage it on the client. This topic describes a few techniques.
+
+Query examples in this content are shown unencoded to make them easier to read. Keep in mind that you might need to encode query strings if you're sending them as part of URLs, such as when you're executing them with the cURL tool.
+
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">

+Optimizing queries. As a best practice, you should include no more than 3 parameters in your queries. The API will not prevent you from submitting a query with more than 3 parameters; however, due to the nature of NoSQL, queries with many parameters can quickly become very inefficient.
+</p></div>
+
+For more information, see our [Usergrid DBMS overview](../data-store/data-storage-dbms.html) and [Data store best practices](../data-storage/optimizing-access).
+
+### Contains
+
+Your query can search the text of entity values of the string data type. For example, you can search a postal code field for values that start with a specific three numbers.
+
+For example, the following query selects all restaurants with the word diner in the name:
+
+    /restaurants?ql=select * where restaurants contains 'diner'
+    
+__Note__: Not all string properties of the default entities are indexed for searching. This includes the User entity's username property.
+
+The following table lists a few examples of the kind of searches you can do in queries.
+
+<table class="usergrid-table">
+    <tr>
+        <td>Goal</td>
+        <td>Example</td>
+        <td>Notes</td>
+    </tr>
+    <tr>
+        <td>Find books whose 'title' property contains the full word "tale".</td>
+        <td><pre>/books?ql=select * where title contains 'tale'</pre></td>
+        <td>containslooks for the occurrence of a full word anywhere in the searched property. Note that contains will not work on the 'name' property, since it is not full-text indexed in the database.</td>
+    </tr>
+    <tr>
+        <td>Find books whose 'title' property contains a word that starts with "ta".</td>
+        <td><pre>/books?ql=select * where title contains 'ta*'</pre></td>
+        <td>containswill look for partial words if you include a wildcard.</td>
+    </tr>
+    <tr>
+        <td>Find books whose title property is exactly and only "A Tale of Two Cities".</td>
+        <td><pre>/books?ql=select * where title = 'A Tale of Two Cities'</pre></td>
+        <td>The = operator is looking for a match in the entire searched property value. Use a * wildcard to look for some set of the first characters only.</td>
+    </tr>
+</table>
+    
+
+### Location
+
+If you've stored location data with your entities, you can query for the proximity of the geographical locations those entities represent. For more information on geolocation, see Geolocation.
+
+<table class="usergrid-table">
+    <tr>
+        <td>Goal</td>
+        <td>Example</td>
+        <td>Notes</td>
+    </tr>
+    <tr>
+        <td>Find stores whose locations are within the specified longitude and latitude.</td>
+        <td><pre>/stores?ql=location within 500 of 40.042016, -86.900749</pre></td>
+        <td>within will test for values within the value you specify. The within value is expressed as a number of meters.<br>The return results are sorted in order of nearest to furthest. If there are multiple entries at the same location, they're returned in the order they were added to the database.<br> For more on geolocation queries, see Geolocation.</td>
+    </tr>
+</table>
+
+### Order by
+
+You can return query results that are sorted in the order you specify. Use the order by clause to specify the property to sort by, along with the order in which results should be sorted. The syntax for the clause is as follows:
+
+    order by <property_name> asc | desc
+    
+The following table includes a few examples:
+
+<table class="usergrid-table">
+    <tr>
+        <td>Goal</td>
+        <td>Example</td>
+    </tr>
+    <tr>
+        <td>Sort by first name in ascending order</td>
+        <td>/users?ql=select * where lastname = 'Smith' order by firstname asc</td>
+    </tr>
+    <tr>
+        <td>Sort by first name in descending order</td>
+        <td>/users?ql=select * where lastname = 'Smith' order by firstname desc</td>
+    </tr>
+    <tr>
+        <td>Sort by last name, then first name in ascending orderl</td>
+        <td>/users?ql=select * where lastname contains 'Sm*' order by lastname asc, firstname asc</td>
+    </tr>
+<table>
+    
+
+### Limit
+
+When your query might return more results than you want to display to the user at once, you can use the limit parameter with cursors or API methods to manage the display of results. By default, query results are limited to 10 at a time. You can adjust this by setting the limit parameter to a value you prefer.
+
+For example, you might execute a query that could potentially return hundreds of results, but you want to display 20 of those at a time to users. To do this, your code sets the limit parameter to 20 when querying for data, then provides a way for the user to request more of the results when they're ready.
+
+You would use the following parameters in your query:
+
+<table class="usergrid-table">
+    <tr>
+        <td>Parameter</td>
+        <td>Type</td>
+        <td>Description</td>
+    </tr>
+    <tr>
+        <td>limit</td>
+        <td>integer</td>
+        <td><p>Number of results to return. The maximum number of results is 1,000. 
+            Specifying a limit greater than 1,000 will result in a limit of 1,000.</p>
+            <p>You can also use the limit parameter on a request without a query string. 
+            The following example is shorthand for selecting all books and limiting by 100 at a time:</p>
+            <pre>/books?limit=100</pre>
+            <p>Using a limit on a DELETE can help you manage the amount of time it takes 
+            to delete data. For example you can delete all of the books, 1000 at a time, 
+            with the following:</p>
+            <pre>DELETE /books?limit=1000</pre>
+            <p> Keep in mind that DELETE operations can take longer to execute. 
+            Yet even though the DELETE query call might time out (such as with a 
+            very large limit), the operation will continue on the server even if 
+            the client stops waiting for the result.</p>
+        </td>
+    </tr>
+</table>
+
+For example:
+
+Select all users whose name starts with fred, and returns the first 50 results:
+
+    /users?ql=select * where name = 'fred*'&limit=50
+  
+   
+### Cursor
+
+<table class="usergrid-table">
+    <tr>
+        <td>Parameter</td>
+        <td>Type</td>
+        <td>Description</td>
+    </tr>
+    <tr>
+        <td>cursor</td>
+        <td>string</td>
+        <td>An encoded representation of the query position pointing to a set of results. To retrieve the next set of results, pass the cursor with your next call for most results./td>
+    </tr>
+</table>
+        
+Retrieve the next batch of users whose name is "fred", passing the cursor received from the last request to specify where the next set of results should begin:
+
+    /users?ql=select * where name = 'fred*'&limit=50&cursor=LTIxNDg0NDUxNDpVdjb0JwREVlS1VCd0xvR3NWT0JRQQ
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/data-queries/querying-your-data.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-queries/querying-your-data.txt b/content/docs/_sources/data-queries/querying-your-data.txt
new file mode 100644
index 0000000..fa10169
--- /dev/null
+++ b/content/docs/_sources/data-queries/querying-your-data.txt
@@ -0,0 +1,121 @@
+# Querying your data
+
+This article describes how to use queries to filter data retrieved from your backend data store. Queries allow you to work with only the data you need, making your app more efficient and manageable by reducing the number of entities returned or acted on by the API. A query can be sent with any GET, PUT or DELETE request. For example, you might query the API to retrieve only the user entities with the property status:'active' to get a list of your users that have active accounts.
+
+For information on more advanced query usage and syntax, see [Query parameters & clauses](query-parameters.html).
+
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">

+Query examples in this content are shown unencoded to make them easier to read. Keep in mind that you might need to encode query strings if you're sending them as part of URLs, such as when you're executing them with the cURL tool.
+</p></div>
+
+## Basic query usage
+
+The following examples show how to query the Usergrid API to return the first 5 entities in the users collection that contain the property status:'active'.
+
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">

+Optimizing queries: As a best practice, you should include no more than 3 parameters in your queries. The API will not prevent you from submitting a query with more than 3 parameters; however, due to the nature of NoSQL, queries with many parameters can quickly become very inefficient.
+</p></div>
+
+For more information, see our [Usergrid DBMS overview](../data-store/data-storage-dbms.html) and [Data store best practices](../data-storage/optimizing-access).
+
+### Request Syntax
+
+	https://api.usergrid.com/<org>/<app>/<collection>?ql=<query_statement>
+
+Note: Any values specified in the query statement should be enclosed in single-quotes.
+
+	https://api.usergrid.com/your-org/your-app/users?limit=5&ql=select * where status = 'active'
+	
+Alternatively, when you use a statement that starts select * where you can omit the first part of the statement and abbreviate it this way:
+
+	https://api.usergrid.com/your-org/your-app/users?limit=5&ql=status = 'active'
+	
+### Retrieving values for multiple properties
+
+Your query can return multiple kinds of values -- such as the values of multiple properties -- by specifying the property names in your select statement as a comma-separated list.
+
+For example, the following request returns the address and phone number of users whose name is Gladys Kravitz:
+
+	/users?ql=select address,phone_number where name = 'Gladys Kravitz'
+	
+### Response syntax
+
+When you query your data, the API response is formatted in JavaScript Object Notation (JSON). This is a common format used for parameter and return values in REST web services.
+
+Data corresponding to the response is captured in the response’s entities array. The array will include one JSON-object for each entity returned for the query. Each returned entity will include a number of default properties, including the UUID of the entity, the entity type, and values for properties such as name, username, email, and so on. For a complete list of default properties by entity type, see Default Data Entity Types.
+
+For example, the following query for all entities of type user where the name property equals 'Gladys Kravitz':
+
+	/users?ql=select * where name = ‘Gladys Kravitz’
+
+will return the following response:
+
+	{
+	  "action" : "get",
+	  "application" : "8272c9b0-d86a-11e2-92e2-cdf1ce04c1c0",
+	  "params" : {
+	    "ql" : [ "select * where name = 'Gladys Kravitz'" ]
+	  },
+	  "path" : "/users",
+	  "uri" : "http://api.usergrid.com/myorg/myapp/users",
+	  "entities" : [ {
+	    "uuid" : "d0d7d0ba-e97b-11e2-8cef-411c466c4f2c",
+	    "type" : "user",
+	    "name" : "Gladys Kravitz",
+	    "created" : 1373472876859,
+	    "modified" : 1373472876859,
+	    "username" : "gladys",
+	    "email" : "gladys@example.com",
+	    "activated" : true,
+	    "picture" : "http://www.gravatar.com/avatar/20c57d4f41cf51f2db44165eb058b3b2",
+	    "metadata" : {
+	      "path" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c",
+	      "sets" : {
+	        "rolenames" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/rolenames",
+	        "permissions" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/permissions"
+	      },
+	      "connections" : {
+	        "firstname" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/firstname",
+	        "lastname" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/lastname"
+	      },
+	      "collections" : {
+	        "activities" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/activities",
+	        "users" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/users",
+	        "feed" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/feed",
+	        "groups" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/groups",
+	        "roles" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/roles",
+	        "following" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/following",
+	        "followers" : "/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/followers"
+	      }
+	    }
+	  } ],
+	  "timestamp" : 1374694196061,
+	  "duration" : 48,
+	  "organization" : "myorg",
+	  "applicationName" : "myapp",
+	  "count" : 1
+	}
+	
+Compare the preceding example with the following for another kind of query. Imagine the following request string, where the query string is asking for only the values of two of the entity’s properties (username and name):
+
+	/users?ql=select username,name where name=’Gladys Kravitz’
+	
+In the response JSON from this query, the return value is specified as the property of the list item -- here, an array containing only the values of the properties the query asked for, in the order they were requested (username first, then name).
+
+	{
+	  "action" : "get",
+	  "application" : "8272c9b0-d86a-11e2-92e2-cdf1ce04c1c0",
+	  "params" : {
+	    "ql" : [ "select username,name where name='Gladys Kravitz'" ]
+	  },
+	  "path" : "/users",
+	  "uri" : "http://api.usergrid.com/myorg/myapp/users",
+	  "list" : [ [ "gladys", "Gladys Kravitz" ] ],
+	  "timestamp" : 1374697463190,
+	  "duration" : 25,
+	  "organization" : "myorg",
+	  "applicationName" : "myapp",
+	  "count" : 1
+	}
+	
+	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/data-storage/collections.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-storage/collections.txt b/content/docs/_sources/data-storage/collections.txt
new file mode 100644
index 0000000..c072104
--- /dev/null
+++ b/content/docs/_sources/data-storage/collections.txt
@@ -0,0 +1,254 @@
+# Collections
+
+## Creating Collections
+
+This article describes how to create collections in Advanced 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.
+
+__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 for details.
+
+### Creating a collection
+
+The following example shows how to create an empty collection. Alternatively, you can create a collection simply by creating a new entity with a 'type' property that corresponds to the collection you wish to create. For more on creating entities, see Creating Custom Data Entities
+
+### Request Syntax
+
+    curl -X POST https://api.usergrid.com/<org>/<app>/<collection_name>
+
+Parameters
+
+Parameter	    Description
+---------       -----------
+org	            Organization UUID or organization name
+app	            Application UUID or application name
+collection name	Name of the collection to create. 
+
+If the provided value is not a plural word, Usergrid will pluralize it. For example, providing 'item' will create a collection named 'items' but providing 'items' will not create 'itemses'.
+
+### Example Request/Response
+
+Request:
+
+    curl -X POST "https://api.usergrid.com/your-org/your-app/item"
+
+Response:
+
+    {
+      "action" : "post",
+      "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+      "params" : { },
+      "path" : "/items",
+      "uri" : "http://api.usergrid.com/your-org/your-app/items",
+      "entities" : [ ],
+      "timestamp" : 1378857079220,
+      "duration" : 31,
+      "organization" : "your-org",
+      "applicationName" : "your-app"
+    }
+  
+## Retrieving Collections
+
+This article describes how to retrieve all of the entities in a collection.
+
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">
By default, the Usergrid API returns 10 entities per request. For collections with more than 10 entities, use the returned 'cursor' property to retrieve the next 10 entities in the result set. You may also use the LIMIT parameter in a query string to increase the number of results returned. For more information on using cursors, see [Query Parameters](../data-queries/query-parameters.html).</p></div>
+
+__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 for details.
+
+### Retrieving sets of entities from a collection
+
+### Request Syntax
+
+    curl -X GET https://api.usergrid.com/<org>/<app>/<collection>
+    
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or organization name
+app	        Application UUID or application name
+collection	Collection UUID or collection name
+
+### Example Request/Response
+
+Request:
+
+    curl -X GET "https://api.usergrid.com/your-org/your-app/items"
+
+Response:
+
+    {
+          "action" : "get",
+          "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+          "params" : { },
+          "path" : "/items",
+          "uri" : "http://api.usergrid.com/your-org/your-app/items",
+          "entities" : [ {
+                "uuid" : "5bb76bca-1657-11e3-903f-9ff6c621a7a4",
+                "type" : "item",
+                "name" : "milk",
+                "created" : 1378405020796,
+                "modified" : 1378405020796,
+                "metadata" : {
+                      "path" : "/items/5bb76bca-1657-11e3-903f-9ff6c621a7a4"
+                },
+                "name" : "milk",
+                "price" : "3.25"
+          }, {
+            "uuid" : "1a9356ba-1682-11e3-a72a-81581bbaf055",
+            "type" : "item",
+            "name" : "bread",
+            "created" : 1378423379867,
+            "modified" : 1378423379867,
+            "metadata" : {
+                  "path" : "/items/1a9356ba-1682-11e3-a72a-81581bbaf055"
+            },
+            "name" : "bread",
+            "price" : "2.50"
+          } ],
+          "timestamp" : 1378426821261,
+          "duration" : 35,
+          "organization" : "your-org",
+          "applicationName" : "your-app",
+          "count" : 2
+    }   
+    
+## Updating Collections
+
+This article describes how to perform batch updates on all entities in a collection. Batch updates require the use of a query string in the request, which can either specify all entities in the collection or a subset of entities for the update to be performed on. For more information on queries, see Querying your data.
+
+__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 for details.
+
+### Batch updating entities in a collection
+
+### Request Syntax
+
+    curl -X PUT https://api.usergrid.com/<org>/<app>/<collection>/?ql= -d {<property>}
+
+Note the empty query string (ql=) appended to the URL.
+
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or organization name
+app	        Application UUID or application name
+collection	Collection UUID or collection name property	
+
+An entity property to be updated, formatted as a key-value pair. For example:
+
+    {"property_1":"value_1", "property_2":"value_2",...}
+
+### Example Request/Response
+
+Request:
+
+    curl -X PUT https://api.usergrid.com/your-org/your-app/items/?ql= -d '{"availability":"in-stock"}'
+
+Note the empty ?ql= query string.
+
+Response:
+
+    {
+      "action" : "put",
+      "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+      "params" : {
+        "ql" : [ "" ]
+      },
+      "path" : "/items",
+      "uri" : "http://api.usergrid.com/your-org/your-app/items",
+      "entities" : [ {
+        "uuid" : "31847b9a-1a62-11e3-be04-8d05e96f700d",
+        "type" : "item",
+        "name" : "milk",
+        "price" : "3.25",
+        "availability" : "in-stock"
+        "created" : 1378849479113,
+        "modified" : 1378849567301,
+        "name" : "milk",
+      }, {
+        "uuid" : "3192ac6a-1a62-11e3-a24f-496ca1d42ce7",
+        "type" : "item",
+        "name" : "bread",
+        "price" : "4.00",
+        "availability" : "in-stock"
+        "created" : 1378849479206,
+        "modified" : 1378849567351,
+        "name" : "bread",
+      } ],
+      "timestamp" : 1378849567280,
+      "duration" : 207,
+      "organization" : "your-org",
+      "applicationName" : "your-app"
+    }
+   
+## Deleting Collections
+This article describes how to batch delete entities in a collection. Batch deletes require the use of a query string in the request, which specifies a subset of entities to be deleted. For more information on queries, see Querying your data.
+
+Currently, collections cannot be deleted; however, you can delete all of the entities from a collection.
+
+__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 for details.
+
+### Batch deleting entities in a collection
+
+### Request Syntax
+
+    curl -X DELETE https://api.usergrid.com/<org>/<app>/<collection>/?ql=<query>
+    
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or organization name
+app	        Application UUID or application name
+collection	Collection UUID or collection name
+query	    A query string that specifies the subset of entities to delete 
+
+(for more information on queries, see Querying your data)
+
+### Example Request/Response
+
+The following example will delete the first 5 entities in a collection.
+
+Request:
+
+    curl -X DELETE https://api.usergrid.com/your-org/your-app/items/?ql="limit=5"
+    
+Response:
+
+    {
+      "action" : "delete",
+      "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+      "params" : {
+        "ql" : [ "" ]
+      },
+      "path" : "/items",
+      "uri" : "http://api.usergrid.com/your-org/your-app/items",
+      "entities" : [ {
+        "uuid" : "53fe3700-0abe-11e3-b1f7-1bd100b8059e",
+        "type" : "item",
+        "name" : "milk",
+        "price" : "3.25",
+        "created" : 1377129832047,
+        "modified" : 1377129832047,
+        "metadata" : {
+          "path" : "/items/53fe3700-0abe-11e3-b1f7-1bd100b8059e"
+        },
+        "name" : "milk"
+      }, {
+        "uuid" : "5ae1fa7a-0abe-11e3-89ab-6be0003c809b",
+        "type" : "item",
+        "name" : "bread",
+        "price" : "4.00",
+        "created" : 1377129843607,
+        "modified" : 1377129843607,
+        "metadata" : {
+          "path" : "/items/5ae1fa7a-0abe-11e3-89ab-6be0003c809b"
+        },
+        "name" : "bread"
+      } ],
+      "timestamp" : 1378848117272,
+      "duration" : 12275,
+      "organization" : "your-org",
+      "applicationName" : "your-app"
+    }
+    
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/data-storage/data-store-dbms.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-storage/data-store-dbms.txt b/content/docs/_sources/data-storage/data-store-dbms.txt
new file mode 100644
index 0000000..539cca6
--- /dev/null
+++ b/content/docs/_sources/data-storage/data-store-dbms.txt
@@ -0,0 +1,109 @@
+# The Usergrid Data Store
+
+The Usergrid data store is backed by Cassandra, an open source distributed DBMS. Cassandra isn’t a relational database system (RDBMS), and is sometimes placed in the category of “NoSQL” or “schema-less” databases. 
+
+<!-- workaround a Sphinx bug -->
+<div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">
+Usergrid is not a relational database. Optimizing for performance on a non-relational database like Cassandra differs a bit from relational databases. For more information, see Optimizing access to your Usergrid data store.</p> </div>
+
+
+Cassandra is specifically designed to support applications that need flexibility and high scalability, particularly web and mobile applications. Usergrid client applications write and read data formatted as JavaScript Object Notation (JSON). (Usergrid provides SDKs through which client apps can do much of this work in their native language. For more information, see Usergrid SDKs.)
+
+With Cassandra as the underlying DBMS, apps benefit from:
+
+Fast writes to the data store.
+* A distributed architecture that means no single point of failure.
+* Flexibility in data model design. You aren't constrained by a schema.
+* Linear scalability.
+
+If you have experience with relational databases and are unfamiliar with "NoSQL" databases, the following table might be a helpful start. It maps the high-level concepts of an RDBMS’s data model both to Cassandra’s and to the Usergrid, which is backed by Cassandra.
+
+<table class="usergrid-table">
+<tr>
+    <td></td>
+    <td>RDBMS</td>
+    <td>Cassandra</td>
+    <td>Usergrid</td>
+</tr>
+<tr>
+    <td>Each tuple is modeled as</td>
+    <td>A row.</td>
+    <td>A row.</td>
+    <td>An entity. Written and retrieved as JSON, an entity contains values for all of its properties in the way a row has values for columns.</td>
+</tr>
+<tr>
+    <td>Each data attribute is modeled as</td>
+    <td>A column.</td>
+    <td>A column. Many thousands of columns are supported.</td>
+    <td>A entity property. An entity has a default set of properties, including the entity’s UUID. You can add many more to support your application.</td>
+</tr>
+<tr>
+    <td>Each group of attributes is modeled as</td>
+    <td>A table.</td>
+    <td>A column family. Unlike rows in tables, rows in a column family can have differing numbers of columns. Because you’re not using a schema to define the model, you can update the column list for a row at any time.</td>
+    <td>An entity collection. As with its underlying Cassandra column family, a collection can have entities with differing numbers of properties. In other words, just because one entity has an authorId property doesn’t mean that other entities in its collection need to.</td>
+</tr>
+</table>
+
+The following examples from a product database provide simple illustrations of these differences.
+
+An RDBMS table has a schema-defined set of columns per row.
+
+.. image:: rdbms.png
+
+A Cassandra column family includes rows that can have differing column sets.
+
+.. image:: cassandra.png
+   
+In the JSON from the Usergrid application, the products are represented as entities. Note that each entity in the entities array below has a slightly different set of properties, like the columns in a Cassandra column family.
+
+    { 
+        "action" : "get", 
+        "application" : "<app_uuid>", 
+        "params" : {}, 
+        "path" : "/products", 
+        "uri" : "https://api.usergrid.com/my_org/my_app/products", 
+        "entities" : [ { 
+            "uuid" : "<product_uuid>", 
+            "type" : "product", 
+            "created" : 1395410098517, 
+            "modified" : 1395410098517, 
+            "image" : "http://path.jpg", 
+            "metadata" : { 
+                "path" : "/products/<product_uuid>" 
+            }, 
+            "name" : "Bouncy Castle", 
+            "sku" : "35450349822" 
+        }, 
+        {
+            "uuid" : "<product_uuid>", 
+            "type" : "product", 
+            "created" : 1395409669686, 
+            "modified" : 1395409669686, 
+            "image" : "http://path.jpg", 
+            "metadata" : { 
+                "path" : "/products/<product_uuid>" 
+            }, 
+            "description" : "It makes coffee.", 
+            "name" : "Coffee Maker", 
+            "sku" : "60723023589" 
+        }, 
+        { 
+            "uuid" : "<product_uuid>", 
+            "type" : "product",
+            "created" : 1395407700578, 
+            "modified" : 1395407700578, 
+            "metadata" : { 
+                "path" : "/products/<product_uuid>" 
+            }, 
+            "name" : "Air Mattress", 
+            "sku" : "53045985365" 
+        }],
+        "timestamp" : 1396290037640, 
+        "duration" : 91, 
+        "organization" : "my_org", 
+        "applicationName" : "my_app", 
+        "count" : 3 
+    }
+    
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a92ab09/content/docs/_sources/data-storage/entities.txt
----------------------------------------------------------------------
diff --git a/content/docs/_sources/data-storage/entities.txt b/content/docs/_sources/data-storage/entities.txt
new file mode 100644
index 0000000..5a70b18
--- /dev/null
+++ b/content/docs/_sources/data-storage/entities.txt
@@ -0,0 +1,512 @@
+# Entities
+
+## Creating Custom Data Entities
+This article describes how to create custom data entities and entity properties. Entity types correspond to the name of collection to which they are posted. For example, if you create a new custom "dog" entity, a "dogs" collection will be created if one did not already exist. If a "dogs" collection already exists, the new "dog" entity will be saved in it. All user-defined properties are indexed, and strings that contain multiple words are keyword-indexed.
+
+The methods cited in this article should be used to create custom data entities. If you are using one of the Usergrid SDKs, use one of the entity type-specific SDK methods to create default data entities.
+
+__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 for details.
+
+### Creating a custom entity
+When a new entity is created, Usergrid will automatically create a corresponding collection if one does not already exist. The collection will automatically be named with the plural form of the entity type. For example, creating a custom entity of type 'item' will automatically create a collection named 'items' in which all future 'item' entities will be saved.
+
+### Request Syntax
+
+    curl -X POST https://api.usergrid.com/<org>/<app>/<entity_type> -d 'json_object'
+
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or organization name
+app	        Application UUID or application name
+entity_type	Entity type to create. 
+json_object JSON representation of entity properties
+
+(For a full list of default properties, see Default Data Entity Types)
+
+Usergrid will create a corresponding collection if one does not already exist. To add an entity to an existing collections, use the pluralized collection name for entity_type.
+
+### Example Request/Response
+
+Request:
+
+    curl -X POST "https://api.usergrid.com/your-org/your-app/item" -d '{"name":"milk", "price":"3.25"}'
+    
+Response:
+
+    { 
+        "action" : "post", 
+        "application" : "4a1edb70-d7a8-11e2-9ce3-f315e5aa568a", 
+        "params" : { }, 
+        "path" : "/items", "uri" : "http://api.usergrid.com/my-org/my-app/items", 
+        "entities" : [ { 
+            "uuid" : "83e9b7ea-e8f5-11e2-84df-e94123890c7a", 
+            "type" : "item", 
+            "name" : "milk", 
+            "created" : 1373415195230, 
+            "modified" : 1373415195230, 
+            "metadata" : { 
+
+                "path" : "/items/83e9b7ea-e8f5-11e2-84df-e94123890c7a" 
+            }, 
+            "name" : "milk", 
+            "price" : "3.25"
+        } ], 
+        "timestamp" : 1373415195225, 
+        "duration" : 635, 
+        "organization" : "my-org", 
+        "applicationName" : "my-app" 
+    }
+    
+## Creating multiple custom entities
+
+### Request Syntax
+
+    curl -X POST https://api.usergrid.com/<org>/<app>/<entity_type>/ -d 'json_array'
+    
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or name
+app	        Application UUID or name
+entity_type	Custom entity type to create. 
+json_array  JSON array of entities to be created.
+
+Usergrid will create a corresponding collection if one does not already exist. To add an entity to an existing collections, use the collection name or collection UUID in place of the entity type.
+
+### Example Request/Response
+
+Request:
+
+    curl -X POST "https://api.usergrid.com/your-org/your-app/item" -d '[{"name":"milk", "price":"3.25"}, {"name":"bread", "price":"2.50"}]'
+    
+Response:
+
+    {
+        "action" : "post",
+        "application" : "f34f4222-a166-11e2-a7f7-02e9sjwsf3d0",
+        "params" : { },
+        "path" : "/items",
+        "uri" : "http://api.usergrid.com/your-org/your-app/items",
+        "entities" : [ {
+            "uuid" : "f3a8061a-ef0b-11e2-9e92-5f4a65c16193",
+            "type" : "item",
+            "name" : "milk",
+            "price" : "3.25",
+            "created" : 1374084538609,
+            "modified" : 1374084538609,
+            "metadata" : {
+                "path" : "/multis/f3a8061a-ef0b-11e2-9e92-5f4a65c16193"
+            },
+            "name" : "milk"
+        }, {
+            "uuid" : "f3be262a-ef0b-11e2-a51b-6715d5ef47a6",
+            "type" : "item",
+            "name" : "bread",
+            "price" : "2.50",
+            "created" : 1374084538754,
+            "modified" : 1374084538754,
+            "metadata" : {
+                "path" : "/items/f3be262a-ef0b-11e2-a51b-6715d5ef47a6"
+            },
+            "name" : "bread"
+        } ],
+        "timestamp" : 1374084538584,
+        "duration" : 388,
+        "organization" : "your-org",
+        "applicationName" : "your-app"
+    }
+
+### Creating an entity with sub-properties
+
+Any valid JSON object can be stored in an entity, regardless of the level of complexity, including sub-properties. For example, suppose you have an 'items' collection that contains an entity named 'milk'. You might store the different varieties of milk as sub-properties of a 'varieties' property:
+
+    {
+        "type" : "item"
+        "name" : "milk"
+        "varieties" : [ {
+            "name" : "1%",
+            "price" : "3.25",
+            "sku" : "0393847575533445"
+        }, {
+            "name" : "whole",
+            "price" : "3.85",
+            "sku" : "0393394956788445"
+        }, {
+            "name" : "skim",
+            "price" : "4.00",
+            "sku" : "0390299933488445"		
+        } ]
+    }		
+	
+### Updating sub-properties
+
+An array of sub-properties is treated as a single object. This means that sub-properties cannot be updated atomically. All sub-properties of a given property must be updated as a set.
+For more on updating an existing sub-property, see Updating Data Entities.
+
+Example Request/Response
+
+    Request:
+    //Note the use of square brackets for specifying multiple nested objects
+    curl -X POST "https://api.usergrid.com/your-org/your-app/items" -d '{"varieties":[{"name":"1%","price" : "3.25", "sku" : "0393847575533445"},{"name" : "whole", "price" : "3.85", "sku" : "0393394956788445"}, {"name" : "skim", "price" : "4.00", "sku" : "0390299933488445"}]}'
+    Response:
+    { 
+        "action" : "post", 
+        "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0", 
+        "params" : { }, 
+        "path" : "/items", 
+        "uri" : "http://api.usergrid.com/your-org/your-app/items", 
+        "entities" : [ { 
+            "uuid" : "0d7cf92a-effb-11e2-917d-c5e707256e71", 
+            "type" : "item", 
+            "name" : "milk", 
+            "created" : 1374187231666, 
+            "modified" : 1374187231666, 
+            "metadata" : { 
+                "path" : "/items/0d7cf92a-effb-11e2-917d-c5e707256e71" 
+            }, 
+            "name" : "milk", 
+            "varieties" : [ { 
+                "name" : "1%", 
+                "price" : "3.25", 
+                "SKU" : "0393847575533445" 
+            }, { 
+                "name" : "whole", 
+                "price" : "3.85", 
+                "SKU" : "0393394956788445" 
+            }, { 
+                "name" : "skim", 
+                "price" : "4.00", 
+                "SKU" : "0390299933488445" 
+            } ] 
+        } ], 
+        "timestamp" : 1374187450826, 
+        "duration" : 50, 
+        "organization" : "your-org", 
+        "applicationName" : "your-app" 
+    }
+
+.. -----------------------------------------------------------------------------
+
+## Retrieving Data Entities
+This article describes how to retrieve entities from your account.
+
+__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 for details.
+
+With the exception of the user entity, all data entities can be retrieved by using their UUID or a 'name' property. The user entity can be retrieved by UUID or the 'username' property. The value for the 'name' or 'username' property must be unique.
+
+### Retrieving an entity
+
+### Request Syntax
+
+    curl -X GET https://api.usergrid.com/<org>/<app>/<collection>/<entity>
+
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or organization name
+app	        Application UUID or application name
+collection	Collection UUID or collection name
+entity	    Entity UUID or entity name
+
+### Example Request/Response
+
+Request:
+
+Retrieve by UUID:
+
+    curl -X GET "https://api.usergrid.com/your-org/your-app/items/da4a50dc-38dc-11e2-b2e4-02e81adcf3d0"
+    
+Retrieve by 'name' property:
+
+    curl -X GET "https://api.usergrid.com/your-org/your-app/items/milk"
+    
+Response:
+
+    {
+        "action" : "get",
+        "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+        "params" : { },
+        "path" : "/items",
+        "uri" : "http://api.usergrid.com/amuramoto/sandbox/items",
+        "entities" : [ {
+            "uuid" : "5bb76bca-1657-11e3-903f-9ff6c621a7a4",
+            "type" : "item",
+            "name" : "milk",
+            "created" : 1378405020796,
+            "modified" : 1378405020796,
+            "metadata" : {
+                  "path" : "/items/5bb76bca-1657-11e3-903f-9ff6c621a7a4"
+            },
+            "name" : "milk",
+            "price" : "3.25"
+        } ],
+        "timestamp" : 1378405025763,
+        "duration" : 31,
+        "organization" : "amuramoto",
+        "applicationName" : "sandbox"
+    }
+
+### Retrieving multiple entities
+
+This example describes how to retrieve multiple entities by UUID. You can also retrieve a set of entities by using a query string. For more information on querying your data, see Querying your data.
+
+### Request Syntax
+
+    curl -X GET https://api.usergrid.com/<org_id>/<app_id>/<collection>?ql= uuid = <entity_uuid> OR uuid = <entity_uuid>; ...
+    
+Parameters
+
+Parameter	Description
+---------   -----------
+org_id	    Organization UUID or organization name
+app_id	    Application UUID or application name
+collection	Collection UUID or collection name
+query	    A url-encoded query string of entity properties to be matched.
+ 
+The query must be in Usergrid Query Language, for example:
+
+    ?ql=uuid="<entity_uuid>"" OR name="<entity_name>" OR...
+    
+You may also specify the following for certain entity types:
+
+User entities: username = <entity_username>
+
+All other entities except groups: name = <entity_name>
+
+### Example Request/Response
+
+Request:
+
+    //note the url-encoded query string
+    curl -X GET "https://api.usergrid.com/your-org/your-app/items?ql=name%3D'milk'%20OR%20UUID%3D1a9356ba-1682-11e3-a72a-81581bbaf055&limit="				
+
+Note: The query parameter of the request must be url encoded for curl requests
+
+Response:
+
+    {
+          "action" : "get",
+          "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+          "params" : {
+                "ql" : [ "name='milk' OR UUID=1a9356ba-1682-11e3-a72a-81581bbaf055" ]
+          },
+          "path" : "/items",
+          "uri" : "http://api.usergrid.com/your-org/your-app/items",
+          "entities" : [ {
+                "uuid" : "5bb76bca-1657-11e3-903f-9ff6c621a7a4",
+                "type" : "item",
+                "name" : "milk",
+                "created" : 1378405020796,
+                "modified" : 1378405020796,
+                "metadata" : {
+                      "path" : "/items/5bb76bca-1657-11e3-903f-9ff6c621a7a4"
+            },
+                "name" : "milk",
+                "price" : "3.25"
+          }, {
+            "uuid" : "1a9356ba-1682-11e3-a72a-81581bbaf055",
+            "type" : "item",
+            "name" : "bread",
+            "created" : 1378423379867,
+            "modified" : 1378423379867,
+            "metadata" : {
+                  "path" : "/items/1a9356ba-1682-11e3-a72a-81581bbaf055"
+            },
+                "name" : "bread",
+                "price" : "2.50"
+          } ],
+          "timestamp" : 1378423793729,
+          "duration" : 63,
+          "organization" : "your-org",
+          "applicationName" : "your-app",
+          "count" : 2
+    }
+ 
+ 
+.. --------------------------------------------------------------------------------
+
+## Updating Data Entities
+
+This article describes how to update entities in your account.
+
+__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 for details.
+
+### Updating an entity
+One or more properties can be updated with a single PUT request. For information on updating sub-properties, see Updating sub-properties below.
+
+### Request Syntax
+
+    curl -X PUT https://api.usergrid.com/<org>/<app>/<collection>/<entity> -d {<property>}
+    
+Parameters
+
+Parameter	Description
+---------   -----------
+org_id	    Organization UUID or organization name
+app_id	    Application UUID or application name
+collection	Name of the collection containing the entity to be updated
+uuid|name	UUID or name of the data entity to be updated
+json_object JSON object with a field for each property to be updated
+
+An entity property to be updated, formatted as a key-value pair. For example:
+
+    {"property_1":"value_1", "property_2":"value_2",...}
+
+### Example Request/Response
+
+Request:
+
+    curl -X PUT https://api.usergrid.com/your-org/your-app/items/milk -d '{"price":"4.00", "availability":"in-stock"}'
+
+Response:
+
+    {
+      "action" : "put",
+      "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+      "params" : { },
+      "path" : "/items",
+      "uri" : "http://api.usergrid.com/your-org/your-app/items",
+      "entities" : [ {
+        "uuid" : "5bb76bca-1657-11e3-903f-9ff6c621a7a4",
+        "type" : "item",
+        "name" : "milk",
+        "created" : 1378405020796,
+        "modified" : 1378505705077,
+        "availability" : "in-stock",
+        "metadata" : {
+          "path" : "/items/5bb76bca-1657-11e3-903f-9ff6c621a7a4"
+        },
+        "name" : "milk",
+        "price" : "4.00"
+      } ],
+      "timestamp" : 1378505705050,
+      "duration" : 87,
+      "organization" : "your-org",
+      "applicationName" : "your-app"
+    }
+
+
+### Updating a sub-property
+
+Data entities may contain sets of sub-properties as nested JSON objects. Unlike normal entity properties, however, sub-properties cannot be updated individually. Updating a nested object will cause all sub-properties within it to be overwritten.
+
+For example, if you have a data entity with the following nested object:
+
+### Request Syntax
+
+    curl -X PUT https://api.usergrid.com/<org_id>/<app_id>/<collection>/<uuid|name> -d '{<property> : [{<sub_property>}, {<sub_property>}...]}'
+
+Parameters
+
+Parameter	Description
+---------   -----------
+org_id	    Organization UUID or organization name
+app_id	    Application UUID or application name
+collection	Name of the collection containing the entity to be updated
+uuid|name	UUID or name of the data entity to be updated
+json_object JSON object with a field for each property to be updated
+
+### Example Request/Response
+
+Request:
+
+    curl -X PUT https://api.usergrid.com/your-org/your-app/items/milk -d '{"varieties":[{"name":"1%","price":"3.25"},{"name":"whole","price":"4.00"}]}'
+
+Response:
+
+    {
+      "action" : "put",
+      "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+      "params" : { },
+      "path" : "/items",
+      "uri" : "http://api.usergrid.com/your-org/your-app/items",
+      "entities" : [ {
+        "uuid" : "5bb76bca-1657-11e3-903f-9ff6c621a7a4",
+        "type" : "item",
+        "name" : "milk",
+        "created" : 1378405020796,
+        "modified" : 1378761459069,
+        "availability" : "in-stock",
+        "metadata" : {
+          "path" : "/items/5bb76bca-1657-11e3-903f-9ff6c621a7a4"
+        },
+        "name" : "milk",
+        "uri" : "http://api.usergrid.com/your-org/your-app/items/5bb76bca-1657-11e3-903f-9ff6c621a7a4",
+        "varieties" : [ {
+          "name" : "1%",
+          "price" : "3.25"
+        }, {
+          "name" : "whole",
+          "price" : "4.00"
+        } ]
+      } ],
+      "timestamp" : 1378761459047,
+      "duration" : 62,
+      "organization" : "your-org",
+      "applicationName" : "your-app"
+    }
+ 
+## Deleting Data Entities
+
+This article describes how to delete data entities.
+
+__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 for details.
+
+### Deleting an entity
+
+### Request Syntax
+
+    curl -X DELETE https://api.usergrid.com/<org>/<app>/<collection>/<entity>
+    
+Parameters
+
+Parameter	Description
+---------   -----------
+org	        Organization UUID or organization name
+app	        Application UUID or application name
+collection	Collection UUID or collection name
+entity	    Entity UUID or entity name
+
+### Example Request/Response
+ 
+Request:
+ 
+Delete by UUID:
+ 
+    curl -X DELETE "https://api.usergrid.com/your-org/your-app/items/da4a50dc-38dc-11e2-b2e4-02e81adcf3d0" 
+    
+Delete by 'name' property:
+ 
+     curl -X DELETE "https://api.usergrid.com/your-org/your-app/items/milk"
+ 
+Response:
+ 
+     {
+       "action" : "delete",
+       "application" : "f34f4222-a166-11e2-a7f7-02e81adcf3d0",
+       "params" : { },
+       "path" : "/items",
+       "uri" : "http://api.usergrid.com/your-org/your-app/items",
+       "entities" : [ {
+         "uuid" : "328fe64a-19a0-11e3-8a2a-ebc6f49d1fc4",
+         "type" : "item",
+         "name" : "milk",
+         "created" : 1378766158500,
+         "modified" : 1378766158500,
+         "metadata" : {
+           "path" : "/items/328fe64a-19a0-11e3-8a2a-ebc6f49d1fc4"
+         },
+         "name" : "milk",
+         "price" : "3.25"
+       } ],
+       "timestamp" : 1378766172016,
+       "duration" : 324,
+       "organization" : "your-org",
+       "applicationName" : "your-app"
+     }
+  
+ 
\ No newline at end of file