blob: c8b5d30776c86841c82670e66e72645fcbd207cd [file] [log] [blame]
<!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>Usergrid iOS SDK &mdash; Apache Usergrid 2.x documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="top" title="Apache Usergrid 2.x documentation" href="../index.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">
2.x
</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">Getting Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../introduction/overview.html">Getting Started</a></li>
<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">Using Usergrid</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../using-usergrid/creating-account.html">Creating a Usergrid Account</a></li>
<li class="toctree-l1"><a class="reference internal" href="../using-usergrid/creating-a-new-application.html">Creating a new application</a></li>
<li class="toctree-l1"><a class="reference internal" href="../using-usergrid/using-a-sandbox-app.html">Using a Sandbox Application</a></li>
<li class="toctree-l1"><a class="reference internal" href="../using-usergrid/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>
<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">Push Notifications</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/overview.html">Push notifications overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/adding-push-support.html">Adding push notifications support</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/getting-started.html">Getting started with push notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/tutorial.html">Tutorial: Push notifications sample app</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/registering.html">Registering with a notification service</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/creating-notifiers.html">Creating notifiers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/managing-users-and-devices.html">Managing users and devices</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/creating-and-managing-notifications.html">Creating and managing notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/troubleshooting.html">Troubleshooting</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/using-roles.html">Using roles</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="../assets-and-files/uploading-assets.html">Uploading assets</a></li>
<li class="toctree-l1"><a class="reference internal" href="../assets-and-files/retrieving-assets.html">Retrieving assets</a></li>
<li class="toctree-l1"><a class="reference internal" href="../assets-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>
<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/admin-user.html">Admin user</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>
<li class="toctree-l1"><a class="reference internal" href="../rest-endpoints/api-docs.html#sub-types">Sub-Types</a></li>
</ul>
<p class="caption"><span class="caption-text">Client SDKs</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="tbd.html">COMING SOON...</a></li>
</ul>
<p class="caption"><span class="caption-text">Installing Usergrid</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../installation/deployment-guide.html">Usergrid 2.1.0 Deployment Guide</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>Usergrid iOS SDK</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/sdks/ios-new.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="usergrid-ios-sdk">
<h1>Usergrid iOS SDK<a class="headerlink" href="#usergrid-ios-sdk" title="Permalink to this headline"></a></h1>
<div class="section" id="getting-started">
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h2>
<div class="section" id="installing-the-sdk">
<h3>Installing the SDK<a class="headerlink" href="#installing-the-sdk" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="building-from-source">
<h3>Building from Source<a class="headerlink" href="#building-from-source" title="Permalink to this headline"></a></h3>
</div>
</div>
</div>
<div class="section" id="usergrid-sdk-reference-with-examples">
<h1>Usergrid SDK Reference with Examples<a class="headerlink" href="#usergrid-sdk-reference-with-examples" title="Permalink to this headline"></a></h1>
<p>The 66 topics listed below are each documented in the Usergrid
documentation and for each the docs provide an API reference and example
for each of these clients: curl, iOS, Android, JavaScript, Ruby and
Node.js.</p>
<div class="section" id="working-with-collections">
<h2>Working with Collections<a class="headerlink" href="#working-with-collections" title="Permalink to this headline"></a></h2>
<div class="section" id="creating-collections">
<h3>1. Creating collections<a class="headerlink" href="#creating-collections" title="Permalink to this headline"></a></h3>
<p>SDK Method</p>
<div class="highlight-python"><div class="highlight"><pre>(ApigeeClientResponse *)apiRequest: (NSString *)url operation:(NSString *)op data:(NSString *)opData
</pre></div>
</div>
<p>Parameters</p>
<table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="85%" />
</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>url</td>
<td>A fully-formed url in the following format: <a class="reference external" href="https://api.usergrid.com///">https://api.usergrid.com///</a></td>
</tr>
<tr class="row-odd"><td>op</td>
<td>The HTTP method - in this case, &#8216;POST&#8217;</td>
</tr>
<tr class="row-even"><td>opData</td>
<td>No data is being sent, so the value is nil</td>
</tr>
</tbody>
</table>
<p>Example Request/Response</p>
<p>Request:</p>
<div class="highlight-python"><div class="highlight"><pre>-(NSString*)createCollection {
NSString *url = @&quot;https://api.usergrid.com/your-org/your-app/items&quot;;
NSString *op = @&quot;POST&quot;;
NSString *opData = nil;
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[ [UIApplication sharedApplication] delegate];
//call createEntity to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient apiRequest: url operation: op data: opData];
@try {
//success
}
@catch (NSException * e) {
//fail
}
}
</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 class="section" id="retrieving-collections">
<h3>2. Retrieving collections<a class="headerlink" href="#retrieving-collections" title="Permalink to this headline"></a></h3>
<p>SDK Method</p>
<div class="highlight-python"><div class="highlight"><pre>(ApigeeCollection*)getCollection:(NSString*)type
</pre></div>
</div>
<p>Parameters</p>
<table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="84%" />
</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>type</td>
<td>The entity type associated with the collection to be retrieved</td>
</tr>
</tbody>
</table>
<p>Example Request/Response</p>
<p>Request:</p>
<div class="highlight-python"><div class="highlight"><pre>-(NSString*)getCollection {
//specify the entity type that corresponds to the collection to be retrieved
NSString *type = @&quot;item&quot;;
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[ [UIApplication sharedApplication] delegate];
//Call getCollection: to initiate the API GET request
ApigeeCollection *collection = [appDelegate.dataClient getCollection:@&quot;book&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 class="section" id="updating-collections">
<h3>3. Updating collections<a class="headerlink" href="#updating-collections" title="Permalink to this headline"></a></h3>
<p>SDK Method (ApigeeClientResponse <a href="#id1"><span class="problematic" id="id2">*</span></a>)apiRequest: (NSString <a href="#id3"><span class="problematic" id="id4">*</span></a>)url
operation:(NSString <a href="#id5"><span class="problematic" id="id6">*</span></a>)op <a class="reference external" href="data:(NSString">data:(NSString</a> <a href="#id7"><span class="problematic" id="id8">*</span></a>)opData Properties Parameter
Description url A fully-formed request url in the following format:
<a class="reference external" href="https://api.usergrid.com////?ql=">https://api.usergrid.com////?ql=</a> Note that you must include an empty
&#8216;?ql=&#8217; query string at the end of the URL</p>
<p>op The HTTP method - in this case, &#8216;PUT&#8217; opData A JSON-formatted string
that contains the entity properties to be updated Example
Request/Response Show Code Request: -(NSString*)updateCollection {</p>
<div class="highlight-python"><div class="highlight"><pre>NSString *url = @&quot;https://api.usergrid.com/your-org/your-app/items/?ql&quot;;
NSString *op = @&quot;PUT&quot;;
NSString *opData = @&quot;{\&quot;availability\&quot;:\&quot;in-stock\&quot;}&quot;; //we escape the quotes
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
//call apiRequest to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient apiRequest: url operation: op data: opData];
@try {
//success
}
@catch (NSException * e) {
//fail
}
</pre></div>
</div>
<p>}</p>
<p>Response: { &#8220;action&#8221; : &#8220;put&#8221;, &#8220;application&#8221; :
&#8220;f34f4222-a166-11e2-a7f7-02e81adcf3d0&#8221;, &#8220;params&#8221; : { &#8220;ql&#8221; : [ &#8220;&#8221; ] },
&#8220;path&#8221; : &#8220;/items&#8221;, &#8220;uri&#8221; :
&#8220;<a class="reference external" href="http://api.usergrid.com/your-org/your-app/items">http://api.usergrid.com/your-org/your-app/items</a>&#8221;, &#8220;entities&#8221; : [ {
&#8220;uuid&#8221; : &#8220;31847b9a-1a62-11e3-be04-8d05e96f700d&#8221;, &#8220;type&#8221; : &#8220;item&#8221;, &#8220;name&#8221;
: &#8220;milk&#8221;, &#8220;price&#8221; : &#8220;3.25&#8221;, &#8220;availability&#8221; : &#8220;in-stock&#8221; &#8220;created&#8221; :
1378849479113, &#8220;modified&#8221; : 1378849567301, &#8220;name&#8221; : &#8220;milk&#8221;, }, { &#8220;uuid&#8221;
: &#8220;3192ac6a-1a62-11e3-a24f-496ca1d42ce7&#8221;, &#8220;type&#8221; : &#8220;item&#8221;, &#8220;name&#8221; :
&#8220;bread&#8221;, &#8220;price&#8221; : &#8220;4.00&#8221;, &#8220;availability&#8221; : &#8220;in-stock&#8221; &#8220;created&#8221; :
1378849479206, &#8220;modified&#8221; : 1378849567351, &#8220;name&#8221; : &#8220;bread&#8221;, } ],
&#8220;timestamp&#8221; : 1378849567280, &#8220;duration&#8221; : 207, &#8220;organization&#8221; :
&#8220;your-org&#8221;, &#8220;applicationName&#8221; : &#8220;your-app&#8221; }</p>
</div>
<div class="section" id="deleting-collections">
<h3>4. Deleting collections<a class="headerlink" href="#deleting-collections" title="Permalink to this headline"></a></h3>
<p>SDK Method (ApigeeClientResponse <a href="#id9"><span class="problematic" id="id10">*</span></a>)apiRequest: (NSString <a href="#id11"><span class="problematic" id="id12">*</span></a>)url
operation:(NSString <a href="#id13"><span class="problematic" id="id14">*</span></a>)op <a class="reference external" href="data:(NSString">data:(NSString</a> <a href="#id15"><span class="problematic" id="id16">*</span></a>)opData Properties Parameter
Description url A fully-formed url in the following format:
<a class="reference external" href="https://api.usergrid.com////?ql=">https://api.usergrid.com////?ql=</a> Note that you must include an empty
&#8216;?ql=&#8217; query string at the end of the URL</p>
<p>op The HTTP method - in this case, &#8216;DELETE&#8217; opData No data is being
sent, so the value is nil Example Request/Response The following example
will delete the first 5 entities in a collection.</p>
<p>Show Code Request: -(NSString*)deleteCollection {</p>
<div class="highlight-python"><div class="highlight"><pre>NSString *url = @&quot;https://api.usergrid.com/your-org/your-app/items/?ql=&#39;limit=5&#39;&quot;;
NSString *op = @&quot;DELETE&quot;;
NSString *opData = nil;
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
//call createEntity to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient apiRequest: url operation: op data: opData];
@try {
//success
}
@catch (NSException * e) {
//fail
}
</pre></div>
</div>
<p>}</p>
<p>Response: { &#8220;action&#8221; : &#8220;delete&#8221;, &#8220;application&#8221; :
&#8220;f34f4222-a166-11e2-a7f7-02e81adcf3d0&#8221;, &#8220;params&#8221; : { &#8220;ql&#8221; : [ &#8220;&#8221; ] },
&#8220;path&#8221; : &#8220;/items&#8221;, &#8220;uri&#8221; :
&#8220;<a class="reference external" href="http://api.usergrid.com/your-org/your-app/items">http://api.usergrid.com/your-org/your-app/items</a>&#8221;, &#8220;entities&#8221; : [ {
&#8220;uuid&#8221; : &#8220;53fe3700-0abe-11e3-b1f7-1bd100b8059e&#8221;, &#8220;type&#8221; : &#8220;item&#8221;, &#8220;name&#8221;
: &#8220;milk&#8221;, &#8220;price&#8221; : &#8220;3.25&#8221;, &#8220;created&#8221; : 1377129832047, &#8220;modified&#8221; :
1377129832047, &#8220;metadata&#8221; : { &#8220;path&#8221; :
&#8220;/items/53fe3700-0abe-11e3-b1f7-1bd100b8059e&#8221; }, &#8220;name&#8221; : &#8220;milk&#8221; }, {
&#8220;uuid&#8221; : &#8220;5ae1fa7a-0abe-11e3-89ab-6be0003c809b&#8221;, &#8220;type&#8221; : &#8220;item&#8221;, &#8220;name&#8221;
: &#8220;bread&#8221;, &#8220;price&#8221; : &#8220;4.00&#8221;, &#8220;created&#8221; : 1377129843607, &#8220;modified&#8221; :
1377129843607, &#8220;metadata&#8221; : { &#8220;path&#8221; :
&#8220;/items/5ae1fa7a-0abe-11e3-89ab-6be0003c809b&#8221; }, &#8220;name&#8221; : &#8220;bread&#8221; } ],
&#8220;timestamp&#8221; : 1378848117272, &#8220;duration&#8221; : 12275, &#8220;organization&#8221; :
&#8220;your-org&#8221;, &#8220;applicationName&#8221; : &#8220;your-app&#8221; }</p>
</div>
</div>
<div class="section" id="working-with-entities">
<h2>Working with Entities<a class="headerlink" href="#working-with-entities" title="Permalink to this headline"></a></h2>
<div class="section" id="creating-a-custom-entity">
<h3>5. Creating a custom entity<a class="headerlink" href="#creating-a-custom-entity" title="Permalink to this headline"></a></h3>
<p>SDK Method (ApigeeClientResponse <a href="#id17"><span class="problematic" id="id18">*</span></a>)createEntity:(NSDictionary
<a href="#id19"><span class="problematic" id="id20">*</span></a>)newEntity Parameters Parameter Description newEntity NSDictionary
object that contains the entity properties Example Request/Response Show
Code Request: -(NSString*)newEntity {</p>
<div class="highlight-python"><div class="highlight"><pre>//create an entity object
NSMutableDictionary *entity = [[NSMutableDictionary alloc] init ];
//Set entity properties
[entity setObject:@&quot;item&quot; forKey:@&quot;type&quot;]; //Required. New entity type to create
[entity setObject:@&quot;milk&quot; forKey:@&quot;name&quot;];
[entity setObject:@&quot;3.25&quot; forKey:@&quot;price&quot;];
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[ [UIApplication sharedApplication] delegate];
//call createEntity to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient createEntity:entity];
@try {
//success
}
@catch (NSException * e) {
//fail
}
</pre></div>
</div>
<p>}</p>
<p>Response: { &#8220;action&#8221; : &#8220;post&#8221;, &#8220;application&#8221; :
&#8220;4a1edb70-d7a8-11e2-9ce3-f315e5aa568a&#8221;, &#8220;params&#8221; : { }, &#8220;path&#8221; :
&#8220;/items&#8221;, &#8220;uri&#8221; : &#8220;<a class="reference external" href="http://api.usergrid.com/my-org/my-app/items">http://api.usergrid.com/my-org/my-app/items</a>&#8221;,
&#8220;entities&#8221; : [ { &#8220;uuid&#8221; : &#8220;83e9b7ea-e8f5-11e2-84df-e94123890c7a&#8221;, &#8220;type&#8221;
: &#8220;item&#8221;, &#8220;name&#8221; : &#8220;milk&#8221;, &#8220;created&#8221; : 1373415195230, &#8220;modified&#8221; :
1373415195230, &#8220;metadata&#8221; : {</p>
<div class="highlight-python"><div class="highlight"><pre> &quot;path&quot; : &quot;/items/83e9b7ea-e8f5-11e2-84df-e94123890c7a&quot;
},
&quot;name&quot; : &quot;milk&quot;,
&quot;price&quot; : &quot;3.25&quot;
} ],
&quot;timestamp&quot; : 1373415195225,
&quot;duration&quot; : 635,
&quot;organization&quot; : &quot;my-org&quot;,
&quot;applicationName&quot; : &quot;my-app&quot;
}
</pre></div>
</div>
</div>
<div class="section" id="creating-multiple-custom-entities">
<h3>6. Creating multiple custom entities<a class="headerlink" href="#creating-multiple-custom-entities" title="Permalink to this headline"></a></h3>
<p>Request Syntax curl -X POST <a class="reference external" href="https://api.usergrid.com////">https://api.usergrid.com////</a> -d &#8216;[{}, {},
...]&#8217; Parameters Parameter Description org Organization UUID or name app
Application UUID or name entity_type Custom entity type to create. API
Services will create a corresponding collection if one does not already
exist. To add an entity to an existing collections, use the collection
name or colleciton UUID in place of the entity type. entity
Comma-separated list of entity objects to create. Each object should be
formatted as a comma-separated list of entity properties, formatted as
key-value pairs in the format : Example Request/Response Show Code
Request: curl -X POST &#8220;<a class="reference external" href="https://api.usergrid.com/your-org/your-app/item">https://api.usergrid.com/your-org/your-app/item</a>&#8221;
-d &#8216;[{&#8220;name&#8221;:&#8221;milk&#8221;, &#8220;price&#8221;:&#8221;3.25&#8221;}, {&#8220;name&#8221;:&#8221;bread&#8221;, &#8220;price&#8221;:&#8221;2.50&#8221;}]&#8217;
Response: { &#8220;action&#8221; : &#8220;post&#8221;, &#8220;application&#8221; :
&#8220;f34f4222-a166-11e2-a7f7-02e9sjwsf3d0&#8221;, &#8220;params&#8221; : { }, &#8220;path&#8221; :
&#8220;/items&#8221;, &#8220;uri&#8221; : &#8220;<a class="reference external" href="http://api.usergrid.com/your-org/your-app/items">http://api.usergrid.com/your-org/your-app/items</a>&#8221;,
&#8220;entities&#8221; : [ { &#8220;uuid&#8221; : &#8220;f3a8061a-ef0b-11e2-9e92-5f4a65c16193&#8221;, &#8220;type&#8221;
: &#8220;item&#8221;, &#8220;name&#8221; : &#8220;milk&#8221;, &#8220;price&#8221; : &#8220;3.25&#8221;, &#8220;created&#8221; : 1374084538609,
&#8220;modified&#8221; : 1374084538609, &#8220;metadata&#8221; : { &#8220;path&#8221; :
&#8220;/multis/f3a8061a-ef0b-11e2-9e92-5f4a65c16193&#8221; }, &#8220;name&#8221; : &#8220;milk&#8221; }, {
&#8220;uuid&#8221; : &#8220;f3be262a-ef0b-11e2-a51b-6715d5ef47a6&#8221;, &#8220;type&#8221; : &#8220;item&#8221;, &#8220;name&#8221;
: &#8220;bread&#8221;, &#8220;price&#8221; : &#8220;2.50&#8221;, &#8220;created&#8221; : 1374084538754, &#8220;modified&#8221; :
1374084538754, &#8220;metadata&#8221; : { &#8220;path&#8221; :
&#8220;/items/f3be262a-ef0b-11e2-a51b-6715d5ef47a6&#8221; }, &#8220;name&#8221; : &#8220;bread&#8221; } ],
&#8220;timestamp&#8221; : 1374084538584, &#8220;duration&#8221; : 388, &#8220;organization&#8221; :
&#8220;your-org&#8221;, &#8220;applicationName&#8221; : &#8220;your-app&#8221; }</p>
</div>
<div class="section" id="creating-an-entity-with-sub-properties">
<h3>7. Creating an entity with sub-properties<a class="headerlink" href="#creating-an-entity-with-sub-properties" title="Permalink to this headline"></a></h3>
<p>SDK Method (ApigeeClientResponse <a href="#id21"><span class="problematic" id="id22">*</span></a>)createEntity:(NSDictionary
<a href="#id23"><span class="problematic" id="id24">*</span></a>)newEntity Parameters Parameter Description newEntity
NSMutableDictionary object that contains the entity properties Example
Request/Response Show Code Request: -(NSString*)newEntity {</p>
<div class="highlight-python"><div class="highlight"><pre>//Initialize an object for the new entity to be created
NSMutableDictionary *entity = [ [NSMutableDictionary alloc] init ];
//Initialize an object for each nested variety object
NSMutableDictionary *variety_1 = [ [NSMutableDictionary alloc] init ];
NSMutableDictionary *variety_2 = [ [NSMutableDictionary alloc] init ];
NSMutableDictionary *variety_3 = [ [NSMutableDictionary alloc] init ];
//Initialize an array to hold the nested variety objects
NSMutableArray *variety_list = [ [NSMutableArray alloc] init];
[variety_1 setObject:@&quot;1%&quot; forKey:@&quot;name&quot;];
[variety_1 setObject:@&quot;3.25&quot; forKey:@&quot;price&quot;];
[variety_1 setObject:@&quot;0393847575533445&quot; forKey:@&quot;sku&quot;];
[variety_2 setObject:@&quot;whole&quot; forKey:@&quot;name&quot;];
[variety_2 setObject:@&quot;3.85&quot; forKey:@&quot;price&quot;];
[variety_2 setObject:@&quot;0393394956788445&quot; forKey:@&quot;sku&quot;];
[variety_3 setObject:@&quot;skim&quot; forKey:@&quot;name&quot;];
[variety_3 setObject:@&quot;4.00&quot; forKey:@&quot;price&quot;];
[variety_3 setObject:@&quot;0390299933488445&quot; forKey:@&quot;sku&quot;];
//Add the variety objects to the array
[variety_list addObject:variety_1];
[variety_list addObject:variety_2];
[variety_list addObject:variety_3];
//Set the item entity properties
[entity setObject:@&quot;item&quot; forKey:@&quot;type&quot;]; //Required. New entity type to create
[entity setObject:@&quot;milk&quot; forKey:@&quot;name&quot;];
//Set the variety_list array as the value of the &#39;varieties&#39; property
[entity setObject:variety_list forKey:@&quot;varieties&quot;];
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[ [UIApplication sharedApplication] delegate];
//call createEntity to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient createEntity:entity];
@try {
//success
}
@catch (NSException * e) {
//fail
}
</pre></div>
</div>
<p>}</p>
<p>Response: { &#8220;action&#8221; : &#8220;post&#8221;, &#8220;application&#8221; :
&#8220;f34f4222-a166-11e2-a7f7-02e81adcf3d0&#8221;, &#8220;params&#8221; : { }, &#8220;path&#8221; :
&#8220;/items&#8221;, &#8220;uri&#8221; : &#8220;<a class="reference external" href="http://api.usergrid.com/your-org/your-app/items">http://api.usergrid.com/your-org/your-app/items</a>&#8221;,
&#8220;entities&#8221; : [ { &#8220;uuid&#8221; : &#8220;0d7cf92a-effb-11e2-917d-c5e707256e71&#8221;, &#8220;type&#8221;
: &#8220;item&#8221;, &#8220;name&#8221; : &#8220;milk&#8221;, &#8220;created&#8221; : 1374187231666, &#8220;modified&#8221; :
1374187231666, &#8220;metadata&#8221; : { &#8220;path&#8221; :
&#8220;/items/0d7cf92a-effb-11e2-917d-c5e707256e71&#8221; }, &#8220;name&#8221; : &#8220;milk&#8221;,
&#8220;varieties&#8221; : [ { &#8220;name&#8221; : &#8220;1%&#8221;, &#8220;price&#8221; : &#8220;3.25&#8221;, &#8220;SKU&#8221; :
&#8220;0393847575533445&#8221; }, { &#8220;name&#8221; : &#8220;whole&#8221;, &#8220;price&#8221; : &#8220;3.85&#8221;, &#8220;SKU&#8221; :
&#8220;0393394956788445&#8221; }, { &#8220;name&#8221; : &#8220;skim&#8221;, &#8220;price&#8221; : &#8220;4.00&#8221;, &#8220;SKU&#8221; :
&#8220;0390299933488445&#8221; } ] } ], &#8220;timestamp&#8221; : 1374187450826, &#8220;duration&#8221; :
50, &#8220;organization&#8221; : &#8220;your-org&#8221;, &#8220;applicationName&#8221; : &#8220;your-app&#8221; }</p>
</div>
<div class="section" id="retrieving-an-entity">
<h3>8. Retrieving an entity<a class="headerlink" href="#retrieving-an-entity" title="Permalink to this headline"></a></h3>
<p>SDK Method</p>
<div class="highlight-python"><div class="highlight"><pre>(ApigeeClientResponse *)getEntities: (NSString *)endpoint query:(NSString *)query
</pre></div>
</div>
<p>Properties</p>
<table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="87%" />
</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>endpoint</td>
<td>The collection and entity identifier of the entity to be retrieved.</td>
</tr>
<tr class="row-odd"><td>query</td>
<td>An optional query string. Requests for a specific entity should set the value to nil</td>
</tr>
</tbody>
</table>
<p>Endpoint exported in the following format: /</p>
<p>Example Request/Response</p>
<p>Request:</p>
<div class="highlight-python"><div class="highlight"><pre>-(NSString*)getEntity {
//specify the entity collection and UUID or name to be retrieved
NSString *endpoint = @&quot;items/b3aad0a4-f322-11e2-a9c1-999e12039f87&quot;;
NSString *query = nil;
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
//call getEntities to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient getEntities:endpoint queryString:query];
@try {
//success
}
@catch (NSException * e) {
//fail
}
}
</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/amuramoto/sandbox/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;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1378405025763</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;amuramoto&quot;</span><span class="p">,</span>
<span class="s">&quot;applicationName&quot;</span> <span class="p">:</span> <span class="s">&quot;sandbox&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="retrieving-multiple-entities">
<h3>9. Retrieving multiple entities<a class="headerlink" href="#retrieving-multiple-entities" title="Permalink to this headline"></a></h3>
<p>SDK Method</p>
<div class="highlight-python"><div class="highlight"><pre>(ApigeeClientResponse *)getEntities: (NSString *)type queryString:(NSString *)queryString
</pre></div>
</div>
<p>Properties</p>
<table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="85%" />
</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>type</td>
<td>The entity type being retrieved</td>
</tr>
<tr class="row-odd"><td>queryString</td>
<td>A query string of entity properties to be matched for the entities to be retrieved.</td>
</tr>
</tbody>
</table>
<p>Query string is expected in the following format: = OR = OR ...</p>
<p>Example Request/Response</p>
<p>Request:</p>
<div class="highlight-python"><div class="highlight"><pre>-(NSString*)getEntity {
//specify the entity type to be retrieved
NSString *type = @&quot;item&quot;;
//specify the uuid of the entity to be retrieved in a query string
NSString *query = @&quot;uuid = b3aad0a4-f322-11e2-a9c1-999e12039f87 or name = &#39;bread&#39;&quot;;
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
//call createEntity to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient getEntities:type queryString:query];
@try {
//success
}
@catch (NSException * e) {
//fail
}
}
</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="s">&quot;ql&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="s">&quot;name=&#39;milk&#39; OR UUID=1a9356ba-1682-11e3-a72a-81581bbaf055&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;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">1378423793729</span><span class="p">,</span>
<span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">63</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 class="section" id="updating-an-entity">
<h3>10. Updating an entity<a class="headerlink" href="#updating-an-entity" title="Permalink to this headline"></a></h3>
<p>SDK Method</p>
<div class="highlight-python"><div class="highlight"><pre>(ApigeeClientResponse *)updateEntity: (NSString *)entityID entity:(NSDictionary *)updatedEntity
</pre></div>
</div>
<p>Parameters</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
</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>entityID</td>
<td>UUID of the entity to be updated</td>
</tr>
<tr class="row-odd"><td>updatedEntity</td>
<td>NSMutableDictionary containing the properties to be updated</td>
</tr>
</tbody>
</table>
<p>Example Request/Response</p>
<p>Request:</p>
<div class="highlight-python"><div class="highlight"><pre>-(NSString*)updateEntity {
//UUID of the entity to be updated
NSString *entityID = @&quot;f42752aa-08fe-11e3-8268-5bd5fa5f701f&quot;;
//Create an entity object
NSMutableDictionary *updatedEntity = [ [NSMutableDictionary alloc] init ];
//Set entity properties to be updated
[updatedEntity setObject:@&quot;item&quot; forKey:@&quot;type&quot;]; //Required - entity type
[updatedEntity setObject:@&quot;in-stock&quot; forKey:@&quot;availability&quot;];
[updatedEntity setObject:@&quot;4.00&quot; forKey:@&quot;price&quot;];
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[ [UIApplication sharedApplication] delegate];
//call updateEntity to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient updateEntity:entityID entity:updatedEntity];
@try {
//success
}
@catch (NSException * e) {
//fail
}
}
</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;put&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">1378505705077</span><span class="p">,</span>
<span class="s">&quot;availability&quot;</span> <span class="p">:</span> <span class="s">&quot;in-stock&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;/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;4.00&quot;</span>
<span class="p">}</span> <span class="p">],</span>
<span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1378505705050</span><span class="p">,</span>
<span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">87</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 class="section" id="updating-a-sub-property">
<h3>11. Updating a sub-property<a class="headerlink" href="#updating-a-sub-property" title="Permalink to this headline"></a></h3>
<p>SDK Method</p>
<div class="highlight-python"><div class="highlight"><pre>(ApigeeClientResponse *)updateEntity: (NSString *)entityID entity:(NSDictionary *)updatedEntity
</pre></div>
</div>
<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>entityID</td>
<td>UUID of the entity to be updated</td>
</tr>
<tr class="row-odd"><td>updatedEntity</td>
<td>Entity object containing the properties to be updated</td>
</tr>
</tbody>
</table>
<p>Example Request/Response</p>
<p>Request:</p>
<div class="highlight-python"><div class="highlight"><pre>-(NSString*)updateEntity {
//UUID of the entity to be updated
NSString *entityID = @&quot;f42752aa-08fe-11e3-8268-5bd5fa5f701f&quot;;
//Define our two sub-properties to include in the update
NSMutableDictionary *subproperty1 = [ [NSMutableDictionary alloc] init];
NSMutableDictionary *subproperty2 = [ [NSMutableDictionary alloc] init];
[subproperty1 setObject:@&quot;1%&quot; forKey:@&quot;name&quot;];
[subproperty1 setObject:@&quot;3.25&quot; forKey:@&quot;price&quot;];
[subproperty2 setObject:@&quot;whole&quot; forKey:@&quot;name&quot;];
[subproperty2 setObject:@&quot;4.00&quot; forKey:@&quot;price&quot;];
//Put our sub-properties into an NSArray
NSArray *subproperties = [ [NSArray alloc] initWithObjects:props1,props2, nil];
//Create an NSMutableDictionary to hold our updates
NSMutableDictionary *updatedEntity = [ [NSMutableDictionary alloc] init ];
//Set the properties to be updated
[updatedEntity setObject:@&quot;item&quot; forKey:@&quot;type&quot;]; //Required - entity type
[updatedEntity setObject:props forKey:@&quot;varieties&quot;];
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[ [UIApplication sharedApplication] delegate];
//call createEntity to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient updateEntity:entityID entity:updatedEntity];
@try {
//success
}
@catch (NSException * e) {
//fail
}
}
</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;put&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">1378761459069</span><span class="p">,</span>
<span class="s">&quot;availability&quot;</span> <span class="p">:</span> <span class="s">&quot;in-stock&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;/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;uri&quot;</span> <span class="p">:</span> <span class="s">&quot;http://api.usergrid.com/your-org/your-app/items/5bb76bca-1657-11e3-903f-9ff6c621a7a4&quot;</span><span class="p">,</span>
<span class="s">&quot;varieties&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="p">{</span>
<span class="s">&quot;name&quot;</span> <span class="p">:</span> <span class="s">&quot;1%&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;name&quot;</span> <span class="p">:</span> <span class="s">&quot;whole&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="p">]</span>
<span class="p">}</span> <span class="p">],</span>
<span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1378761459047</span><span class="p">,</span>
<span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">62</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 class="section" id="deleting-data-entities">
<h3>12. Deleting data entities<a class="headerlink" href="#deleting-data-entities" title="Permalink to this headline"></a></h3>
<p>SDK Method</p>
<div class="highlight-python"><div class="highlight"><pre>(ApigeeClientResponse *)removeEntity: (NSString *)type entityID:(NSString *)entityID
</pre></div>
</div>
<p>Properties</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
</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>type</td>
<td>The entity type being deleted</td>
</tr>
<tr class="row-odd"><td>entityID</td>
<td>The UUID or name of the entity to be removed</td>
</tr>
</tbody>
</table>
<p>Example Request/Response</p>
<p>Request:</p>
<div class="highlight-python"><div class="highlight"><pre>-(NSString*)deleteEntity {
//specify the entity type to be deleted
NSString *type = @&quot;item&quot;;
//specify the uuid or name of the entity to be deleted
NSString *entityId = @&quot;milk&quot;;
//we recommend you call ApigeeClient from your AppDelegate.
//for more information see the iOS SDK install guide: http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios
//create an instance of AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
//call removeEntity to initiate the API call
ApigeeClientResponse *response = [appDelegate.dataClient removeEntity:type entityID:entityId];
@try {
//success
}
@catch (NSException * e) {
//fail
}
}
</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="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;328fe64a-19a0-11e3-8a2a-ebc6f49d1fc4&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">1378766158500</span><span class="p">,</span>
<span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1378766158500</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/328fe64a-19a0-11e3-8a2a-ebc6f49d1fc4&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;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1378766172016</span><span class="p">,</span>
<span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">324</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="data-queries">
<h2>Data Queries<a class="headerlink" href="#data-queries" title="Permalink to this headline"></a></h2>
<div class="section" id="querying-your-data">
<h3>13. Querying your data<a class="headerlink" href="#querying-your-data" title="Permalink to this headline"></a></h3>
</div>
</div>
<div class="section" id="entity-connections">
<h2>Entity Connections<a class="headerlink" href="#entity-connections" title="Permalink to this headline"></a></h2>
<div class="section" id="connecting-users-other-data">
<h3>14. Connecting users other data<a class="headerlink" href="#connecting-users-other-data" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="retrieving-user-connection-data">
<h3>15. Retrieving user connection data<a class="headerlink" href="#retrieving-user-connection-data" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="disconnecting-entities">
<h3>16. Disconnecting entities<a class="headerlink" href="#disconnecting-entities" title="Permalink to this headline"></a></h3>
</div>
</div>
<div class="section" id="permissions-roles">
<h2>Permissions &amp; Roles<a class="headerlink" href="#permissions-roles" title="Permalink to this headline"></a></h2>
<div class="section" id="assigning-permissions">
<h3>17. Assigning permissions<a class="headerlink" href="#assigning-permissions" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="removing-permissions">
<h3>18. Removing permissions<a class="headerlink" href="#removing-permissions" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="id25">
<h3>19. Assigning permissions<a class="headerlink" href="#id25" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="id26">
<h3>20. Removing permissions<a class="headerlink" href="#id26" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="creating-roles">
<h3>21. Creating roles<a class="headerlink" href="#creating-roles" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="assigning-roles">
<h3>22. Assigning roles<a class="headerlink" href="#assigning-roles" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="removing-roles">
<h3>23. Removing roles<a class="headerlink" href="#removing-roles" title="Permalink to this headline"></a></h3>
</div>
</div>
<div class="section" id="authentication">
<h2>Authentication<a class="headerlink" href="#authentication" title="Permalink to this headline"></a></h2>
<div class="section" id="application-user-authentication-user-login">
<h3>24. Application user authentication (user login)<a class="headerlink" href="#application-user-authentication-user-login" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="application-client-authentication">
<h3>25. Application client authentication<a class="headerlink" href="#application-client-authentication" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="admin-user-authentication">
<h3>26. Admin user authentication<a class="headerlink" href="#admin-user-authentication" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="organization-client-authentication">
<h3>27. Organization client authentication<a class="headerlink" href="#organization-client-authentication" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="revoking-tokens-user-logout">
<h3>28. Revoking tokens (user logout)<a class="headerlink" href="#revoking-tokens-user-logout" title="Permalink to this headline"></a></h3>
</div>
</div>
</div>
<div class="section" id="working-with-users-groups">
<h1>Working with Users &amp; Groups<a class="headerlink" href="#working-with-users-groups" title="Permalink to this headline"></a></h1>
<div class="section" id="activities-feeds">
<h2>Activities &amp; Feeds<a class="headerlink" href="#activities-feeds" title="Permalink to this headline"></a></h2>
<div class="section" id="posting-a-user-activity">
<h3>37. Posting a user activity<a class="headerlink" href="#posting-a-user-activity" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="posting-an-activity-to-a-group">
<h3>38. Posting an activity to a group<a class="headerlink" href="#posting-an-activity-to-a-group" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="creating-an-activity-for-a-user-s-followers-in-a-group">
<h3>39. Creating an activity for a user&#8217;s followers in a group<a class="headerlink" href="#creating-an-activity-for-a-user-s-followers-in-a-group" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="retrieving-a-user-s-activity-feed">
<h3>40. Retrieving a user&#8217;s activity feed<a class="headerlink" href="#retrieving-a-user-s-activity-feed" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="retrieving-a-group-s-activity-feed">
<h3>41. Retrieving a group&#8217;s activity feed<a class="headerlink" href="#retrieving-a-group-s-activity-feed" title="Permalink to this headline"></a></h3>
</div>
</div>
<div class="section" id="events-counters">
<h2>Events &amp; Counters<a class="headerlink" href="#events-counters" title="Permalink to this headline"></a></h2>
<div class="section" id="creating-incrementing-counters">
<h3>42. Creating &amp; incrementing counters<a class="headerlink" href="#creating-incrementing-counters" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="retrieving-counters">
<h3>43. Retrieving counters<a class="headerlink" href="#retrieving-counters" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="retrieving-counters-by-time-interval">
<h3>44. Retrieving counters by time interval<a class="headerlink" href="#retrieving-counters-by-time-interval" title="Permalink to this headline"></a></h3>
</div>
</div>
<div class="section" id="managing-orgs-apps">
<h2>Managing Orgs &amp; Apps<a class="headerlink" href="#managing-orgs-apps" title="Permalink to this headline"></a></h2>
<div class="section" id="creating-an-organization">
<h3>46. Creating an organization<a class="headerlink" href="#creating-an-organization" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="getting-an-organization">
<h3>47. Getting an organization<a class="headerlink" href="#getting-an-organization" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="activating-an-organization">
<h3>48. Activating an organization<a class="headerlink" href="#activating-an-organization" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="reactivating-an-organization">
<h3>49. Reactivating an organization<a class="headerlink" href="#reactivating-an-organization" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="generating-organization-client-credentials">
<h3>50. Generating organization client credentials<a class="headerlink" href="#generating-organization-client-credentials" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="retrieving-organization-client-credentials">
<h3>51. Retrieving organization client credentials<a class="headerlink" href="#retrieving-organization-client-credentials" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="getting-an-organization-s-activity-feed">
<h3>52. Getting an organization&#8217;s activity feed<a class="headerlink" href="#getting-an-organization-s-activity-feed" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="getting-the-applications-in-an-organization">
<h3>53. Getting the applications in an organization<a class="headerlink" href="#getting-the-applications-in-an-organization" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="getting-the-admin-users-in-an-organization">
<h3>54. Getting the admin users in an organization<a class="headerlink" href="#getting-the-admin-users-in-an-organization" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="removing-an-admin-user-from-an-organization">
<h3>55. Removing an admin user from an organization<a class="headerlink" href="#removing-an-admin-user-from-an-organization" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="creating-an-organization-application">
<h3>56. Creating an organization application<a class="headerlink" href="#creating-an-organization-application" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="generating-application-credentials">
<h3>57. Generating application credentials<a class="headerlink" href="#generating-application-credentials" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="getting-application-credentials">
<h3>58. Getting application credentials<a class="headerlink" href="#getting-application-credentials" title="Permalink to this headline"></a></h3>
</div>
</div>
<div class="section" id="managing-admin-users">
<h2>Managing Admin Users<a class="headerlink" href="#managing-admin-users" title="Permalink to this headline"></a></h2>
<div class="section" id="creating-an-admin-user">
<h3>59. Creating an admin user<a class="headerlink" href="#creating-an-admin-user" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="updating-an-admin-user">
<h3>60. Updating an admin user<a class="headerlink" href="#updating-an-admin-user" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="getting-an-admin-user">
<h3>61. Getting an admin user<a class="headerlink" href="#getting-an-admin-user" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="setting-an-admin-user-s-password">
<h3>62. Setting an admin user&#8217;s password<a class="headerlink" href="#setting-an-admin-user-s-password" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="resetting-an-admin-user-s-password">
<h3>63. Resetting an admin user&#8217;s password<a class="headerlink" href="#resetting-an-admin-user-s-password" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="activating-an-admin-user">
<h3>64. Activating an admin user<a class="headerlink" href="#activating-an-admin-user" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="reactivating-an-admin-user">
<h3>65. Reactivating an admin user<a class="headerlink" href="#reactivating-an-admin-user" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="getting-an-admin-user-s-activity-feed">
<h3>66. Getting an admin user&#8217;s activity feed<a class="headerlink" href="#getting-an-admin-user-s-activity-feed" title="Permalink to this headline"></a></h3>
</div>
</div>
</div>
</div>
</div>
<footer>
<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:'2.x',
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>