403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/projects/nextcloud/core/doc/admin/configuration_user/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/projects/nextcloud/core/doc/admin/configuration_user/instruction_set_for_users.html

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Instruction set for users &mdash; Nextcloud latest Administration Manual latest documentation</title>
  

  
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/custom.css" type="text/css" />

  
  
  
  

  
  <!--[if lt IE 9]>
    <script src="../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
        <script src="../_static/jquery.js"></script>
        <script src="../_static/underscore.js"></script>
        <script src="../_static/doctools.js"></script>
        <script src="../_static/language_data.js"></script>
    
    <script type="text/javascript" src="../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Instruction set for groups" href="instruction_set_for_groups.html" />
    <link rel="prev" title="User provisioning API" href="user_provisioning_api.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../contents.html">
          

          
            
            <img src="../_static/logo-white.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<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">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release_notes.html">Release notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release_schedule.html">Maintenance and release schedule</a></li>
<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation and server configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_server/index.html">Nextcloud configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../apps_management.html">Apps management</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">User management</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="user_configuration.html">User management</a></li>
<li class="toctree-l2"><a class="reference internal" href="reset_admin_password.html">Resetting a lost admin password</a></li>
<li class="toctree-l2"><a class="reference internal" href="reset_user_password.html">Resetting a user password</a></li>
<li class="toctree-l2"><a class="reference internal" href="user_password_policy.html">User password policy</a></li>
<li class="toctree-l2"><a class="reference internal" href="two_factor-auth.html">Two-factor authentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="user_auth_ftp_smb_imap.html">User authentication with IMAP, SMB, FTP and others</a></li>
<li class="toctree-l2"><a class="reference internal" href="user_auth_ldap.html">User authentication with LDAP</a></li>
<li class="toctree-l2"><a class="reference internal" href="user_auth_ldap_cleanup.html">LDAP user cleanup</a></li>
<li class="toctree-l2"><a class="reference internal" href="user_auth_ldap_api.html">The LDAP configuration API</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="user_provisioning_api.html">User provisioning API</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">Instruction set for users</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#add-a-new-user">Add a new user</a></li>
<li class="toctree-l4"><a class="reference internal" href="#search-get-users">Search/get users</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-data-of-a-single-user">Get data of a single user</a></li>
<li class="toctree-l4"><a class="reference internal" href="#edit-data-of-a-single-user">Edit data of a single user</a></li>
<li class="toctree-l4"><a class="reference internal" href="#disable-a-user">Disable a user</a></li>
<li class="toctree-l4"><a class="reference internal" href="#enable-a-user">Enable a user</a></li>
<li class="toctree-l4"><a class="reference internal" href="#delete-a-user">Delete a user</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-user-s-groups">Get user’s groups</a></li>
<li class="toctree-l4"><a class="reference internal" href="#add-user-to-group">Add user to group</a></li>
<li class="toctree-l4"><a class="reference internal" href="#remove-user-from-group">Remove user from group</a></li>
<li class="toctree-l4"><a class="reference internal" href="#promote-user-to-subadmin">Promote user to subadmin</a></li>
<li class="toctree-l4"><a class="reference internal" href="#demote-user-from-subadmin">Demote user from subadmin</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-user-s-subadmin-groups">Get user’s subadmin groups</a></li>
<li class="toctree-l4"><a class="reference internal" href="#resend-the-welcome-email">Resend the welcome email</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="instruction_set_for_groups.html">Instruction set for groups</a></li>
<li class="toctree-l3"><a class="reference internal" href="instruction_set_for_apps.html">Instruction set for apps</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_files/index.html">File sharing and management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../file_workflows/index.html">File workflows</a></li>
<li class="toctree-l1"><a class="reference internal" href="../groupware/index.html">Groupware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_database/index.html">Database configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_mimetypes/index.html">Mimetypes management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues and troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="../gdpr/index.html">GDPR</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../contents.html">Nextcloud latest Administration Manual</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content style-external-links">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../contents.html" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="index.html">User management</a> &raquo;</li>
        
          <li><a href="user_provisioning_api.html">User provisioning API</a> &raquo;</li>
        
      <li>Instruction set for users</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            
              <a href="https://github.com/nextcloud/documentation/edit/master/admin_manual/configuration_user/instruction_set_for_users.rst" class="fa fa-github"> Edit on GitHub</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="instruction-set-for-users">
<h1>Instruction set for users<a class="headerlink" href="#instruction-set-for-users" title="Permalink to this headline">¶</a></h1>
<div class="section" id="add-a-new-user">
<h2>Add a new user<a class="headerlink" href="#add-a-new-user" title="Permalink to this headline">¶</a></h2>
<p>Create a new user on the Nextcloud server. Authentication is done by sending a
basic HTTP authentication header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users</strong></p>
<ul class="simple">
<li><p>HTTP method: POST</p></li>
<li><p>POST argument: userid - string, the required username for the new user</p></li>
<li><p>POST argument: password - string, the password for the new user, leave empty to send welcome mail</p></li>
<li><p>POST argument: displayName - string, the display name for the new user</p></li>
<li><p>POST argument: email - string, the email for the new user, required if password empty</p></li>
<li><p>POST argument: groups - array, the groups for the new user</p></li>
<li><p>POST argument: subadmin - array, the groups in which the new user is subadmin</p></li>
<li><p>POST argument: quota - string, quota for the new user</p></li>
<li><p>POST argument: language - string, language for the new user</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - invalid input data</p></li>
<li><p>102 - username already exists</p></li>
<li><p>103 - unknown error occurred whilst adding the user</p></li>
<li><p>104 - group does not exist</p></li>
<li><p>105 - insufficient privileges for group</p></li>
<li><p>106 - no group specified (required for subadmins)</p></li>
<li><p>107 - all errors that contain a hint - for example “Password is among the 1,000,000 most common ones. Please make it unique.” (this code was added in 12.0.6 &amp; 13.0.1)</p></li>
<li><p>108 - password and email empty. Must set password or an email</p></li>
<li><p>109 - invitation email cannot be send</p></li>
</ul>
<div class="section" id="example">
<h3>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST http://admin:secret@example.com/ocs/v1.php/cloud/users -d userid=&quot;Frank&quot; -d password=&quot;frankspassword&quot;
</pre></div>
</div>
<ul class="simple">
<li><p>Creates the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code> with password <code class="docutils literal notranslate"><span class="pre">frankspassword</span></code></p></li>
<li><p>optionally groups can be specified by one or more <code class="docutils literal notranslate"><span class="pre">groups[]</span></code> query parameters:
<code class="docutils literal notranslate"><span class="pre">URL</span> <span class="pre">-d</span> <span class="pre">groups[]=&quot;admin&quot;</span> <span class="pre">-D</span> <span class="pre">groups[]=&quot;Team1&quot;</span></code></p></li>
</ul>
</div>
<div class="section" id="xml-output">
<h3>XML output<a class="headerlink" href="#xml-output" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
 <span class="nt">&lt;meta&gt;</span>
  <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
  <span class="nt">&lt;message/&gt;</span>
 <span class="nt">&lt;/meta&gt;</span>
 <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="search-get-users">
<h2>Search/get users<a class="headerlink" href="#search-get-users" title="Permalink to this headline">¶</a></h2>
<p>Retrieves a list of users from the Nextcloud server. Authentication is done by
sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users</strong></p>
<ul class="simple">
<li><p>HTTP method: GET</p></li>
<li><p>url arguments: search - string, optional search string</p></li>
<li><p>url arguments: limit - int, optional limit value</p></li>
<li><p>url arguments: offset - int, optional offset value</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
</ul>
<div class="section" id="id1">
<h3>Example<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/users?search=Frank
</pre></div>
</div>
<ul class="simple">
<li><p>Returns list of users matching the search string.</p></li>
</ul>
</div>
<div class="section" id="id2">
<h3>XML output<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data&gt;</span>
    <span class="nt">&lt;users&gt;</span>
      <span class="nt">&lt;element&gt;</span>Frank<span class="nt">&lt;/element&gt;</span>
     <span class="nt">&lt;/users&gt;</span>
  <span class="nt">&lt;/data&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="get-data-of-a-single-user">
<h2>Get data of a single user<a class="headerlink" href="#get-data-of-a-single-user" title="Permalink to this headline">¶</a></h2>
<p>Retrieves information about a single user. Authentication is done by sending a
Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}</strong></p>
<ul class="simple">
<li><p>HTTP method: GET</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
</ul>
<div class="section" id="id3">
<h3>Example<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank
</pre></div>
</div>
<ul class="simple">
<li><p>Returns information on the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code></p></li>
</ul>
</div>
<div class="section" id="id4">
<h3>XML output<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data&gt;</span>
    <span class="nt">&lt;enabled&gt;</span>true<span class="nt">&lt;/enabled&gt;</span>
    <span class="nt">&lt;id&gt;</span>Frank<span class="nt">&lt;/id&gt;</span>
    <span class="nt">&lt;quota&gt;</span>0<span class="nt">&lt;/quota&gt;</span>
    <span class="nt">&lt;email&gt;</span>frank@example.org<span class="nt">&lt;/email&gt;</span>
    <span class="nt">&lt;displayname&gt;</span>Frank K.<span class="nt">&lt;/displayname&gt;</span>
    <span class="nt">&lt;phone&gt;</span>0123 / 456 789<span class="nt">&lt;/phone&gt;</span>
    <span class="nt">&lt;address&gt;</span>Foobar 12, 12345 Town<span class="nt">&lt;/address&gt;</span>
    <span class="nt">&lt;website&gt;</span>https://nextcloud.com<span class="nt">&lt;/website&gt;</span>
    <span class="nt">&lt;twitter&gt;</span>Nextcloud<span class="nt">&lt;/twitter&gt;</span>
    <span class="nt">&lt;groups&gt;</span>
     <span class="nt">&lt;element&gt;</span>group1<span class="nt">&lt;/element&gt;</span>
     <span class="nt">&lt;element&gt;</span>group2<span class="nt">&lt;/element&gt;</span>
    <span class="nt">&lt;/groups&gt;</span>
  <span class="nt">&lt;/data&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="edit-data-of-a-single-user">
<h2>Edit data of a single user<a class="headerlink" href="#edit-data-of-a-single-user" title="Permalink to this headline">¶</a></h2>
<p>Edits attributes related to a user. Users are able to edit email, displayname
and password; admins can also edit the quota value. Authentication is done by
sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}</strong></p>
<ul class="simple">
<li><p>HTTP method: PUT</p></li>
<li><p>PUT argument: key, the field to edit:</p>
<ul>
<li><p>email</p></li>
<li><p>quota</p></li>
<li><p>displayname</p></li>
<li><p>display (<strong>deprecated</strong> use <cite>displayname</cite> instead)</p></li>
<li><p>phone</p></li>
<li><p>address</p></li>
<li><p>website</p></li>
<li><p>twitter</p></li>
<li><p>password</p></li>
</ul>
</li>
<li><p>PUT argument: value, the new value for the field</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - user not found</p></li>
<li><p>102 - invalid input data</p></li>
</ul>
<div class="section" id="examples">
<h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X PUT http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank -d key=&quot;email&quot; -d value=&quot;franksnewemail@example.org&quot;
</pre></div>
</div>
<ul class="simple">
<li><p>Updates the email address for the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code></p></li>
</ul>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X PUT http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank -d key=&quot;quota&quot; -d value=&quot;100MB&quot;
</pre></div>
</div>
<ul class="simple">
<li><p>Updates the quota for the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code></p></li>
</ul>
</div>
<div class="section" id="id5">
<h3>XML output<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="disable-a-user">
<h2>Disable a user<a class="headerlink" href="#disable-a-user" title="Permalink to this headline">¶</a></h2>
<p>Disables a user on the Nextcloud server so that the user cannot login anymore.
Authentication is done by sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/disable</strong></p>
<ul class="simple">
<li><p>HTTP method: PUT</p></li>
</ul>
<p>Statuscodes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - failure</p></li>
</ul>
<div class="section" id="id6">
<h3>Example<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X PUT http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/disable
</pre></div>
</div>
<ul class="simple">
<li><p>Disables the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code></p></li>
</ul>
</div>
<div class="section" id="id7">
<h3>XML output<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;message/&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="enable-a-user">
<h2>Enable a user<a class="headerlink" href="#enable-a-user" title="Permalink to this headline">¶</a></h2>
<p>Enables a user on the Nextcloud server so that the user can login again.
Authentication is done by sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/enable</strong></p>
<ul class="simple">
<li><p>HTTP method: PUT</p></li>
</ul>
<p>Statuscodes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - failure</p></li>
</ul>
<div class="section" id="id8">
<h3>Example<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X PUT http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/enable
</pre></div>
</div>
<ul class="simple">
<li><p>Enables the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code></p></li>
</ul>
</div>
<div class="section" id="id9">
<h3>XML output<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;message/&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="delete-a-user">
<h2>Delete a user<a class="headerlink" href="#delete-a-user" title="Permalink to this headline">¶</a></h2>
<p>Deletes a user from the Nextcloud server. Authentication is done by sending a
Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}</strong></p>
<ul class="simple">
<li><p>HTTP method: DELETE</p></li>
</ul>
<p>Statuscodes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - failure</p></li>
</ul>
<div class="section" id="id10">
<h3>Example<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X DELETE http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank
</pre></div>
</div>
<ul class="simple">
<li><p>Deletes the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code></p></li>
</ul>
</div>
<div class="section" id="id11">
<h3>XML output<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="get-user-s-groups">
<h2>Get user’s groups<a class="headerlink" href="#get-user-s-groups" title="Permalink to this headline">¶</a></h2>
<p>Retrieves a list of groups the specified user is a member of. Authentication is
done by sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/groups</strong></p>
<ul class="simple">
<li><p>HTTP method: GET</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
</ul>
<div class="section" id="id12">
<h3>Example<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups
</pre></div>
</div>
<ul class="simple">
<li><p>Retrieves a list of groups of which <code class="docutils literal notranslate"><span class="pre">Frank</span></code> is a member</p></li>
</ul>
</div>
<div class="section" id="id13">
<h3>XML output<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data&gt;</span>
    <span class="nt">&lt;groups&gt;</span>
      <span class="nt">&lt;element&gt;</span>admin<span class="nt">&lt;/element&gt;</span>
      <span class="nt">&lt;element&gt;</span>group1<span class="nt">&lt;/element&gt;</span>
    <span class="nt">&lt;/groups&gt;</span>
  <span class="nt">&lt;/data&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="add-user-to-group">
<h2>Add user to group<a class="headerlink" href="#add-user-to-group" title="Permalink to this headline">¶</a></h2>
<p>Adds the specified user to the specified group. Authentication is done by
sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/groups</strong></p>
<ul class="simple">
<li><p>HTTP method: POST</p></li>
<li><p>POST argument: groupid, string - the group to add the user to</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - no group specified</p></li>
<li><p>102 - group does not exist</p></li>
<li><p>103 - user does not exist</p></li>
<li><p>104 - insufficient privileges</p></li>
<li><p>105 - failed to add user to group</p></li>
</ul>
<div class="section" id="id14">
<h3>Example<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups -d groupid=&quot;newgroup&quot;
</pre></div>
</div>
<ul class="simple">
<li><p>Adds the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code> to the group <code class="docutils literal notranslate"><span class="pre">newgroup</span></code></p></li>
</ul>
</div>
<div class="section" id="id15">
<h3>XML output<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="remove-user-from-group">
<h2>Remove user from group<a class="headerlink" href="#remove-user-from-group" title="Permalink to this headline">¶</a></h2>
<p>Removes the specified user from the specified group. Authentication is done by
sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/groups</strong></p>
<ul class="simple">
<li><p>HTTP method: DELETE</p></li>
<li><p>DELETE argument: groupid, string - the group to remove the user from</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - no group specified</p></li>
<li><p>102 - group does not exist</p></li>
<li><p>103 - user does not exist</p></li>
<li><p>104 - insufficient privileges</p></li>
<li><p>105 - failed to remove user from group</p></li>
</ul>
<div class="section" id="id16">
<h3>Example<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X DELETE http://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/groups -d groupid=&quot;newgroup&quot;
</pre></div>
</div>
<ul class="simple">
<li><p>Removes the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code> from the group <code class="docutils literal notranslate"><span class="pre">newgroup</span></code></p></li>
</ul>
</div>
<div class="section" id="id17">
<h3>XML output<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="promote-user-to-subadmin">
<h2>Promote user to subadmin<a class="headerlink" href="#promote-user-to-subadmin" title="Permalink to this headline">¶</a></h2>
<p>Makes a user the subadmin of a group. Authentication is done by sending a Basic
HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/subadmins</strong></p>
<ul class="simple">
<li><p>HTTP method: POST</p></li>
<li><p>POST argument: groupid, string - the group of which to make the user a
subadmin</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - user does not exist</p></li>
<li><p>102 - group does not exist</p></li>
<li><p>103 - unknown failure</p></li>
</ul>
<div class="section" id="id18">
<h3>Example<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins -d groupid=&quot;group&quot;
</pre></div>
</div>
<ul class="simple">
<li><p>Makes the user <code class="docutils literal notranslate"><span class="pre">Frank</span></code> a subadmin of the <code class="docutils literal notranslate"><span class="pre">group</span></code> group</p></li>
</ul>
</div>
<div class="section" id="id19">
<h3>XML output<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="demote-user-from-subadmin">
<h2>Demote user from subadmin<a class="headerlink" href="#demote-user-from-subadmin" title="Permalink to this headline">¶</a></h2>
<p>Removes the subadmin rights for the user specified from the group specified.
Authentication is done by sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/subadmins</strong></p>
<ul class="simple">
<li><p>HTTP method: DELETE</p></li>
<li><p>DELETE argument: groupid, string - the group from which to remove the user’s
subadmin rights</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - user does not exist</p></li>
<li><p>102 - user is not a subadmin of the group / group does not exist</p></li>
<li><p>103 - unknown failure</p></li>
</ul>
<div class="section" id="id20">
<h3>Example<a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X DELETE https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins -d groupid=&quot;oldgroup&quot;
</pre></div>
</div>
<ul class="simple">
<li><p>Removes <code class="docutils literal notranslate"><span class="pre">Frank's</span></code> subadmin rights from the <code class="docutils literal notranslate"><span class="pre">oldgroup</span></code> group</p></li>
</ul>
</div>
<div class="section" id="id21">
<h3>XML output<a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
    <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="get-user-s-subadmin-groups">
<h2>Get user’s subadmin groups<a class="headerlink" href="#get-user-s-subadmin-groups" title="Permalink to this headline">¶</a></h2>
<p>Returns the groups in which the user is a subadmin. Authentication is done by
sending a Basic HTTP Authorization header.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/subadmins</strong></p>
<ul class="simple">
<li><p>HTTP method: GET</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - user does not exist</p></li>
<li><p>102 - unknown failure</p></li>
</ul>
<div class="section" id="id22">
<h3>Example<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/subadmins
</pre></div>
</div>
<ul class="simple">
<li><p>Returns the groups of which <code class="docutils literal notranslate"><span class="pre">Frank</span></code> is a subadmin</p></li>
</ul>
</div>
<div class="section" id="id23">
<h3>XML output<a class="headerlink" href="#id23" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
      <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
      <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;message/&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data&gt;</span>
    <span class="nt">&lt;element&gt;</span>testgroup<span class="nt">&lt;/element&gt;</span>
  <span class="nt">&lt;/data&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="resend-the-welcome-email">
<h2>Resend the welcome email<a class="headerlink" href="#resend-the-welcome-email" title="Permalink to this headline">¶</a></h2>
<p>The request to this endpoint triggers the welcome email for this user again.</p>
<p><strong>Syntax: ocs/v1.php/cloud/users/{userid}/welcome</strong></p>
<ul class="simple">
<li><p>HTTP method: POST</p></li>
</ul>
<p>Status codes:</p>
<ul class="simple">
<li><p>100 - successful</p></li>
<li><p>101 - email address not available</p></li>
<li><p>102 - sending email failed</p></li>
</ul>
<div class="section" id="id24">
<h3>Example<a class="headerlink" href="#id24" title="Permalink to this headline">¶</a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST https://admin:secret@example.com/ocs/v1.php/cloud/users/Frank/welcome
</pre></div>
</div>
<ul class="simple">
<li><p>Sends the welcome email to <code class="docutils literal notranslate"><span class="pre">Frank</span></code></p></li>
</ul>
</div>
<div class="section" id="id25">
<h3>XML output<a class="headerlink" href="#id25" title="Permalink to this headline">¶</a></h3>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;ocs&gt;</span>
  <span class="nt">&lt;meta&gt;</span>
      <span class="nt">&lt;status&gt;</span>ok<span class="nt">&lt;/status&gt;</span>
      <span class="nt">&lt;statuscode&gt;</span>100<span class="nt">&lt;/statuscode&gt;</span>
    <span class="nt">&lt;message/&gt;</span>
  <span class="nt">&lt;/meta&gt;</span>
  <span class="nt">&lt;data/&gt;</span>
<span class="nt">&lt;/ocs&gt;</span>
</pre></div>
</div>
</div>
</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="instruction_set_for_groups.html" class="btn btn-neutral float-right" title="Instruction set for groups" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="user_provisioning_api.html" class="btn btn-neutral float-left" title="User provisioning API" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        
        &copy; Copyright 2020 Nextcloud GmbH

    </p>
  </div> 

</footer>

        </div>
      </div>

    </section>

  </div>
  

  <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
    <span class="rst-current-version" data-toggle="rst-current-version">
      <span class="fa fa-book"> Read the Docs</span>
      v: latest
      <span class="fa fa-caret-down"></span>
    </span>
    <div class="rst-other-versions">
      <dl>
        <dt>Versions</dt>
        
          <dd><a href="https://docs.nextcloud.com/server/17/admin_manual">17</a></dd>
        
          <dd><a href="https://docs.nextcloud.com/server/18/admin_manual">18</a></dd>
        
          <dd><a href="https://docs.nextcloud.com/server/19/admin_manual">19</a></dd>
        
          <dd><a href="https://docs.nextcloud.com/server/stable/admin_manual">stable</a></dd>
        
          <dd><a href="https://docs.nextcloud.com/server/latest/admin_manual">latest</a></dd>
        
      </dl>
      <dl>
        <dt>Downloads</dt>
        
      </dl>
      <dl>
        
        <dt>On Read the Docs</dt>
          <dd>
            <a href="///projects//?fromdocs=">Project Home</a>
          </dd>
          <dd>
            <a href="///builds//?fromdocs=">Builds</a>
          </dd>
      </dl>
    </div>
  </div>


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
   

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit