| |
| |
| <!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>Using permissions — 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"/> |
| <link rel="next" title="Using roles" href="using-roles.html"/> |
| <link rel="prev" title="Security & token authentication" href="app-security.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 & clauses</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../data-queries/operators-and-types.html">Query operators & 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 & Authentication</span></p> |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="app-security.html">Security & token authentication</a></li> |
| <li class="toctree-l1 current"><a class="current reference internal" href="">Using permissions</a><ul> |
| <li class="toctree-l2"><a class="reference internal" href="#permissions-syntax">Permissions syntax</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="#complex-paths">Complex paths</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="#assigning-permissions">Assigning permissions</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="#example-request">Example request</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#example-response">Example response</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="#removing-permissions">Removing permissions</a><ul> |
| <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</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id3">Example response</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="using-roles.html">Using roles</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="authenticating-users-and-application-clients.html">Authenticating users & app clients</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="user-authentication-types.html">Authentication levels</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="changing-token-time-live-ttl.html">Changing token expiration (time-to-live)</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="authenticating-api-requests.html">Authenticating API requests</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="revoking-tokens-logout.html">Revoking tokens (logout)</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="facebook-sign.html">Facebook sign in</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="securing-your-app.html">Security best practices</a></li> |
| </ul> |
| <p class="caption"><span class="caption-text">User Management & Social Graph</span></p> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../user-management/user-management.html">User management & 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 & 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 & Events</span></p> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../counters-and-events/events-and-counters.html">Counters & events</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html">Creating & 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 & Applications</span></p> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/managing.html">Organization & 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="../sdks/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 & Videos</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../reference/contribute-code.html">How to Contribute Code & Docs</a></li> |
| </ul> |
| |
| |
| |
| </div> |
| |
| </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> »</li> |
| |
| <li>Using permissions</li> |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="../_sources/security-and-auth/using-permissions.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="using-permissions"> |
| <h1>Using permissions<a class="headerlink" href="#using-permissions" title="Permalink to this headline">¶</a></h1> |
| <p>Permissions allow you to define user access to perform GET, POST, PUT, |
| or DELETE operations on specific resources. When the user submits a |
| request via your app code to the Usergrid API, the user’s permissions |
| are checked against the resource paths that the user is trying to |
| access. The request succeeds only if access to the resource is allowed |
| by the permission rules you specify.</p> |
| <div class="section" id="permissions-syntax"> |
| <h2>Permissions syntax<a class="headerlink" href="#permissions-syntax" title="Permalink to this headline">¶</a></h2> |
| <p>In Usergrid, permissions are represented in the following format:</p> |
| <div class="highlight-python"><div class="highlight"><pre><operations>:<resource_path> |
| </pre></div> |
| </div> |
| <ul class="simple"> |
| <li><code class="docutils literal"><span class="pre"><operations></span></code>: A comma-delimited set of HTTP methods (<code class="docutils literal"><span class="pre">GET</span></code>, |
| <code class="docutils literal"><span class="pre">PUT</span></code>, <code class="docutils literal"><span class="pre">POST</span></code>, <code class="docutils literal"><span class="pre">DELETE</span></code>) that are allowed for the specified |
| resource path. For example, <code class="docutils literal"><span class="pre">get</span></code>, <code class="docutils literal"><span class="pre">post</span></code> would allow only |
| <code class="docutils literal"><span class="pre">GET</span></code> and <code class="docutils literal"><span class="pre">POST</span></code> requests to be made to the specified resource.</li> |
| <li><code class="docutils literal"><span class="pre"><resource_path></span></code>: The path to the resources to be accessed. For |
| example, <code class="docutils literal"><span class="pre">/users</span></code> would apply the permission to the users |
| collection, while <code class="docutils literal"><span class="pre">/users/Tom</span></code> would apply the permission to only |
| the user entity with username ‘Tom’.</li> |
| </ul> |
| </div> |
| <div class="section" id="complex-paths"> |
| <h2>Complex paths<a class="headerlink" href="#complex-paths" title="Permalink to this headline">¶</a></h2> |
| <p>Complex paths can be defined using <a class="reference external" href="http://ant.apache.org/manual/dirtasks.html#patterns">Apache Ant pattern |
| syntax</a>. The |
| following special path variables are supported for the construction of |
| complex paths:</p> |
| <table> |
| <tr> |
| <td><p>Parameter</p> |
| </td> |
| <td><p>Description</p> |
| </td> |
| </tr> |
| <tr> |
| <td><p>*</p> |
| </td> |
| <td><p>Treated as a wildcard. Assigns the permission to all paths at the |
| specified level in the path hierarchy. For example, <code class="docutils literal"><span class="pre">/*</span></code> would match |
| any collection, while <code class="docutils literal"><span class="pre">/users/Tom/*</span></code> would match /users/Tom/likes and |
| <code class="docutils literal"><span class="pre">/users/Tom/owns</span></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><p>**</p> |
| </td> |
| <td><p>Assigns the permission to the path recursively. For example, |
| <code class="docutils literal"><span class="pre">**/likes</span></code> would match <code class="docutils literal"><span class="pre">/likes</span></code> and <code class="docutils literal"><span class="pre">/users/likes</span></code>, while |
| <code class="docutils literal"><span class="pre">/users/**</span></code> would match <code class="docutils literal"><span class="pre">/users</span></code> and <code class="docutils literal"><span class="pre">/users/likes</span></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><p>${user}</p> |
| </td> |
| <td><p>Automatically sets the path segment to the UUID of the currently |
| authenticated user. For example, if you sent a request with a valid |
| access token for a user with UUID |
| <code class="docutils literal"><span class="pre">bd397ea1-a71c-3249-8a4c-62fd53c78ce7</span></code>, the path <code class="docutils literal"><span class="pre">/users/${user}</span></code> |
| would be interpreted as <code class="docutils literal"><span class="pre">/users/bd397ea1-a71c-3249-8a4c-62fd53c78ce7</span></code>, |
| assigning the permission only to that user entity.</p> |
| </td> |
| </tr> |
| </table></div> |
| <div class="section" id="assigning-permissions"> |
| <h2>Assigning permissions<a class="headerlink" href="#assigning-permissions" title="Permalink to this headline">¶</a></h2> |
| <p>Permissions can only be assigned to user, group or role entities. |
| Assigning permissions to roles can be particularly useful, as it allows |
| you to create sets of permissions that represent complex access |
| definitions, which can then be assigned to user and group entities. For |
| more on roles, see <a class="reference external" href="security-and-auth/using-roles.html">Using Roles</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>curl -X POST https://api.usergrid.com/<org>/<app>/<collection>/<entity>/permissions -d '{"permission":<permissions>}' |
| </pre></div> |
| </div> |
| <p>Parameters</p> |
| <table border="1" class="docutils"> |
| <colgroup> |
| <col width="9%" /> |
| <col width="91%" /> |
| </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>The collection of the entity that the permissions are to be assigned to.</td> |
| </tr> |
| <tr class="row-odd"><td>entity</td> |
| <td>The UUID of the entity to assign the permissions to. For users, username and for groups, name are also accepted.</td> |
| </tr> |
| <tr class="row-even"><td>permissions</td> |
| <td>The permissions to assign to the entity. See <a class="reference external" href="security-and-auth/using-permissions.html#permissions-syntax">Permissions syntax</a> for format.</td> |
| </tr> |
| </tbody> |
| </table> |
| <p>For collections, Valid values are users and groups.</p> |
| </div> |
| <div class="section" id="example-request"> |
| <h3>Example request<a class="headerlink" href="#example-request" title="Permalink to this headline">¶</a></h3> |
| <p>For example, the following cURL request would give the user ‘Tom’ POST |
| permission to the /users collection:</p> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X POST https://api.usergrid.com/your-org/your-app/users/Tom/permissions -d '{"permission":"post:/users"}' |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="example-response"> |
| <h3>Example response<a class="headerlink" href="#example-response" title="Permalink to this headline">¶</a></h3> |
| <p>The newly assigned permission is returned in the data property of the |
| response:</p> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"action"</span> <span class="p">:</span> <span class="s">"post"</span><span class="p">,</span> |
| <span class="s">"application"</span> <span class="p">:</span> <span class="s">"f34f4222-a166-11e2-a7f7-02e81adcf3d0"</span><span class="p">,</span> |
| <span class="s">"params"</span> <span class="p">:</span> <span class="p">{</span> <span class="p">},</span> |
| <span class="s">"uri"</span> <span class="p">:</span> <span class="s">"https://api.usergrid.com/your-org/your-app"</span><span class="p">,</span> |
| <span class="s">"entities"</span> <span class="p">:</span> <span class="p">[</span> <span class="p">],</span> |
| <span class="s">"data"</span> <span class="p">:</span> <span class="p">[</span> <span class="s">"post:/users"</span> <span class="p">],</span> |
| <span class="s">"timestamp"</span> <span class="p">:</span> <span class="mi">1402349612382</span><span class="p">,</span> |
| <span class="s">"duration"</span> <span class="p">:</span> <span class="mi">19</span><span class="p">,</span> |
| <span class="s">"organization"</span> <span class="p">:</span> <span class="s">"your-org"</span><span class="p">,</span> |
| <span class="s">"applicationName"</span> <span class="p">:</span> <span class="s">"your-app"</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="removing-permissions"> |
| <h2>Removing permissions<a class="headerlink" href="#removing-permissions" title="Permalink to this headline">¶</a></h2> |
| <p>Using a DELETE request, you can remove one of more permissions from a |
| user, group, or role entity.</p> |
| <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 DELETE https://api.usergrid.com/<org>/<app>/<collection>/<entity>/permissions?=<permissions> |
| </pre></div> |
| </div> |
| <p>Parameters</p> |
| <table border="1" class="docutils"> |
| <colgroup> |
| <col width="11%" /> |
| <col width="89%" /> |
| </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>The collection of the entity that the permissions are to be assigned to. Valid values are users and groups.</td> |
| </tr> |
| <tr class="row-odd"><td>entity</td> |
| <td>The UUID of the entity to assign the permissions to. For users, username and for groups, name are also accepted.</td> |
| </tr> |
| <tr class="row-even"><td>permissions</td> |
| <td>The permissions to assign to the entity. See <a class="reference external" href="using-permissions.html">Permissions syntax</a> for format.</td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="id2"> |
| <h3>Example request<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X DELETE https://api.usergrid.com/your-org/your-app/users/Tom/permissions?permission=post:/users |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id3"> |
| <h3>Example response<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3> |
| <p>The deleted permission is returned in the params.permission property of |
| the response:</p> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"action"</span> <span class="p">:</span> <span class="s">"delete"</span><span class="p">,</span> |
| <span class="s">"application"</span> <span class="p">:</span> <span class="s">"f34f4222-a166-11e2-a7f7-02e81adcf3d0"</span><span class="p">,</span> |
| <span class="s">"params"</span> <span class="p">:</span> <span class="p">{</span> |
| <span class="s">"permission"</span> <span class="p">:</span> <span class="p">[</span> <span class="s">"post:/users"</span> <span class="p">]</span> |
| <span class="p">},</span> |
| <span class="s">"uri"</span> <span class="p">:</span> <span class="s">"https://api.usergrid.com/your-org/your-app"</span><span class="p">,</span> |
| <span class="s">"entities"</span> <span class="p">:</span> <span class="p">[</span> <span class="p">],</span> |
| <span class="s">"data"</span> <span class="p">:</span> <span class="p">[</span> <span class="s">"post:/assets"</span> <span class="p">],</span> |
| <span class="s">"timestamp"</span> <span class="p">:</span> <span class="mi">1402349951530</span><span class="p">,</span> |
| <span class="s">"duration"</span> <span class="p">:</span> <span class="mi">20</span><span class="p">,</span> |
| <span class="s">"organization"</span> <span class="p">:</span> <span class="s">"your-org"</span><span class="p">,</span> |
| <span class="s">"applicationName"</span> <span class="p">:</span> <span class="s">"your-app"</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="using-roles.html" class="btn btn-neutral float-right" title="Using roles" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="app-security.html" class="btn btn-neutral" title="Security & token authentication" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p> |
| © 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> |