| |
| |
| <!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>Admin user — Apache Usergrid 1.0 documentation</title> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> |
| |
| |
| |
| |
| |
| <link rel="top" title="Apache Usergrid 1.0 documentation" href="../index.html"/> |
| <link rel="next" title="Methods" href="../rest-endpoints/api-docs.html"/> |
| <link rel="prev" title="Application" href="application.html"/> |
| |
| |
| <script src="../_static/js/modernizr.min.js"></script> |
| |
| </head> |
| |
| <body class="wy-body-for-nav" role="document"> |
| |
| <div class="wy-grid-for-nav"> |
| |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-nav-search"> |
| |
| |
| |
| <a href="../index.html" class="icon icon-home"> Apache Usergrid |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| <div class="version"> |
| 1.0 |
| </div> |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| <p class="caption"><span class="caption-text">Introduction</span></p> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../introduction/overview.html">Documentation Overview</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">Getting Started</span></p> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../getting-started/creating-account.html">Creating an Usergrid Account</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../getting-started/creating-a-new-application.html">Creating a new application</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../getting-started/using-a-sandbox-app.html">Using a Sandbox Application</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../getting-started/using-the-api.html">Using the API</a></li> |
| </ul> |
| <p class="caption"><span class="caption-text">Data Storage</span></p> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../data-storage/data-store-dbms.html">The Usergrid Data Store</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../data-storage/optimizing-access.html">Data Store Best Practices</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../data-storage/collections.html">Collections</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../data-storage/entities.html">Entities</a></li> |
| </ul> |
| <p class="caption"><span class="caption-text">Data Queries</span></p> |
| <ul> |
| <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> |
| <li class="toctree-l1"><a class="reference internal" href="../security-and-auth/app-security.html">Security & 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 & 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 & 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 class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="managing.html">Organization & application management</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="organization.html">Organization</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="application.html">Application</a></li> |
| <li class="toctree-l1 current"><a class="current reference internal" href="">Admin user</a><ul> |
| <li class="toctree-l2"><a class="reference internal" href="#creating-an-admin-user">Creating an admin user</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#request-uri">Request URI</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="#updating-an-admin-user">Updating an admin user</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#id1">Request URI</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> |
| <li class="toctree-l2"><a class="reference internal" href="#getting-an-admin-user">Getting an admin user</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#id4">Request URI</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id5">Example - Request</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id6">Example - Response</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="#setting-an-admin-user-s-password">Setting an admin user’s password</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#id7">Request URI</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id8">Example - Request</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id9">Example - Response</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="#resetting-an-admin-user-s-password">Resetting an admin user’s password</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#initiating-a-password-reset">Initiating a password reset</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id10">Request URI</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id11">Example - Request</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id12">Example - Response</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="#completing-a-password-reset">Completing a password reset</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#id13">Request URI</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id14">Example - Request</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id15">Example - Response</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="#activating-an-admin-user">Activating an admin user</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#id16">Request URI</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id17">Example - Request</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id18">Example - Response</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="#reactivating-an-admin-user">Reactivating an admin user</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#id19">Request URI</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="#id20">Example - Request</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#id21">Example - Response</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="#getting-an-admin-user-s-activity-feed">Getting an admin user’s activity feed</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#id22">Request URI</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id23">Example - Request</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#id24">Example - Response</a></li> |
| </ul> |
| </li> |
| </ul> |
| </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 the Stack</span></p> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../installation/ug1-deploy-to-tomcat.html">Usegrid 1: Deploying to Tomcat</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../installation/ug1-launcher-quick-start.html">Usegrid 1: Launcher Quick-start</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../installation/ug2-deploy-to-tomcat.html">Usergrid 2: Deploy to Tomcat</a></li> |
| </ul> |
| <p class="caption"><span class="caption-text">More about Usergrid</span></p> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../reference/presos-and-videos.html">Presentations & 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>Admin user</li> |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="../_sources/orgs-and-apps/admin-user.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="admin-user"> |
| <h1>Admin user<a class="headerlink" href="#admin-user" title="Permalink to this headline">¶</a></h1> |
| <p>An admin user has full access to perform any operation on all |
| organization accounts of which the admin user is a member. Using the API |
| Services BaaS API, you can create, update, or retrieve an admin user. |
| You can also set or reset an admin user’s password, activite or |
| reactivate an admin user, and get an admin user’s activity feed.</p> |
| <p>In addition, you can add, retrieve, or remove an admin user from an |
| organization. For information on these organization-related operations, |
| see <a class="reference external" href="organization.html">Organization</a>.</p> |
| <p><strong>Note</strong>: Although not shown in the API examples below, you need to |
| provide a valid access token with each API call. See <a class="reference external" href="../security_and_auth/authenticating-users-and-application-clients.html">Authenticating |
| users and application |
| clients</a> |
| for details.</p> |
| <div class="section" id="creating-an-admin-user"> |
| <h2>Creating an admin user<a class="headerlink" href="#creating-an-admin-user" title="Permalink to this headline">¶</a></h2> |
| <p>Use the POST method to create an admin user.</p> |
| <div class="section" id="request-uri"> |
| <h3>Request URI<a class="headerlink" href="#request-uri" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>POST /management/organizations/{org}/users {request body} |
| </pre></div> |
| </div> |
| <p>In the request body send a JSON object that represents the new user, for |
| example:</p> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"username"</span> <span class="p">:</span> <span class="s">"jim.admin"</span><span class="p">,</span> |
| <span class="s">"email"</span> <span class="p">:</span> <span class="s">"jim.admin@gmail.com"</span><span class="p">,</span> |
| <span class="s">"name"</span> <span class="p">:</span> <span class="s">"Jim Admin"</span><span class="p">,</span> |
| <span class="s">"password"</span> <span class="p">:</span> <span class="s">"test12345"</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="example-request"> |
| <h3>Example - Request<a class="headerlink" href="#example-request" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X -i POST "https://api.usergrid.com/management/organizations/my-org/users" -d '{"username":"jim.admin","name":"Jim Admin","email":"jim.admin@gmail.com","password":"test12345"}' |
| </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> |
| <div class="highlight-python"><div class="highlight"><pre>{ |
| "action": "post", |
| "status": "ok", |
| "data": { |
| "user": { |
| "applicationId": "00000000-0000-0000-0000-000000000001", |
| "username": "jim.admin", |
| "name": "Jim Admin", |
| "email": "jim.admin@gmail.com", |
| "activated": true, |
| "disabled": false, |
| "uuid": "335b527f-cd0d-11e1-bef8-12331d1c5591", |
| "adminUser": true, |
| "displayEmailAddress": "jim.admin <jim.admin@gmail.com>", |
| "htmldisplayEmailAddress": "jim.admin <a href="mailto:jim.admin@gmail.com">jinm.admin@gmail.com</a>" |
| } |
| }, |
| "timestamp": 1349390189106, |
| "duration": 11808 |
| } |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="updating-an-admin-user"> |
| <h2>Updating an admin user<a class="headerlink" href="#updating-an-admin-user" title="Permalink to this headline">¶</a></h2> |
| <p>Use the PUT method to update an admin user.</p> |
| <div class="section" id="id1"> |
| <h3>Request URI<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>PUT /management/organizations/{org}/users/{user|username|email|uuid} {request body} |
| </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>User identifier</td> |
| <td>Username, name, email address, or UUID.</td> |
| </tr> |
| <tr class="row-odd"><td>request body</td> |
| <td>JSON object containing propties you would like to add/update on user.</td> |
| </tr> |
| </tbody> |
| </table> |
| <p>For example, to add city and state to user, send this:</p> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"city"</span> <span class="p">:</span> <span class="s">"San Francisco"</span><span class="p">,</span> |
| <span class="s">"state"</span> <span class="p">:</span> <span class="s">"California"</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </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 -i PUT "https://api.usergrid.com/management/organizations/my-org/users/jim.admin" -d '{"city":"San Francisco","state":"California"}' |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id3"> |
| <h3>Example - Response<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"action"</span><span class="p">:</span> <span class="s">"update user info"</span><span class="p">,</span> |
| <span class="s">"timestamp"</span><span class="p">:</span> <span class="mi">1349479321874</span><span class="p">,</span> |
| <span class="s">"duration"</span><span class="p">:</span> <span class="mi">0</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="getting-an-admin-user"> |
| <h2>Getting an admin user<a class="headerlink" href="#getting-an-admin-user" title="Permalink to this headline">¶</a></h2> |
| <p>Use the GET method to retrieve details about an admin user.</p> |
| <div class="section" id="id4"> |
| <h3>Request URI<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="n">GET</span> <span class="o">/</span><span class="n">management</span><span class="o">/</span><span class="n">organizations</span><span class="o">/</span><span class="p">{</span><span class="n">org</span><span class="p">}</span><span class="o">/</span><span class="n">users</span><span class="o">/</span><span class="p">{</span><span class="n">user</span><span class="o">|</span><span class="n">username</span><span class="o">|</span><span class="n">email</span><span class="o">|</span><span class="n">uuid</span><span class="p">}</span> |
| </pre></div> |
| </div> |
| <p>Parameters</p> |
| <table border="1" class="docutils"> |
| <colgroup> |
| <col width="28%" /> |
| <col width="72%" /> |
| </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>User identifier</td> |
| <td>Admin username, name, email address, or UUID.</td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="id5"> |
| <h3>Example - Request<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X GET "https://api.usergrid.com/management/organizations/my-org/users/jim.admin" |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id6"> |
| <h3>Example - Response<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>{ |
| "action": "get admin user", |
| "status": "ok", |
| "data": { |
| "username": "jim.admin", |
| "token": "YWMt4NqE8Q9GEeLYJhIxPSiO4AAAATo5fQfcG0cEd2h9nwmDmRorkNNrEeQyDOF", |
| "email": "edort1@gmail.com", |
| "organizations": { |
| "jim.admin": { |
| "users": { |
| "jim.admin": { |
| "applicationId": "00000000-0000-0000-0000-000000000001", |
| "username": "jim.admin", |
| "name": "Jim Admin", |
| "email": "jim.admin@gmail.com", |
| "activated": true, |
| "disabled": false, |
| "uuid": "328b526e-cd0c-11e1-bcf8-12424d1c4491", |
| "adminUser": true, |
| "displayEmailAddress": "jim.admin <jim.admin@gmail.com>", |
| "htmldisplayEmailAddress": "jim.admin <<a href="mailto:jim.admin@gmail.com">jim.admin@gmail.com>" |
| }, |
| ... |
| "adminUser": true, |
| "activated": true, |
| "name": "edort1", |
| "applicationId": "00000000-0000-0000-0000-000000000001", |
| "uuid": "328b526e-cd0c-11e1-bcf8-12424d1c4491", |
| "htmldisplayEmailAddress": "jim.admin <<a href="mailto:jim.admin@gmail.com">jim.admin@gmail.com>>", |
| "displayEmailAddress": "jim.admin <jim.admin@gmail.com>", |
| "disabled": false |
| }, |
| "timestamp": 1349480786906 |
| } |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="setting-an-admin-user-s-password"> |
| <h2>Setting an admin user’s password<a class="headerlink" href="#setting-an-admin-user-s-password" title="Permalink to this headline">¶</a></h2> |
| <p>Use the PUT method to update an admin user’s password.</p> |
| <div class="section" id="id7"> |
| <h3>Request URI<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>PUT /management/users/{user|username|email|uuid}/password {request body} |
| </pre></div> |
| </div> |
| <p>Parameters</p> |
| <table border="1" class="docutils"> |
| <colgroup> |
| <col width="28%" /> |
| <col width="72%" /> |
| </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>User identifier</td> |
| <td>Admin username, name, email address, or UUID.</td> |
| </tr> |
| </tbody> |
| </table> |
| <p>Expects new and old password to be sent in request body:</p> |
| <div class="highlight-python"><div class="highlight"><pre>{ |
| "password": <old_password> |
| "newpassword":<new_password> |
| } |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id8"> |
| <h3>Example - Request<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X -i PUT "https://api.usergrid.com/management/users/jim.admin/password" -d '{"oldpassword":"test123", "newpassword":"mynewpassword"}' |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id9"> |
| <h3>Example - Response<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"action"</span><span class="p">:</span> <span class="s">"set user password"</span><span class="p">,</span> |
| <span class="s">"timestamp"</span><span class="p">:</span> <span class="mi">1349714010142</span><span class="p">,</span> |
| <span class="s">"duration"</span><span class="p">:</span> <span class="mi">0</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="resetting-an-admin-user-s-password"> |
| <h2>Resetting an admin user’s password<a class="headerlink" href="#resetting-an-admin-user-s-password" title="Permalink to this headline">¶</a></h2> |
| <p>Resetting an admin user’s password is a two step process. In the first |
| step, you initiate the password reset. This returns a browser page. The |
| page includes a field for the user to enter his or her email address, |
| and a field to enter a response to a Captcha challenge. In the second |
| step, you handle the user’s responses from the form.</p> |
| <div class="section" id="initiating-a-password-reset"> |
| <h3>Initiating a password reset<a class="headerlink" href="#initiating-a-password-reset" title="Permalink to this headline">¶</a></h3> |
| <p>Use the GET method to initiate the password reset.</p> |
| </div> |
| <div class="section" id="id10"> |
| <h3>Request URI<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="n">GET</span> <span class="o">/</span><span class="n">management</span><span class="o">/</span><span class="n">organizations</span><span class="o">/</span><span class="p">{</span><span class="n">org</span><span class="p">}</span><span class="o">/</span><span class="n">users</span><span class="o">/</span><span class="n">resetpw</span> |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id11"> |
| <h3>Example - Request<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X GET "https://api.usergrid.com/management/organizations/my-org/users/resetpw" |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id12"> |
| <h3>Example - Response<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <title>Reset Password</title> |
| <link rel="stylesheet" type="text/css" href="../../css/styles.css" /> |
| <script type="text/javascript">> |
| var RecaptchaOptions = { |
| theme : 'clean' |
| }; |
| </script> |
| </head> |
| <body> |
| |
| <div class="dialog-area"> |
| <div class="dialog-form-message">Incorrect Captcha, try again...</div> |
| <form class="dialog-form" action="" method="post"> |
| <fieldset> |
| <p> |
| <label for="email">Please type your <strong>email |
| address</strong> or <strong>username</strong> below.</label> |
| </p> |
| <p> |
| <input class="text_field" id="email" name="email" type="text" /> |
| </p> |
| <p id="human-proof"></p> |
| <script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k=6LdSTNESAAAAAKHdVglHmMu86_EoYxsJjqQD1IpZ"></script> |
| |
| <p class="buttons"> |
| <button type="submit">Submit</button> |
| </p> |
| </fieldset> |
| </form> |
| </div> |
| </pre> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="completing-a-password-reset"> |
| <h2>Completing a password reset<a class="headerlink" href="#completing-a-password-reset" title="Permalink to this headline">¶</a></h2> |
| <p>Use the POST method to complete the password reset.</p> |
| <div class="section" id="id13"> |
| <h3>Request URI<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>POST /management/organizations/{org}/users/resetpw {request body} |
| </pre></div> |
| </div> |
| <p>In the request body send parameters and value for the Captcha challenge, |
| the admin user’s response to the Captcha challenge, and the admin user’s |
| email address, for example:</p> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"recaptcha_response_field"</span> <span class="p">:</span> <span class="s">"Atistophanes tseFia"</span><span class="p">,</span> |
| <span class="s">"recaptcha_challenge_field"</span> <span class="p">:</span> <span class="s">"Atistophanes tseFia"</span><span class="p">,</span> |
| <span class="s">"email"</span> <span class="p">:</span> <span class="s">"jim.admin@gmail.com"</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id14"> |
| <h3>Example - Request<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X -i POST "https://api.usergrid.com/management/organizations/my-org/users/resetpw" -d '{"recaptcha_response_field":"Atistophanes tseFia","recaptcha_challenge_field":"Atistophanes tseFia","email":"jim.admin@gmail.com"}' |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id15"> |
| <h3>Example - Response<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"action"</span><span class="p">:</span> <span class="s">"reset user password"</span><span class="p">,</span> |
| <span class="s">"timestamp"</span><span class="p">:</span> <span class="mi">13546154010321</span><span class="p">,</span> |
| <span class="s">"duration"</span><span class="p">:</span> <span class="mi">0</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="activating-an-admin-user"> |
| <h2>Activating an admin user<a class="headerlink" href="#activating-an-admin-user" title="Permalink to this headline">¶</a></h2> |
| <p>Use the GET method to activate an admin user from a link provided in an |
| email notification.</p> |
| <div class="section" id="id16"> |
| <h3>Request URI<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>GET /management/organizations/{org}/users/{user|username|email|uuid}/activate?token={token}&confirm={confirm_email} |
| </pre></div> |
| </div> |
| <p>Parameters</p> |
| <table border="1" class="docutils"> |
| <colgroup> |
| <col width="27%" /> |
| <col width="73%" /> |
| </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>User identifier</td> |
| <td>Admin username, name, email address, or UUID.</td> |
| </tr> |
| <tr class="row-odd"><td>string token</td> |
| <td>Activation token (supplied via email).</td> |
| </tr> |
| <tr class="row-even"><td>confirm_email</td> |
| <td>Send confirmation email (false is the default).</td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="id17"> |
| <h3>Example - Request<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X GET "https://api.usergrid.com/management/organizations/my-org/users/jim.admin/activate?token=33dd0563-cd0c-11e1-bcf7-12313d1c4491" |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id18"> |
| <h3>Example - Response<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"action"</span><span class="p">:</span> <span class="s">"activate user"</span><span class="p">,</span> |
| <span class="s">"timestamp"</span><span class="p">:</span> <span class="mi">1349718021324</span><span class="p">,</span> |
| <span class="s">"duration"</span><span class="p">:</span> <span class="mi">0</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="reactivating-an-admin-user"> |
| <h2>Reactivating an admin user<a class="headerlink" href="#reactivating-an-admin-user" title="Permalink to this headline">¶</a></h2> |
| <p>Use the GET method to reactivate an admin user.</p> |
| <div class="section" id="id19"> |
| <h3>Request URI<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="n">GET</span> <span class="o">/</span><span class="n">management</span><span class="o">/</span><span class="n">organizations</span><span class="o">/</span><span class="p">{</span><span class="n">org</span><span class="p">}</span><span class="o">/</span><span class="n">users</span><span class="o">/</span><span class="p">{</span><span class="n">user</span><span class="o">|</span><span class="n">username</span><span class="o">|</span><span class="n">email</span><span class="o">|</span><span class="n">uuid</span><span class="p">}</span><span class="o">/</span><span class="n">reactivate</span> |
| </pre></div> |
| </div> |
| <p>Parameters</p> |
| <table border="1" class="docutils"> |
| <colgroup> |
| <col width="28%" /> |
| <col width="72%" /> |
| </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>User identifier</td> |
| <td>Admin username, name, email address, or UUID.</td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div class="section" id="id20"> |
| <h2>Example - Request<a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h2> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X GET "https://api.usergrid.com/management/organizations/my-org/users/jim.admin/reactivate" |
| </pre></div> |
| </div> |
| <div class="section" id="id21"> |
| <h3>Example - Response<a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="p">{</span> |
| <span class="s">"action"</span><span class="p">:</span> <span class="s">"reactivate user"</span><span class="p">,</span> |
| <span class="s">"timestamp"</span><span class="p">:</span> <span class="mi">1349735217217</span><span class="p">,</span> |
| <span class="s">"duration"</span><span class="p">:</span> <span class="mi">3541</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="getting-an-admin-user-s-activity-feed"> |
| <h2>Getting an admin user’s activity feed<a class="headerlink" href="#getting-an-admin-user-s-activity-feed" title="Permalink to this headline">¶</a></h2> |
| <p>Use the GET method to retrieve an admin user’s activity feed.</p> |
| <div class="section" id="id22"> |
| <h3>Request URI<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre><span class="n">GET</span> <span class="o">/</span><span class="n">management</span><span class="o">/</span><span class="n">organizations</span><span class="o">/</span><span class="p">{</span><span class="n">org</span><span class="p">}</span><span class="o">/</span><span class="n">users</span><span class="o">/</span><span class="p">{</span><span class="n">user</span><span class="o">|</span><span class="n">username</span><span class="o">|</span><span class="n">email</span><span class="o">|</span><span class="n">uuid</span><span class="p">}</span><span class="o">/</span><span class="n">feed</span> |
| </pre></div> |
| </div> |
| <p>Parameters</p> |
| <table border="1" class="docutils"> |
| <colgroup> |
| <col width="28%" /> |
| <col width="72%" /> |
| </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>User identifier</td> |
| <td>Admin username, name, email address, or UUID.</td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="id23"> |
| <h3>Example - Request<a class="headerlink" href="#id23" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>curl -X GET "https://api.usergrid.com/management/organizations/my-org/users/jim.admin/feed" |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="id24"> |
| <h3>Example - Response<a class="headerlink" href="#id24" title="Permalink to this headline">¶</a></h3> |
| <div class="highlight-python"><div class="highlight"><pre>{ |
| "action": "get admin user feed", |
| "status": "ok", |
| "entities": [ |
| { |
| "uuid": "cf3e981c-fe80-11e1-95c8-12331b144c65", |
| "type": "activity", |
| "created": 1347643370454, |
| "modified": 1347643370454, |
| "actor": { |
| "displayName": "jim.admin", |
| "objectType": "person", |
| "uuid": "335b527f-cd0d-11e1-bef8-12331d1c5591", |
| "entityType": "user" |
| }, |
| "category": "admin", |
| "metadata": { |
| "cursor": "gGkAAQMAgGkABgE5xc3r1gCAdQAQz02YHP6QEeGVyBIxOxIsVgCAdQAQz4ZbYf6QEeGVyBIxOxIsVgA", |
| "path": "/users/327b527f-cd0c-11e1-bcf7-12313d1c4491/feed/cf4d981c-fe90-11e1-95c8-12313b122c56" |
| }, |
| "object": { |
| ... |
| }, |
| "published": 1342198809251, |
| "title": "<a mailto="jim.admingmail.com">jim.admin (jim.admin@gmail.com)</a> created a new organization account named jim.admin", |
| "verb": "create" |
| } |
| ], |
| "timestamp": 1349735719320, |
| } |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| |
| </div> |
| </div> |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="../rest-endpoints/api-docs.html" class="btn btn-neutral float-right" title="Methods" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="application.html" class="btn btn-neutral" title="Application" 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:'1.0', |
| COLLAPSE_INDEX:false, |
| FILE_SUFFIX:'.html', |
| HAS_SOURCE: true |
| }; |
| </script> |
| <script type="text/javascript" src="../_static/jquery.js"></script> |
| <script type="text/javascript" src="../_static/underscore.js"></script> |
| <script type="text/javascript" src="../_static/doctools.js"></script> |
| |
| |
| |
| |
| |
| <script type="text/javascript" src="../_static/js/theme.js"></script> |
| |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.StickyNav.enable(); |
| }); |
| </script> |
| |
| |
| </body> |
| </html> |