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/05 16:56:12 UTC

[26/51] [abbrv] [partial] incubator-usergrid git commit: Switch over to new docs for the website.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2a55601f/content/docs/data-queries/querying-your-data.html
----------------------------------------------------------------------
diff --git a/content/docs/data-queries/querying-your-data.html b/content/docs/data-queries/querying-your-data.html
new file mode 100644
index 0000000..6a618a1
--- /dev/null
+++ b/content/docs/data-queries/querying-your-data.html
@@ -0,0 +1,453 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Querying your data &mdash; Apache Usergrid 1.0 documentation</title>
+  
+
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  
+  
+    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  
+
+  
+
+  
+    <link rel="top" title="Apache Usergrid 1.0 documentation" href="../index.html"/>
+        <link rel="next" title="Query parameters &amp; clauses" href="query-parameters.html"/>
+        <link rel="prev" title="Entities" href="../data-storage/entities.html"/> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-nav-search">
+        
+
+        
+          <a href="../index.html" class="icon icon-home"> Apache Usergrid
+        
+
+        
+        </a>
+
+        
+          
+          
+            <div class="version">
+              1.0
+            </div>
+          
+        
+
+        
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+        
+      </div>
+
+      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+        
+          
+          
+              <p class="caption"><span class="caption-text">Introduction</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../introduction/usergrid-features.html">Usergrid Features</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../introduction/data-model.html">Usergrid Data model</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../introduction/async-vs-sync.html">Async vs. sync calls</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Getting Started</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../getting-started/creating-a-new-application.html">Creating a new application</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting-started/creating-account.html">Creating an Usergrid Account</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting-started/using-a-sandbox-app.html">Using a Sandbox Application</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting-started/using-the-api.html">Using the API</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Data Storage</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../data-storage/data-store-dbms.html">The Usergrid Data Store</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../data-storage/optimizing-access.html">Data Store Best Practices</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../data-storage/collections.html">Collections</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../data-storage/entities.html">Entities</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Data Queries</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="current reference internal" href="">Querying your data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#basic-query-usage">Basic query usage</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#request-syntax">Request Syntax</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#retrieving-values-for-multiple-properties">Retrieving values for multiple properties</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#response-syntax">Response syntax</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="query-parameters.html">Query parameters &amp; clauses</a></li>
+<li class="toctree-l1"><a class="reference internal" href="operators-and-types.html">Query operators &amp; data types</a></li>
+<li class="toctree-l1"><a class="reference internal" href="advanced-query-usage.html">Advanced query usage</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Entity Connections</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../entity-connections/connecting-entities.html">Connecting entities</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../entity-connections/retrieving-entities.html">Retrieving connections</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../entity-connections/disconnecting-entities.html">Disconnecting entities</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Security &amp; Authentication</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/app-security.html">Security &amp; token authentication</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/using-permissions.html">Using permissions</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/authenticating-users-and-application-clients.html">Authenticating users &amp; app clients</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/user-authentication-types.html">Authentication levels</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/changing-token-time-live-ttl.html">Changing token expiration (time-to-live)</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/authenticating-api-requests.html">Authenticating API requests</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/revoking-tokens-logout.html">Revoking tokens (logout)</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/facebook-sign.html">Facebook sign in</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/securing-your-app.html">Security best practices</a></li>
+</ul>
+<p class="caption"><span class="caption-text">User Management &amp; Social Graph</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/user-management.html">User management &amp; social graph</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/working-user-data.html">Working with User Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/group.html">Working with group data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/activity.html">Activity</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/user-connections.html">Social Graph Connections</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/user-connections.html#creating-other-connections">Creating other connections</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/messagee-example.html">App Example - Messagee</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Geo-location</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../geolocation/geolocation.html">Geolocating your Entities</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Assets &amp; Files</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../asset-and-files/uploading-assets.html">Uploading assets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../asset-and-files/retrieving-assets.html">Retrieving assets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../asset-and-files/folders.html">Folders</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Counters &amp; Events</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/events-and-counters.html">Counters &amp; events</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html">Creating &amp; incrementing counters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html#decrementing-resetting-counters">Decrementing/resetting counters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html#using-counters-hierarchically">Using counters hierarchically</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/retrieving-counters.html">Retrieving counters</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Organizations &amp; Applications</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/managing.html">Organization &amp; application management</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/organization.html">Organization</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/application.html">Application</a></li>
+</ul>
+<p class="caption"><span class="caption-text">API Reference</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../rest-endpoints/api-docs.html">Methods</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../rest-endpoints/api-docs.html#models">Models</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Client SDKs</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../sdks/tbd.html">COMING SOON...</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Installing the Stack</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../installation/ug1-deploy-to-tomcat.html">Usegrid 1: Deploying to Tomcat</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation/ug1-launcher-quick-start.html">Usegrid 1: Launcher Quick-start</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation/ug2-deploy-to-tomcat.html">Usergrid 2: Deploy to Tomcat</a></li>
+</ul>
+<p class="caption"><span class="caption-text">More about Usergrid</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../reference/presos-and-videos.html">Presentations &amp; Videos</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../reference/contribute-code.html">How to Contribute Code &amp; Docs</a></li>
+</ul>
+
+          
+        
+      </div>
+      &nbsp;
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+        <a href="../index.html">Apache Usergrid</a>
+      </nav>
+
+
+      
+      <div class="wy-nav-content">
+        <div class="rst-content">
+          <div role="navigation" aria-label="breadcrumbs navigation">
+  <ul class="wy-breadcrumbs">
+    <li><a href="../index.html">Docs</a> &raquo;</li>
+      
+    <li>Querying your data</li>
+      <li class="wy-breadcrumbs-aside">
+        
+          
+            <a href="../_sources/data-queries/querying-your-data.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+  </ul>
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="querying-your-data">
+<h1>Querying your data<a class="headerlink" href="#querying-your-data" title="Permalink to this headline">¶</a></h1>
+<p>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:&#8217;active&#8217;
+to get a list of your users that have active accounts.</p>
+<p>For information on more advanced query usage and syntax, see <a class="reference external" href="query-parameters.html">Query
+parameters &amp; clauses</a>.</p>
+<div class="admonition note"> <p class="first admonition-title"><p>Note</p>
+  </p> <p class="last">
+
+
+Query examples in this content are shown unencoded to make them easier<p>to read. Keep in mind that you might need to encode query strings if
+you&#8217;re sending them as part of URLs, such as when you&#8217;re executing them
+with the cURL tool.</p>
+</p></div><div class="section" id="basic-query-usage">
+<h2>Basic query usage<a class="headerlink" href="#basic-query-usage" title="Permalink to this headline">¶</a></h2>
+<p>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:&#8217;active&#8217;.</p>
+<div class="admonition note"> <p class="first admonition-title"><p>Note</p>
+  </p> <p class="last">
+
+
+Optimizing queries: As a best practice, you should include no more<p>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>
+</p></div><p>For more information, see our <a class="reference external" href="../data-store/data-storage-dbms.html">Usergrid DBMS
+overview</a> and <a class="reference external" href="../data-storage/optimizing-access">Data store best
+practices</a>.</p>
+<div class="section" id="request-syntax">
+<h3>Request Syntax<a class="headerlink" href="#request-syntax" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-python"><div class="highlight"><pre>https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/&lt;collection&gt;?ql=&lt;query_statement&gt;
+</pre></div>
+</div>
+<p>Note: Any values specified in the query statement should be enclosed in
+single-quotes.</p>
+<div class="highlight-python"><div class="highlight"><pre>https://api.usergrid.com/your-org/your-app/users?limit=5&amp;ql=select * where status = &#39;active&#39;
+</pre></div>
+</div>
+<p>Alternatively, when you use a statement that starts select * where you
+can omit the first part of the statement and abbreviate it this way:</p>
+<div class="highlight-python"><div class="highlight"><pre>https://api.usergrid.com/your-org/your-app/users?limit=5&amp;ql=status = &#39;active&#39;
+</pre></div>
+</div>
+</div>
+<div class="section" id="retrieving-values-for-multiple-properties">
+<h3>Retrieving values for multiple properties<a class="headerlink" href="#retrieving-values-for-multiple-properties" title="Permalink to this headline">¶</a></h3>
+<p>Your query can return multiple kinds of values &#8211; such as the values of
+multiple properties &#8211; by specifying the property names in your select
+statement as a comma-separated list.</p>
+<p>For example, the following request returns the address and phone number
+of users whose name is Gladys Kravitz:</p>
+<div class="highlight-python"><div class="highlight"><pre>/users?ql=select address,phone_number where name = &#39;Gladys Kravitz&#39;
+</pre></div>
+</div>
+</div>
+<div class="section" id="response-syntax">
+<h3>Response syntax<a class="headerlink" href="#response-syntax" title="Permalink to this headline">¶</a></h3>
+<p>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.</p>
+<p>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.</p>
+<p>For example, the following query for all entities of type user where the
+name property equals &#8216;Gladys Kravitz&#8217;:</p>
+<div class="highlight-python"><div class="highlight"><pre>/users?ql=select * where name = ‘Gladys Kravitz’
+</pre></div>
+</div>
+<p>will return the following response:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
+  <span class="s">&quot;action&quot;</span> <span class="p">:</span> <span class="s">&quot;get&quot;</span><span class="p">,</span>
+  <span class="s">&quot;application&quot;</span> <span class="p">:</span> <span class="s">&quot;8272c9b0-d86a-11e2-92e2-cdf1ce04c1c0&quot;</span><span class="p">,</span>
+  <span class="s">&quot;params&quot;</span> <span class="p">:</span> <span class="p">{</span>
+    <span class="s">&quot;ql&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="s">&quot;select * where name = &#39;Gladys Kravitz&#39;&quot;</span> <span class="p">]</span>
+  <span class="p">},</span>
+  <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/users&quot;</span><span class="p">,</span>
+  <span class="s">&quot;uri&quot;</span> <span class="p">:</span> <span class="s">&quot;http://api.usergrid.com/myorg/myapp/users&quot;</span><span class="p">,</span>
+  <span class="s">&quot;entities&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="p">{</span>
+    <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;d0d7d0ba-e97b-11e2-8cef-411c466c4f2c&quot;</span><span class="p">,</span>
+    <span class="s">&quot;type&quot;</span> <span class="p">:</span> <span class="s">&quot;user&quot;</span><span class="p">,</span>
+    <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;Gladys Kravitz&quot;</span><span class="p">,</span>
+    <span class="s">&quot;created&quot;</span> <span class="p">:</span> <span class="mi">1373472876859</span><span class="p">,</span>
+    <span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1373472876859</span><span class="p">,</span>
+    <span class="s">&quot;username&quot;</span> <span class="p">:</span> <span class="s">&quot;gladys&quot;</span><span class="p">,</span>
+    <span class="s">&quot;email&quot;</span> <span class="p">:</span> <span class="s">&quot;gladys@example.com&quot;</span><span class="p">,</span>
+    <span class="s">&quot;activated&quot;</span> <span class="p">:</span> <span class="n">true</span><span class="p">,</span>
+    <span class="s">&quot;picture&quot;</span> <span class="p">:</span> <span class="s">&quot;http://www.gravatar.com/avatar/20c57d4f41cf51f2db44165eb058b3b2&quot;</span><span class="p">,</span>
+    <span class="s">&quot;metadata&quot;</span> <span class="p">:</span> <span class="p">{</span>
+      <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c&quot;</span><span class="p">,</span>
+      <span class="s">&quot;sets&quot;</span> <span class="p">:</span> <span class="p">{</span>
+        <span class="s">&quot;rolenames&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/rolenames&quot;</span><span class="p">,</span>
+        <span class="s">&quot;permissions&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/permissions&quot;</span>
+      <span class="p">},</span>
+      <span class="s">&quot;connections&quot;</span> <span class="p">:</span> <span class="p">{</span>
+        <span class="s">&quot;firstname&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/firstname&quot;</span><span class="p">,</span>
+        <span class="s">&quot;lastname&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/lastname&quot;</span>
+      <span class="p">},</span>
+      <span class="s">&quot;collections&quot;</span> <span class="p">:</span> <span class="p">{</span>
+        <span class="s">&quot;activities&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/activities&quot;</span><span class="p">,</span>
+        <span class="s">&quot;users&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/users&quot;</span><span class="p">,</span>
+        <span class="s">&quot;feed&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/feed&quot;</span><span class="p">,</span>
+        <span class="s">&quot;groups&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/groups&quot;</span><span class="p">,</span>
+        <span class="s">&quot;roles&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/roles&quot;</span><span class="p">,</span>
+        <span class="s">&quot;following&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/following&quot;</span><span class="p">,</span>
+        <span class="s">&quot;followers&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d0d7d0ba-e97b-11e2-8cef-411c466c4f2c/followers&quot;</span>
+      <span class="p">}</span>
+    <span class="p">}</span>
+  <span class="p">}</span> <span class="p">],</span>
+  <span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1374694196061</span><span class="p">,</span>
+  <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">48</span><span class="p">,</span>
+  <span class="s">&quot;organization&quot;</span> <span class="p">:</span> <span class="s">&quot;myorg&quot;</span><span class="p">,</span>
+  <span class="s">&quot;applicationName&quot;</span> <span class="p">:</span> <span class="s">&quot;myapp&quot;</span><span class="p">,</span>
+  <span class="s">&quot;count&quot;</span> <span class="p">:</span> <span class="mi">1</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>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):</p>
+<div class="highlight-python"><div class="highlight"><pre>/users?ql=select username,name where name=’Gladys Kravitz’
+</pre></div>
+</div>
+<p>In the response JSON from this query, the return value is specified as
+the property of the list item &#8211; here, an array containing only the
+values of the properties the query asked for, in the order they were
+requested (username first, then name).</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
+  <span class="s">&quot;action&quot;</span> <span class="p">:</span> <span class="s">&quot;get&quot;</span><span class="p">,</span>
+  <span class="s">&quot;application&quot;</span> <span class="p">:</span> <span class="s">&quot;8272c9b0-d86a-11e2-92e2-cdf1ce04c1c0&quot;</span><span class="p">,</span>
+  <span class="s">&quot;params&quot;</span> <span class="p">:</span> <span class="p">{</span>
+    <span class="s">&quot;ql&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="s">&quot;select username,name where name=&#39;Gladys Kravitz&#39;&quot;</span> <span class="p">]</span>
+  <span class="p">},</span>
+  <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/users&quot;</span><span class="p">,</span>
+  <span class="s">&quot;uri&quot;</span> <span class="p">:</span> <span class="s">&quot;http://api.usergrid.com/myorg/myapp/users&quot;</span><span class="p">,</span>
+  <span class="s">&quot;list&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="p">[</span> <span class="s">&quot;gladys&quot;</span><span class="p">,</span> <span class="s">&quot;Gladys Kravitz&quot;</span> <span class="p">]</span> <span class="p">],</span>
+  <span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1374697463190</span><span class="p">,</span>
+  <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">25</span><span class="p">,</span>
+  <span class="s">&quot;organization&quot;</span> <span class="p">:</span> <span class="s">&quot;myorg&quot;</span><span class="p">,</span>
+  <span class="s">&quot;applicationName&quot;</span> <span class="p">:</span> <span class="s">&quot;myapp&quot;</span><span class="p">,</span>
+  <span class="s">&quot;count&quot;</span> <span class="p">:</span> <span class="mi">1</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+
+
+           </div>
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="query-parameters.html" class="btn btn-neutral float-right" title="Query parameters &amp; clauses" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="../data-storage/entities.html" class="btn btn-neutral" title="Entities" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2013-2015, Apache Usergrid.
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'1.0',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+
+  
+
+  
+  
+    <script type="text/javascript" src="../_static/js/theme.js"></script>
+  
+
+  
+  
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.StickyNav.enable();
+      });
+  </script>
+   
+
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2a55601f/content/docs/data-query-overview/index.html
----------------------------------------------------------------------
diff --git a/content/docs/data-query-overview/index.html b/content/docs/data-query-overview/index.html
deleted file mode 100644
index ca6c105..0000000
--- a/content/docs/data-query-overview/index.html
+++ /dev/null
@@ -1,293 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-    <meta charset="utf-8">
-    <title>Apache Usergrid (incubating) — Apache Usergrid data query overview</title>
-    <meta http-equiv="x-ua-compatible" content="ie=edge" />
-    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
-    <meta name="keywords" content="Apache Usergrid, Usergrid, BaaS, Backend-as-a-Service">
-    <meta name="description" content="An open-source Backend-as-a-Service stack for web & mobile applications, based on RESTful APIs." />
-    <meta property="og:title" content="Apache Usergrid" />
-    <meta property="og:description" content="An open-source Backend-as-a-Service stack for web & mobile applications, based on RESTful APIs." />
-    <!-- Loading Typekit -->
-    <script type="text/javascript" src="//use.typekit.net/ddl7izx.js"></script>
-    <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
-    <!-- Loading Bootstrap -->
-    <link href="/bootstrap/bootstrap.min.css" rel="stylesheet" type='text/css'>
-    <link href="/css/bootflat.css" rel="stylesheet" type='text/css'>
-    <link href="/css/usergrid-site.css" rel="stylesheet" type='text/css'>
-    <link href="https://fonts.googleapis.com/css?family=Open+Sans:200,400,500,300,600,800,700,400italic,600italic,700italic,800italic,300italic" rel="stylesheet" type="text/css">
-    <link href="/css/font-awesome.min.css" rel="stylesheet" type='text/css'>
-
-    
-
-    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
-    <!--[if lt IE 9]>
-      <script src="js/html5shiv.js"></script>
-      <script src="js/respond.min.js"></script>
-    <![endif]-->
-</head>
-<body>
-
-    <header class="navbar navbar-inverse navbar-fixed-top bf-docs-nav secondary" role="banner">
-    <div class="container">
-        <div class="navbar-header">
-            <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bf-navbar-collapse">
-                <span class="sr-only">Toggle navigation</span>
-                <span class="icon-bar"></span>
-                <span class="icon-bar"></span>
-                <span class="icon-bar"></span>
-            </button>
-        </div>
-        <a href="/" class="navbar-brand">
-                <img id="home-logo" src="/img/apache_usergrid_logo_white_small.png" />
-            </a>
-        <nav class="collapse navbar-collapse bf-navbar-collapse" role="navigation">
-            <ul class="nav navbar-nav navbar-right">
-                <li class=""><a href="/community/"><span class="icns icon-group"></span></a></li>
-                <li><a href="http://usergrid.readthedocs.org/" target="_blank"><span class="icns icon-book"></span></a></li>
-                <li><a href="http://github.com/apache/incubator-usergrid" target="_blank"><span class="icns icon-github-sign"></span></a></li>
-                <!--<li><a href="https://trello.com/b/exQmJIOn/usergrid" target="_blank"><span class="icns icon-trello"></span></a></li>-->
-                <li><a href="https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=23&view=planning&selectedIssue=USERGRID-362&epics=visible" target="_blank"><span class="icns icon-bug"></span></a></li>
-                <li><a href="http://stackoverflow.com/search?q=usergrid" target="_blank"><span class="icns icon-stackexchange"></span></a></li>
-                <li><a href="/community/#live"><span class="icns icon-comments"></span></a></li>
-                <!--<li><a href="https://groups.google.com/forum/#!forum/usergrid" target="_blank"><span class="icns icon-envelope"></span></a></li>-->
-                <li><a href="https://twitter.com/usergrid" target="_blank"><span class="icns icon-twitter"></span></a></li>
-                <li><a href="https://cwiki.apache.org/confluence/display/usergrid/" target="_blank"><span class="icns icon-wiki"></span></a></li>
-                <li><a href="/releases/"><span class="icns icon-releases"></span></a></li>
-            </ul>
-        </nav>
-    </div>
-    </header>
-
-
-
-<div class="container bf-docs-container">    
-    <div class="row">
-        <div class="col-md-3">
-            <div class="bf-sidebar hidden-print" role="complementary">
-                <ul class="nav nav-list">
-                    <li><a href="/docs/getting-up-and-running-locally/">Getting Up &amp; Running Locally</a></li>
-                    <li><a href="/docs/deploy-local/">Deploying to local Tomcat &amp; Cassandra</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/tree/master/ugc#usergrid-command-line-ugc"><code>ugc</code> — the Command-line Client</a></li>
-
-                    <li class="nav-header"><span>Concepts</span></li>
-                    <li>
-                        <a href="/docs/organizations-admins/">Organizations & Admins</a>
-                        <ul>
-                            <li>
-                                <a href="/docs/applications/">Applications</a>
-                                <ul>
-                                    <li><a href="/docs/roles-and-permissions/">Roles & Permissions</a></li>
-                                    <!--<li><a href="#">Queues</a></li>-->
-                                    <li><a href="/docs/events-and-counters/">Events & Counters</a></li>
-                                    <li><a href="/docs/relationships/">Relationships (Joins)</a></li>
-                                    <li>
-                                        <a href="/docs/collections">Collections</a>
-                                        <ul>
-                                            <li><a href="/docs/query-language/">Query Language</a></li>
-                                            <li><a href="/docs/users-devices/">Users & Devices</a></li>
-                                            <li><a href="/docs/groups/">Groups</a></li>
-                                            <li><a href="/docs/activities/">Activities</a></li>
-                                            <li><a href="/docs/assets/">Assets</a></li>
-                                        </ul>
-                                    </li>
-                                </ul>
-                            </li>
-                        </ul>
-                    </li>
-
-
-                    <li class="nav-header"><span>Usage</span></li>
-                    <!-- <li>REST API — Coming Soon</li> -->
-                    <li><a class="icns-apple" href="https://github.com/apache/incubator-usergrid/tree/master/sdks/ios">iOS SDK</a></li>
-                    <li><a class="icns-android" href="https://github.com/apache/incubator-usergrid/tree/master/sdks/android">Android SDK</a></li>
-                    <li><a class="icns-html5" href="">HTML5 / JavaScript SDK</a></li>
-                    <li><a class="icns-windows" href="https://github.com/apache/incubator-usergrid/tree/master/sdks/dotnet">Windows 8 / Windows Phone / .net SDK</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/tree/master/sdks/nodejs">Node.js module</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/tree/master/sdks/ruby">Ruby gem</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/tree/master/sdks/ruby-on-rails">Ruby on Rails gem</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/tree/master/sdks/php">PHP library</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/tree/master/sdks/java">Java library</a></li>
-
-                    <!--<li class="nav-header"><span>Internals</span></li>
-                    <li>Design & Goals — Coming Soon</li>
-                    <li>Java Architecture — Coming Soon</li>
-                    <li>Cassandra Schema — Coming Soon</li>-->
-
-                    <li class="nav-header"><span>Operations</span></li>
-                    <!--<li>Deploying — Coming Soon</li>-->
-                    <!-- <li>Monitoring — Coming Soon</li> -->
-                    <li><a href="/docs/upgrading/">Upgrading</a></li>
-                    <!-- <li>Security — Coming Soon</li> -->
-
-                    <li class="nav-header"><span>Presentations & Videos</span></li>
-                    <li><a href="/docs/presentations/">Presentations</a></li>
-                    <li><a href="/docs/videos/">Videos</a></li>
-
-                    <li class="nav-header"><span>We need your help!</span></li>
-                    <li><a href="/docs/contribute-code/">How to Contribute Code & Docs</a></li>
-                    <!--
-                    <li><a href="/docs/contribute-docs">How to contribute docs</a></li>
-                    -->
-                </ul>
-            </div>
-        </div>
-
-        <div class="col-md-9 main-article" role="main">
-            <div class="page-article">
-                <div class="page-header">
-                    <h1>Apache Usergrid data query overview</h1>
-                    <!-- TODO: reenable this when we sync SVN to GitHub
-                  <small><a target="_blank" href="https://github.com/usergrid/website/blob/master/content/docs/data-query-overview.md">contribute to this article on github</a></small>
-                    -->
-                </div>
-                <div class="toc">
-	<ul>
-<li><a href="#apache-usergrid-data-query-overview">Apache Usergrid data query overview</a></li>
-</ul>
-</div>
-<h1 id="apache-usergrid-data-query-overview">Apache Usergrid data query overview</h1>
-<p>You can write code to query for data you’ve stored in your Apache Usergrid application. You’ll most likely use queries as filters to retrieve specific entities. For example, you might want to get data about users who are “following” a specific other user, businesses in specific geographical locations, and so on.</p>
-<p>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:</p>
-<pre><code>/restaurants?ql=select * where name contains 'diner' order by name asc</code></pre>
-<blockquote>
-<p><strong>Note:</strong>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>
-</blockquote>
-<p>Having retrieved the list of restaurants, your code could display the list to your users. You could also use a query to retrieve a list of diners that are located within a particular geographical area (such as near your user’s current location).</p>
-<blockquote>
-<p><strong>Important:</strong> By default, results from queries of your Apache Usergrid data are limited to 10 items at a time. You can control this with the <code>limit</code> parameter, as discussed in <a href="/working-queries">Working with queries</a>.</p>
-</blockquote>
-<p>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.</p>
-<blockquote>
-<p><strong>Note:</strong> The syntax of Apache Usergrid queries only <em>resembles</em> SQL to make queries familiar and easier to write. However, the language isn’t SQL. Only the syntax items documented here are supported.</p>
-</blockquote>
-<p>The examples in these topics illustrate queries using simple strings to make the queries easier to read. You can also use one of the Apigee SDKs, which provide functions through which you can pass query strings, and in some cases shortcuts for bypassing queries altogether.</p>
-<blockquote>
-<p><strong>Note:</strong> Queries replace filters, which are deprecated.</p>
-</blockquote>
-<p>For more detail about support for queries your Apache Usergrid database, see the following topics:</p>
-<ul>
-<li><a href="/basic-query-syntax">Basic query syntax</a></li>
-<li><a href="/query-response-values">Query response values</a></li>
-<li><a href="/data-types-supported-queries">Data types supported in queries</a></li>
-<li><a href="/querying-data-admin-portal">Querying data from the admin portal</a></li>
-<li><a href="/working-queries">Working with queries</a></li>
-</ul>
-            </div>
-        </div>
-    </div>
-    <div class="row">
-        <div class="col-md-3"></div>
-        <div class="col-md-9">
-            <div class="github-callout">
-                <strong>Questions?</strong> Please do <a href="/community">ask on the mailing-lists</a>!<br/>
-                <!--
-                <strong>Found an error?</strong> We’d greatly appreciate a pull request about <a target="_blank" href="https://github.com/usergrid/website/blob/master/content/docs/data-query-overview.md">this article on github</a>.</div> 
-                -->
-            </div>
-        </div>
-    </div>
-</div>
-
-
-<footer class="bf-footer" role="contentinfo">
-    <div class="container">
-        <div class="row">
-            <div class="col-md-2">
-                <ul class="nav nav-list">
-                    <li class="nav-header"><a href="/">Home</a></li>
-                    <li class="nav-header"><a href="/community/">Community</a></li>
-                        <li><a href="/community/#events">Events</a></li>
-                        <li><a href="/community/#mailing-lists">Mailing Lists</a></li>
-                        <li><a href="/community/#deployments">Deployments</a></li>
-                        <li><a href="/community/#committers">Commiters</a></li>
-                </ul>
-            </div>
-            <div class="col-md-2">
-                <ul class="nav nav-list">
-                    <li class="nav-header"><a href="https://github.com/apache/incubator-usergrid/" target="_blank">Code</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/stack" target="_blank">Server Stack</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/portal" target="_blank">Admin Portal</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/ugc" target="_blank">ugc command line</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/ios" target="_blank">iOS SDK</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/android" target="_blank">Android SDK</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/html5-javascript" target="_blank">HTML5/JS SDK</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/nodejs" target="_blank">node.js module</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/ruby-on-rails" target="_blank">Ruby on Rails gem</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/ruby" target="_blank">Ruby gem</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/php" target="_blank">PHP SDK</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/java" target="_blank">Java SDK</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/sdks/dotnet" target="_blank">.NET / Windows SDK</a></li>
-                </ul>
-            </div>
-            <div class="col-md-2">
-                <ul class="nav nav-list">
-                    <li class="nav-header">Resources</li>
-                    <li><a href="http://github.com/apache/incubator-usergrid" target="_blank">GitHub Code</a></li>
-                    <li><a href="http://usergrid.readthedocs.org/" target="_blank">Docs</a></li>
-                    <li><a href="https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=23&view=planning&selectedIssue=USERGRID-362&epics=visible" target="_blank">JIRA Bug Tracker</a></li>
-                    <li><a href="http://stackoverflow.com/search?q=usergrid" target="_blank">StackOverflow</a></li>
-                    <li><a href="/community/#live">Live Chat</a></li>
-                    <li><a href="https://twitter.com/usergrid" target="_blank">Twitter</a></li>
-                    <li><a href="http://incubator.apache.org/projects/usergrid.html" target="_blank">Podling Listing</a></li>
-                    <li><a href="https://github.com/apache/incubator-usergrid/blob/master/stack#requirements" target="_blank">Getting Started</a></li>
-                    <li><a href="https://cwiki.apache.org/confluence/display/usergrid/GitHub+Based+Contribution+Workflow" target="_blank">Contribution Guidelines</a></li>
-                </ul>
-            </div>
-            <div class="col-md-2">
-                <ul class="nav nav-list">
-                    <li class="nav-header">Apache</li>
-                    <li><a href="http://www.apache.org/licenses/" target="_blank">License</a></li>
-                    <li><a href="http://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship</a></li>
-                    <li><a href="http://www.apache.org/foundation/thanks.html" target="_blank">Thanks</a></li>
-                    <li><a href="http://www.apache.org/security/">Security</a></li>
-                    <li><a href="http://www.apache.org/" target="_blank">Apache Foundation</a></li>
-                </ul>
-            </div>
-            <div class="col-md-4">
-                <a class="twitter-timeline" href="https://twitter.com/search?q=%23usergrid" data-widget-id="401499136807038976"  data-related="usergrid" height="400px" style="overflow:hidden">Tweets about "usergrid"</a>
-                <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
-            </div> 
-        <!--
-            <div class="col-md-4">
-                <div class="input-group form-search">
-                    <input type="text" class="form-control search-query">
-                    <span class="input-group-btn">
-                        <button type="submit" class="btn btn-primary" data-type="last">Search</button>
-                    </span>
-                </div>
-            </div> -->
-        </div> 
-        <div class="row">
-            <div id="copyright">
-                <img src="/img/egg-logo.png" /><br/><br/>
-                <p>Apache Usergrid is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</p>
-                <p>Copyright © 2013 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.<br>
-                Apache and the Apache feather logos are trademarks of The Apache Software Foundation.</p>
-                <p class="credits">Site designed & assembled with love by <a href="https://github.com/ryuneeee">@ryuneeee</a> + <a href="https://github.com/realbeast">@realbeast</a> + <a href="https://twitter.com/timanglade">@timanglade</a>.</p>
-            </div>
-        </div>
-    </div>
-</footer>
-
-<script type="text/javascript" src="/js/head.js"></script>
-<script type="text/javascript">
-    head.js("/js/jquery-1.10.1.min.js", "/js/bootstrap.min.js", "/js/usergrid-site.js");
-</script>
-<script>
-  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-
-  ga('create', 'UA-45815079-1', 'apache.org');
-  ga('send', 'pageview');
-
-</script>
-
-
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2a55601f/content/docs/data-storage/collections.html
----------------------------------------------------------------------
diff --git a/content/docs/data-storage/collections.html b/content/docs/data-storage/collections.html
new file mode 100644
index 0000000..ef51089
--- /dev/null
+++ b/content/docs/data-storage/collections.html
@@ -0,0 +1,670 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>Collections &mdash; Apache Usergrid 1.0 documentation</title>
+  
+
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  
+  
+    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+  
+
+  
+
+  
+    <link rel="top" title="Apache Usergrid 1.0 documentation" href="../index.html"/>
+        <link rel="next" title="Entities" href="entities.html"/>
+        <link rel="prev" title="Data Store Best Practices" href="optimizing-access.html"/> 
+
+  
+  <script src="../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+  <div class="wy-grid-for-nav">
+
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-nav-search">
+        
+
+        
+          <a href="../index.html" class="icon icon-home"> Apache Usergrid
+        
+
+        
+        </a>
+
+        
+          
+          
+            <div class="version">
+              1.0
+            </div>
+          
+        
+
+        
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+        
+      </div>
+
+      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+        
+          
+          
+              <p class="caption"><span class="caption-text">Introduction</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../introduction/usergrid-features.html">Usergrid Features</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../introduction/data-model.html">Usergrid Data model</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../introduction/async-vs-sync.html">Async vs. sync calls</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Getting Started</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../getting-started/creating-a-new-application.html">Creating a new application</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting-started/creating-account.html">Creating an Usergrid Account</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting-started/using-a-sandbox-app.html">Using a Sandbox Application</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../getting-started/using-the-api.html">Using the API</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Data Storage</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="data-store-dbms.html">The Usergrid Data Store</a></li>
+<li class="toctree-l1"><a class="reference internal" href="optimizing-access.html">Data Store Best Practices</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="">Collections</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#creating-collections">Creating Collections</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#creating-a-collection">Creating a collection</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#request-syntax">Request Syntax</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#example-request-response">Example Request/Response</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="#retrieving-collections">Retrieving Collections</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#retrieving-sets-of-entities-from-a-collection">Retrieving sets of entities from a collection</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id1">Request Syntax</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id2">Example Request/Response</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="#updating-collections">Updating Collections</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#batch-updating-entities-in-a-collection">Batch updating entities in a collection</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id3">Request Syntax</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id4">Example Request/Response</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="#deleting-collections">Deleting Collections</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="#batch-deleting-entities-in-a-collection">Batch deleting entities in a collection</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id5">Request Syntax</a></li>
+<li class="toctree-l3"><a class="reference internal" href="#id6">Example Request/Response</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="entities.html">Entities</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Data Queries</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../data-queries/querying-your-data.html">Querying your data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../data-queries/query-parameters.html">Query parameters &amp; clauses</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../data-queries/operators-and-types.html">Query operators &amp; data types</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../data-queries/advanced-query-usage.html">Advanced query usage</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Entity Connections</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../entity-connections/connecting-entities.html">Connecting entities</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../entity-connections/retrieving-entities.html">Retrieving connections</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../entity-connections/disconnecting-entities.html">Disconnecting entities</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Security &amp; Authentication</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/app-security.html">Security &amp; token authentication</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/using-permissions.html">Using permissions</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/authenticating-users-and-application-clients.html">Authenticating users &amp; app clients</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/user-authentication-types.html">Authentication levels</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/changing-token-time-live-ttl.html">Changing token expiration (time-to-live)</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/authenticating-api-requests.html">Authenticating API requests</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/revoking-tokens-logout.html">Revoking tokens (logout)</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/facebook-sign.html">Facebook sign in</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/securing-your-app.html">Security best practices</a></li>
+</ul>
+<p class="caption"><span class="caption-text">User Management &amp; Social Graph</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/user-management.html">User management &amp; social graph</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/working-user-data.html">Working with User Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/group.html">Working with group data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/activity.html">Activity</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/user-connections.html">Social Graph Connections</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/user-connections.html#creating-other-connections">Creating other connections</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../user-management/messagee-example.html">App Example - Messagee</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Geo-location</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../geolocation/geolocation.html">Geolocating your Entities</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Assets &amp; Files</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../asset-and-files/uploading-assets.html">Uploading assets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../asset-and-files/retrieving-assets.html">Retrieving assets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../asset-and-files/folders.html">Folders</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Counters &amp; Events</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/events-and-counters.html">Counters &amp; events</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html">Creating &amp; incrementing counters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html#decrementing-resetting-counters">Decrementing/resetting counters</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html#using-counters-hierarchically">Using counters hierarchically</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/retrieving-counters.html">Retrieving counters</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Organizations &amp; Applications</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/managing.html">Organization &amp; application management</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/organization.html">Organization</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/application.html">Application</a></li>
+</ul>
+<p class="caption"><span class="caption-text">API Reference</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../rest-endpoints/api-docs.html">Methods</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../rest-endpoints/api-docs.html#models">Models</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Client SDKs</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../sdks/tbd.html">COMING SOON...</a></li>
+</ul>
+<p class="caption"><span class="caption-text">Installing the Stack</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../installation/ug1-deploy-to-tomcat.html">Usegrid 1: Deploying to Tomcat</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation/ug1-launcher-quick-start.html">Usegrid 1: Launcher Quick-start</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../installation/ug2-deploy-to-tomcat.html">Usergrid 2: Deploy to Tomcat</a></li>
+</ul>
+<p class="caption"><span class="caption-text">More about Usergrid</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../reference/presos-and-videos.html">Presentations &amp; Videos</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../reference/contribute-code.html">How to Contribute Code &amp; Docs</a></li>
+</ul>
+
+          
+        
+      </div>
+      &nbsp;
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+        <a href="../index.html">Apache Usergrid</a>
+      </nav>
+
+
+      
+      <div class="wy-nav-content">
+        <div class="rst-content">
+          <div role="navigation" aria-label="breadcrumbs navigation">
+  <ul class="wy-breadcrumbs">
+    <li><a href="../index.html">Docs</a> &raquo;</li>
+      
+    <li>Collections</li>
+      <li class="wy-breadcrumbs-aside">
+        
+          
+            <a href="../_sources/data-storage/collections.txt" rel="nofollow"> View page source</a>
+          
+        
+      </li>
+  </ul>
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <div class="section" id="collections">
+<h1>Collections<a class="headerlink" href="#collections" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="creating-collections">
+<h2>Creating Collections<a class="headerlink" href="#creating-collections" title="Permalink to this headline">¶</a></h2>
+<p>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 &#8220;item&#8221; entity, creates an &#8220;items&#8221; collection.</p>
+<p><strong>Note</strong>: 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.</p>
+<div class="section" id="creating-a-collection">
+<h3>Creating a collection<a class="headerlink" href="#creating-a-collection" title="Permalink to this headline">¶</a></h3>
+<p>The following example shows how to create an empty collection.
+Alternatively, you can create a collection simply by creating a new
+entity with a &#8216;type&#8217; property that corresponds to the collection you
+wish to create. For more on creating entities, see Creating Custom Data
+Entities</p>
+</div>
+<div class="section" id="request-syntax">
+<h3>Request Syntax<a class="headerlink" href="#request-syntax" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-python"><div class="highlight"><pre>curl -X POST https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/&lt;collection_name&gt;
+</pre></div>
+</div>
+<p>Parameters</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="31%" />
+<col width="69%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Parameter</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td>org</td>
+<td>Organization UUID or organization name</td>
+</tr>
+<tr class="row-odd"><td>app</td>
+<td>Application UUID or application name</td>
+</tr>
+<tr class="row-even"><td>collection name</td>
+<td>Name of the collection to create.</td>
+</tr>
+</tbody>
+</table>
+<p>If the provided value is not a plural word, Usergrid will pluralize it.
+For example, providing &#8216;item&#8217; will create a collection named &#8216;items&#8217; but
+providing &#8216;items&#8217; will not create &#8216;itemses&#8217;.</p>
+</div>
+<div class="section" id="example-request-response">
+<h3>Example Request/Response<a class="headerlink" href="#example-request-response" title="Permalink to this headline">¶</a></h3>
+<p>Request:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl -X POST &quot;https://api.usergrid.com/your-org/your-app/item&quot;
+</pre></div>
+</div>
+<p>Response:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
+  <span class="s">&quot;action&quot;</span> <span class="p">:</span> <span class="s">&quot;post&quot;</span><span class="p">,</span>
+  <span class="s">&quot;application&quot;</span> <span class="p">:</span> <span class="s">&quot;f34f4222-a166-11e2-a7f7-02e81adcf3d0&quot;</span><span class="p">,</span>
+  <span class="s">&quot;params&quot;</span> <span class="p">:</span> <span class="p">{</span> <span class="p">},</span>
+  <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/items&quot;</span><span class="p">,</span>
+  <span class="s">&quot;uri&quot;</span> <span class="p">:</span> <span class="s">&quot;http://api.usergrid.com/your-org/your-app/items&quot;</span><span class="p">,</span>
+  <span class="s">&quot;entities&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="p">],</span>
+  <span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1378857079220</span><span class="p">,</span>
+  <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">31</span><span class="p">,</span>
+  <span class="s">&quot;organization&quot;</span> <span class="p">:</span> <span class="s">&quot;your-org&quot;</span><span class="p">,</span>
+  <span class="s">&quot;applicationName&quot;</span> <span class="p">:</span> <span class="s">&quot;your-app&quot;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="retrieving-collections">
+<h2>Retrieving Collections<a class="headerlink" href="#retrieving-collections" title="Permalink to this headline">¶</a></h2>
+<p>This article describes how to retrieve all of the entities in a
+collection.</p>
+<div class="admonition note"> <p class="first admonition-title"><p>Note</p>
+</p> <p class="last"><p>By default, the Usergrid API returns 10 entities per request. For
+collections with more than 10 entities, use the returned &#8216;cursor&#8217;
+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 <a class="reference external" href="../data-queries/query-parameters.html">Query
+Parameters</a>.</p>
+</p></div><p><strong>Note</strong>: 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.</p>
+<div class="section" id="retrieving-sets-of-entities-from-a-collection">
+<h3>Retrieving sets of entities from a collection<a class="headerlink" href="#retrieving-sets-of-entities-from-a-collection" title="Permalink to this headline">¶</a></h3>
+</div>
+<div class="section" id="id1">
+<h3>Request Syntax<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-python"><div class="highlight"><pre>curl -X GET https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/&lt;collection&gt;
+</pre></div>
+</div>
+<p>Parameters</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="25%" />
+<col width="75%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Parameter</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td>org</td>
+<td>Organization UUID or organization name</td>
+</tr>
+<tr class="row-odd"><td>app</td>
+<td>Application UUID or application name</td>
+</tr>
+<tr class="row-even"><td>collection</td>
+<td>Collection UUID or collection name</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id2">
+<h3>Example Request/Response<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
+<p>Request:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl -X GET &quot;https://api.usergrid.com/your-org/your-app/items&quot;
+</pre></div>
+</div>
+<p>Response:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
+      <span class="s">&quot;action&quot;</span> <span class="p">:</span> <span class="s">&quot;get&quot;</span><span class="p">,</span>
+      <span class="s">&quot;application&quot;</span> <span class="p">:</span> <span class="s">&quot;f34f4222-a166-11e2-a7f7-02e81adcf3d0&quot;</span><span class="p">,</span>
+      <span class="s">&quot;params&quot;</span> <span class="p">:</span> <span class="p">{</span> <span class="p">},</span>
+      <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/items&quot;</span><span class="p">,</span>
+      <span class="s">&quot;uri&quot;</span> <span class="p">:</span> <span class="s">&quot;http://api.usergrid.com/your-org/your-app/items&quot;</span><span class="p">,</span>
+      <span class="s">&quot;entities&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="p">{</span>
+            <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;5bb76bca-1657-11e3-903f-9ff6c621a7a4&quot;</span><span class="p">,</span>
+            <span class="s">&quot;type&quot;</span> <span class="p">:</span> <span class="s">&quot;item&quot;</span><span class="p">,</span>
+            <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;milk&quot;</span><span class="p">,</span>
+            <span class="s">&quot;created&quot;</span> <span class="p">:</span> <span class="mi">1378405020796</span><span class="p">,</span>
+            <span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1378405020796</span><span class="p">,</span>
+            <span class="s">&quot;metadata&quot;</span> <span class="p">:</span> <span class="p">{</span>
+                  <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/items/5bb76bca-1657-11e3-903f-9ff6c621a7a4&quot;</span>
+            <span class="p">},</span>
+            <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;milk&quot;</span><span class="p">,</span>
+            <span class="s">&quot;price&quot;</span> <span class="p">:</span> <span class="s">&quot;3.25&quot;</span>
+      <span class="p">},</span> <span class="p">{</span>
+        <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;1a9356ba-1682-11e3-a72a-81581bbaf055&quot;</span><span class="p">,</span>
+        <span class="s">&quot;type&quot;</span> <span class="p">:</span> <span class="s">&quot;item&quot;</span><span class="p">,</span>
+        <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;bread&quot;</span><span class="p">,</span>
+        <span class="s">&quot;created&quot;</span> <span class="p">:</span> <span class="mi">1378423379867</span><span class="p">,</span>
+        <span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1378423379867</span><span class="p">,</span>
+        <span class="s">&quot;metadata&quot;</span> <span class="p">:</span> <span class="p">{</span>
+              <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/items/1a9356ba-1682-11e3-a72a-81581bbaf055&quot;</span>
+        <span class="p">},</span>
+        <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;bread&quot;</span><span class="p">,</span>
+        <span class="s">&quot;price&quot;</span> <span class="p">:</span> <span class="s">&quot;2.50&quot;</span>
+      <span class="p">}</span> <span class="p">],</span>
+      <span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1378426821261</span><span class="p">,</span>
+      <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">35</span><span class="p">,</span>
+      <span class="s">&quot;organization&quot;</span> <span class="p">:</span> <span class="s">&quot;your-org&quot;</span><span class="p">,</span>
+      <span class="s">&quot;applicationName&quot;</span> <span class="p">:</span> <span class="s">&quot;your-app&quot;</span><span class="p">,</span>
+      <span class="s">&quot;count&quot;</span> <span class="p">:</span> <span class="mi">2</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="updating-collections">
+<h2>Updating Collections<a class="headerlink" href="#updating-collections" title="Permalink to this headline">¶</a></h2>
+<p>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.</p>
+<p><strong>Note</strong>: 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.</p>
+<div class="section" id="batch-updating-entities-in-a-collection">
+<h3>Batch updating entities in a collection<a class="headerlink" href="#batch-updating-entities-in-a-collection" title="Permalink to this headline">¶</a></h3>
+</div>
+<div class="section" id="id3">
+<h3>Request Syntax<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-python"><div class="highlight"><pre>curl -X PUT https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/&lt;collection&gt;/?ql= -d {&lt;property&gt;}
+</pre></div>
+</div>
+<p>Note the empty query string (ql=) appended to the URL.</p>
+<p>Parameters</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="23%" />
+<col width="77%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Parameter</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td>org</td>
+<td>Organization UUID or organization name</td>
+</tr>
+<tr class="row-odd"><td>app</td>
+<td>Application UUID or application name</td>
+</tr>
+<tr class="row-even"><td>collection</td>
+<td>Collection UUID or collection name property</td>
+</tr>
+</tbody>
+</table>
+<p>An entity property to be updated, formatted as a key-value pair. For
+example:</p>
+<div class="highlight-python"><div class="highlight"><pre>{&quot;property_1&quot;:&quot;value_1&quot;, &quot;property_2&quot;:&quot;value_2&quot;,...}
+</pre></div>
+</div>
+</div>
+<div class="section" id="id4">
+<h3>Example Request/Response<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
+<p>Request:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl -X PUT https://api.usergrid.com/your-org/your-app/items/?ql= -d &#39;{&quot;availability&quot;:&quot;in-stock&quot;}&#39;
+</pre></div>
+</div>
+<p>Note the empty ?ql= query string.</p>
+<p>Response:</p>
+<div class="highlight-python"><div class="highlight"><pre>{
+  &quot;action&quot; : &quot;put&quot;,
+  &quot;application&quot; : &quot;f34f4222-a166-11e2-a7f7-02e81adcf3d0&quot;,
+  &quot;params&quot; : {
+    &quot;ql&quot; : [ &quot;&quot; ]
+  },
+  &quot;path&quot; : &quot;/items&quot;,
+  &quot;uri&quot; : &quot;http://api.usergrid.com/your-org/your-app/items&quot;,
+  &quot;entities&quot; : [ {
+    &quot;uuid&quot; : &quot;31847b9a-1a62-11e3-be04-8d05e96f700d&quot;,
+    &quot;type&quot; : &quot;item&quot;,
+    &quot;name&quot; : &quot;milk&quot;,
+    &quot;price&quot; : &quot;3.25&quot;,
+    &quot;availability&quot; : &quot;in-stock&quot;
+    &quot;created&quot; : 1378849479113,
+    &quot;modified&quot; : 1378849567301,
+    &quot;name&quot; : &quot;milk&quot;,
+  }, {
+    &quot;uuid&quot; : &quot;3192ac6a-1a62-11e3-a24f-496ca1d42ce7&quot;,
+    &quot;type&quot; : &quot;item&quot;,
+    &quot;name&quot; : &quot;bread&quot;,
+    &quot;price&quot; : &quot;4.00&quot;,
+    &quot;availability&quot; : &quot;in-stock&quot;
+    &quot;created&quot; : 1378849479206,
+    &quot;modified&quot; : 1378849567351,
+    &quot;name&quot; : &quot;bread&quot;,
+  } ],
+  &quot;timestamp&quot; : 1378849567280,
+  &quot;duration&quot; : 207,
+  &quot;organization&quot; : &quot;your-org&quot;,
+  &quot;applicationName&quot; : &quot;your-app&quot;
+}
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="deleting-collections">
+<h2>Deleting Collections<a class="headerlink" href="#deleting-collections" title="Permalink to this headline">¶</a></h2>
+<p>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.</p>
+<p>Currently, collections cannot be deleted; however, you can delete all of
+the entities from a collection.</p>
+<p><strong>Note</strong>: 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.</p>
+<div class="section" id="batch-deleting-entities-in-a-collection">
+<h3>Batch deleting entities in a collection<a class="headerlink" href="#batch-deleting-entities-in-a-collection" title="Permalink to this headline">¶</a></h3>
+</div>
+<div class="section" id="id5">
+<h3>Request Syntax<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-python"><div class="highlight"><pre>curl -X DELETE https://api.usergrid.com/&lt;org&gt;/&lt;app&gt;/&lt;collection&gt;/?ql=&lt;query&gt;
+</pre></div>
+</div>
+<p>Parameters</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="18%" />
+<col width="83%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Parameter</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td>org</td>
+<td>Organization UUID or organization name</td>
+</tr>
+<tr class="row-odd"><td>app</td>
+<td>Application UUID or application name</td>
+</tr>
+<tr class="row-even"><td>collection</td>
+<td>Collection UUID or collection name</td>
+</tr>
+<tr class="row-odd"><td>query</td>
+<td>A query string that specifies the subset of entities to delete</td>
+</tr>
+</tbody>
+</table>
+<p>(for more information on queries, see Querying your data)</p>
+</div>
+<div class="section" id="id6">
+<h3>Example Request/Response<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
+<p>The following example will delete the first 5 entities in a collection.</p>
+<p>Request:</p>
+<div class="highlight-python"><div class="highlight"><pre>curl -X DELETE https://api.usergrid.com/your-org/your-app/items/?ql=&quot;limit=5&quot;
+</pre></div>
+</div>
+<p>Response:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
+  <span class="s">&quot;action&quot;</span> <span class="p">:</span> <span class="s">&quot;delete&quot;</span><span class="p">,</span>
+  <span class="s">&quot;application&quot;</span> <span class="p">:</span> <span class="s">&quot;f34f4222-a166-11e2-a7f7-02e81adcf3d0&quot;</span><span class="p">,</span>
+  <span class="s">&quot;params&quot;</span> <span class="p">:</span> <span class="p">{</span>
+    <span class="s">&quot;ql&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="s">&quot;&quot;</span> <span class="p">]</span>
+  <span class="p">},</span>
+  <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/items&quot;</span><span class="p">,</span>
+  <span class="s">&quot;uri&quot;</span> <span class="p">:</span> <span class="s">&quot;http://api.usergrid.com/your-org/your-app/items&quot;</span><span class="p">,</span>
+  <span class="s">&quot;entities&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="p">{</span>
+    <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;53fe3700-0abe-11e3-b1f7-1bd100b8059e&quot;</span><span class="p">,</span>
+    <span class="s">&quot;type&quot;</span> <span class="p">:</span> <span class="s">&quot;item&quot;</span><span class="p">,</span>
+    <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;milk&quot;</span><span class="p">,</span>
+    <span class="s">&quot;price&quot;</span> <span class="p">:</span> <span class="s">&quot;3.25&quot;</span><span class="p">,</span>
+    <span class="s">&quot;created&quot;</span> <span class="p">:</span> <span class="mi">1377129832047</span><span class="p">,</span>
+    <span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1377129832047</span><span class="p">,</span>
+    <span class="s">&quot;metadata&quot;</span> <span class="p">:</span> <span class="p">{</span>
+      <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/items/53fe3700-0abe-11e3-b1f7-1bd100b8059e&quot;</span>
+    <span class="p">},</span>
+    <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;milk&quot;</span>
+  <span class="p">},</span> <span class="p">{</span>
+    <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;5ae1fa7a-0abe-11e3-89ab-6be0003c809b&quot;</span><span class="p">,</span>
+    <span class="s">&quot;type&quot;</span> <span class="p">:</span> <span class="s">&quot;item&quot;</span><span class="p">,</span>
+    <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;bread&quot;</span><span class="p">,</span>
+    <span class="s">&quot;price&quot;</span> <span class="p">:</span> <span class="s">&quot;4.00&quot;</span><span class="p">,</span>
+    <span class="s">&quot;created&quot;</span> <span class="p">:</span> <span class="mi">1377129843607</span><span class="p">,</span>
+    <span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1377129843607</span><span class="p">,</span>
+    <span class="s">&quot;metadata&quot;</span> <span class="p">:</span> <span class="p">{</span>
+      <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/items/5ae1fa7a-0abe-11e3-89ab-6be0003c809b&quot;</span>
+    <span class="p">},</span>
+    <span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;bread&quot;</span>
+  <span class="p">}</span> <span class="p">],</span>
+  <span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1378848117272</span><span class="p">,</span>
+  <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">12275</span><span class="p">,</span>
+  <span class="s">&quot;organization&quot;</span> <span class="p">:</span> <span class="s">&quot;your-org&quot;</span><span class="p">,</span>
+  <span class="s">&quot;applicationName&quot;</span> <span class="p">:</span> <span class="s">&quot;your-app&quot;</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+
+
+           </div>
+          </div>
+          <footer>
+  
+    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
+      
+        <a href="entities.html" class="btn btn-neutral float-right" title="Entities" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
+      
+      
+        <a href="optimizing-access.html" class="btn btn-neutral" title="Data Store Best Practices" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
+      
+    </div>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2013-2015, Apache Usergrid.
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  
+
+    <script type="text/javascript">
+        var DOCUMENTATION_OPTIONS = {
+            URL_ROOT:'../',
+            VERSION:'1.0',
+            COLLAPSE_INDEX:false,
+            FILE_SUFFIX:'.html',
+            HAS_SOURCE:  true
+        };
+    </script>
+      <script type="text/javascript" src="../_static/jquery.js"></script>
+      <script type="text/javascript" src="../_static/underscore.js"></script>
+      <script type="text/javascript" src="../_static/doctools.js"></script>
+
+  
+
+  
+  
+    <script type="text/javascript" src="../_static/js/theme.js"></script>
+  
+
+  
+  
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.StickyNav.enable();
+      });
+  </script>
+   
+
+</body>
+</html>
\ No newline at end of file