Docs - add 'fr' translation + fixes
This commit is contained in:
@ -3,10 +3,10 @@
|
||||
<head><meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Recherche" href="../search.html" /><link rel="next" title="Workouts" href="workouts.html" /><link rel="prev" title="Statistics" href="stats.html" />
|
||||
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Recherche" href="../search.html" /><link rel="next" title="Séances" href="workouts.html" /><link rel="prev" title="Statistiques" href="stats.html" />
|
||||
|
||||
<!-- Generated with Sphinx 7.0.1 and Furo 2023.05.20 -->
|
||||
<title>Users - Documentation FitTrackee 0.7.17</title>
|
||||
<title>Utilisateurs - Documentation FitTrackee 0.7.17</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=e6660623a769aa55fea372102b9bf3151b292993" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />
|
||||
@ -163,24 +163,24 @@
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../features.html">Features</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../features.html">Fonctionnalités</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../oauth.html">OAuth 2.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../cli.html">Command line interface</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../third_party_tools.html">Third-party tools</a></li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">API documentation</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of API documentation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="auth.html">Authentication and account</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../cli.html">Interface de ligne de commande</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../third_party_tools.html">Outils tiers</a></li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Documentation de l’API</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Documentation de l’API</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="auth.html">Authentification et compte</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="configuration.html">Configuration</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="oauth2.html">OAuth2</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="records.html">Records</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="sports.html">Sports</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="stats.html">Statistics</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Users</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="workouts.html">Workouts</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="stats.html">Statistiques</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Utilisateurs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="workouts.html">Séances</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../troubleshooting/index.html">Troubleshooting</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Troubleshooting</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../troubleshooting/administrator.html">Administrator</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../troubleshooting/index.html">Dépannage</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Dépannage</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../troubleshooting/administrator.html">Administrateur</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Change log</a></li>
|
||||
@ -230,30 +230,29 @@
|
||||
</div>
|
||||
<article role="main">
|
||||
<section id="users">
|
||||
<h1>Users<a class="headerlink" href="#users" title="Lien permanent vers cette rubrique">#</a></h1>
|
||||
<h1>Utilisateurs<a class="headerlink" href="#users" title="Lien permanent vers cette rubrique">#</a></h1>
|
||||
<dl class="http get">
|
||||
<dt class="sig sig-object http" id="get--api-users">
|
||||
<span class="sig-name descname"><span class="pre">GET</span> </span><span class="sig-name descname"><span class="pre">/api/users</span></span><a class="headerlink" href="#get--api-users" title="Lien permanent vers cette définition">#</a></dt>
|
||||
<dd><p>Get all users (regardless their account status), if authenticated user
|
||||
has admin rights.</p>
|
||||
<p>It returns user preferences only for authenticated user.</p>
|
||||
<dd><p>Obtenir tous les utilisateurs (quel que soit le statut de leur compte), si l’utilisateur authentifié a des droits d’administration.</p>
|
||||
<p>Ne renvoie les préférences de l’utilisateur que pour l’utilisateur authentifié.</p>
|
||||
<p><strong>Scope</strong>: <code class="docutils literal notranslate"><span class="pre">users:read</span></code></p>
|
||||
<p><strong>Example request</strong>:</p>
|
||||
<p><strong>Exemple de requête</strong>:</p>
|
||||
<ul class="simple">
|
||||
<li><p>without parameters</p></li>
|
||||
<li><p>sans paramètres :</p></li>
|
||||
</ul>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">GET</span> <span class="nn">/api/users</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>with some query parameters</p></li>
|
||||
<li><p>avec quelques paramètres de requête :</p></li>
|
||||
</ul>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">GET</span> <span class="nn">/api/users?order_by=workouts_count&par_page=5</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Example response</strong>:</p>
|
||||
<p><strong>Exemple de réponse</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
|
||||
@ -363,27 +362,25 @@ has admin rights.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Paramètres de requête<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>page</strong> (<em>integer</em>) – page if using pagination (default: 1)</p></li>
|
||||
<li><p><strong>per_page</strong> (<em>integer</em>) – number of users per page (default: 10, max: 50)</p></li>
|
||||
<li><p><strong>q</strong> (<em>string</em>) – query on user name</p></li>
|
||||
<li><p><strong>order</strong> (<em>string</em>) – sorting order: <code class="docutils literal notranslate"><span class="pre">asc</span></code>, <code class="docutils literal notranslate"><span class="pre">desc</span></code> (default: <code class="docutils literal notranslate"><span class="pre">asc</span></code>)</p></li>
|
||||
<li><p><strong>order_by</strong> (<em>string</em>) – sorting criteria: <code class="docutils literal notranslate"><span class="pre">username</span></code>, <code class="docutils literal notranslate"><span class="pre">created_at</span></code>,
|
||||
<code class="docutils literal notranslate"><span class="pre">workouts_count</span></code>, <code class="docutils literal notranslate"><span class="pre">admin</span></code>, <code class="docutils literal notranslate"><span class="pre">is_active</span></code>
|
||||
(default: <code class="docutils literal notranslate"><span class="pre">username</span></code>)</p></li>
|
||||
<li><p><strong>page</strong> (<em>integer</em>) – page si pagination (par défaut : 1)</p></li>
|
||||
<li><p><strong>per_page</strong> (<em>integer</em>) – nombre d’utilisateurs par page (par défaut : 10, max : 50)</p></li>
|
||||
<li><p><strong>q</strong> (<em>string</em>) – requête sur le nom de l’utilisateur</p></li>
|
||||
<li><p><strong>order</strong> (<em>string</em>) – ordre de tri : <code class="docutils literal notranslate"><span class="pre">asc</span></code>, <code class="docutils literal notranslate"><span class="pre">desc</span></code> (par défaut : <code class="docutils literal notranslate"><span class="pre">asc</span></code>)</p></li>
|
||||
<li><p><strong>order_by</strong> (<em>string</em>) – critères de tri : <code class="docutils literal notranslate"><span class="pre">username</span></code>, <code class="docutils literal notranslate"><span class="pre">created_at</span></code>, <code class="docutils literal notranslate"><span class="pre">workouts_count</span></code>, <code class="docutils literal notranslate"><span class="pre">admin</span></code>, <code class="docutils literal notranslate"><span class="pre">is_active</span></code> (par défaut : <code class="docutils literal notranslate"><span class="pre">username</span></code>)</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">En-têtes de requête<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.rfc-editor.org/rfc/rfc7235#section-4.2">Authorization</a></span> – OAuth 2.0 Bearer Token</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.rfc-editor.org/rfc/rfc7235#section-4.2">Authorization</a></span> – Jeton “OAuth 2.0 Bearer”</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-odd">Status Codes<span class="colon">:</span></dt>
|
||||
<dt class="field-odd">Codes d’état<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">200 OK</a></span> – success</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">200 OK</a></span> – <code class="docutils literal notranslate"><span class="pre">success</span></code></p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">401 Unauthorized</a></span> – <ul>
|
||||
<li><p>provide a valid auth token</p></li>
|
||||
<li><p>signature expired, please log in again</p></li>
|
||||
<li><p>invalid token, please log in again</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">provide</span> <span class="pre">a</span> <span class="pre">valid</span> <span class="pre">auth</span> <span class="pre">token</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">signature</span> <span class="pre">expired,</span> <span class="pre">please</span> <span class="pre">log</span> <span class="pre">in</span> <span class="pre">again</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">invalid</span> <span class="pre">token,</span> <span class="pre">please</span> <span class="pre">log</span> <span class="pre">in</span> <span class="pre">again</span></code></p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
</ul>
|
||||
@ -394,16 +391,15 @@ has admin rights.</p>
|
||||
<dl class="http get">
|
||||
<dt class="sig sig-object http" id="get--api-users-(user_name)">
|
||||
<span class="sig-name descname"><span class="pre">GET</span> </span><span class="sig-name descname"><span class="pre">/api/users/</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">user_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#get--api-users-(user_name)" title="Lien permanent vers cette définition">#</a></dt>
|
||||
<dd><p>Get single user details. Only user with admin rights can get other users
|
||||
details.</p>
|
||||
<p>It returns user preferences only for authenticated user.</p>
|
||||
<dd><p>Obtenir les information d’un utilisateur. Seul l’utilisateur disposant des droits d’administrateur peut obtenir les informations des autres utilisateurs.</p>
|
||||
<p>Ne renvoie les préférences de l’utilisateur que pour l’utilisateur authentifié.</p>
|
||||
<p><strong>Scope</strong>: <code class="docutils literal notranslate"><span class="pre">users:read</span></code></p>
|
||||
<p><strong>Example request</strong>:</p>
|
||||
<p><strong>Exemple de requête</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">GET</span> <span class="nn">/api/users/admin</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Example response</strong>:</p>
|
||||
<p><strong>Exemple de réponse</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
|
||||
@ -489,25 +485,25 @@ details.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Paramètres<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>user_name</strong> (<em>integer</em>) – user name</p></li>
|
||||
<li><p><strong>user_name</strong> (<em>integer</em>) – nom de l’utilisateur</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">En-têtes de requête<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.rfc-editor.org/rfc/rfc7235#section-4.2">Authorization</a></span> – OAuth 2.0 Bearer Token</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.rfc-editor.org/rfc/rfc7235#section-4.2">Authorization</a></span> – Jeton “OAuth 2.0 Bearer”</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-odd">Status Codes<span class="colon">:</span></dt>
|
||||
<dt class="field-odd">Codes d’état<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">200 OK</a></span> – success</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">200 OK</a></span> – <code class="docutils literal notranslate"><span class="pre">success</span></code></p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">401 Unauthorized</a></span> – <ul>
|
||||
<li><p>provide a valid auth token</p></li>
|
||||
<li><p>signature expired, please log in again</p></li>
|
||||
<li><p>invalid token, please log in again</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">provide</span> <span class="pre">a</span> <span class="pre">valid</span> <span class="pre">auth</span> <span class="pre">token</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">signature</span> <span class="pre">expired,</span> <span class="pre">please</span> <span class="pre">log</span> <span class="pre">in</span> <span class="pre">again</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">invalid</span> <span class="pre">token,</span> <span class="pre">please</span> <span class="pre">log</span> <span class="pre">in</span> <span class="pre">again</span></code></p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">404 Not Found</a></span> – <ul>
|
||||
<li><p>user does not exist</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">user</span> <span class="pre">does</span> <span class="pre">not</span> <span class="pre">exist</span></code></p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
</ul>
|
||||
@ -518,13 +514,13 @@ details.</p>
|
||||
<dl class="http get">
|
||||
<dt class="sig sig-object http" id="get--api-users-(user_name)-picture">
|
||||
<span class="sig-name descname"><span class="pre">GET</span> </span><span class="sig-name descname"><span class="pre">/api/users/</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">user_name</span></em><span class="sig-paren">)</span><span class="sig-name descname"><span class="pre">/picture</span></span><a class="headerlink" href="#get--api-users-(user_name)-picture" title="Lien permanent vers cette définition">#</a></dt>
|
||||
<dd><p>get user picture</p>
|
||||
<p><strong>Example request</strong>:</p>
|
||||
<dd><p>obtenir l’image de l’utilisateur</p>
|
||||
<p><strong>Exemple de requête</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">GET</span> <span class="nn">/api/users/admin/picture</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Example response</strong>:</p>
|
||||
<p><strong>Exemple de réponse</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">image/jpeg</span>
|
||||
</pre></div>
|
||||
@ -532,15 +528,15 @@ details.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Paramètres<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>user_name</strong> (<em>integer</em>) – user name</p></li>
|
||||
<li><p><strong>user_name</strong> (<em>integer</em>) – nom de l’utilisateur</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Status Codes<span class="colon">:</span></dt>
|
||||
<dt class="field-even">Codes d’état<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">200 OK</a></span> – success</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">200 OK</a></span> – <code class="docutils literal notranslate"><span class="pre">success</span></code></p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">404 Not Found</a></span> – <ul>
|
||||
<li><p>user does not exist</p></li>
|
||||
<li><p>No picture.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">user</span> <span class="pre">does</span> <span class="pre">not</span> <span class="pre">exist</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">No</span> <span class="pre">picture.</span></code></p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
</ul>
|
||||
@ -551,22 +547,21 @@ details.</p>
|
||||
<dl class="http patch">
|
||||
<dt class="sig sig-object http" id="patch--api-users-(user_name)">
|
||||
<span class="sig-name descname"><span class="pre">PATCH</span> </span><span class="sig-name descname"><span class="pre">/api/users/</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">user_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#patch--api-users-(user_name)" title="Lien permanent vers cette définition">#</a></dt>
|
||||
<dd><p>Update user account.</p>
|
||||
<dd><p>Mise à jour du compte utilisateur.</p>
|
||||
<ul class="simple">
|
||||
<li><p>add/remove admin rights (regardless user account status)</p></li>
|
||||
<li><p>reset password (and send email to update user password,
|
||||
if sending enabled)</p></li>
|
||||
<li><p>update user email (and send email to new user email, if sending enabled)</p></li>
|
||||
<li><p>activate account for an inactive user</p></li>
|
||||
<li><p>ajouter/supprimer des droits d’administration (quel que soit le statut du compte d’utilisateur)</p></li>
|
||||
<li><p>réinitialiser le mot de passe (et envoyer un courriel pour mettre à jour le mot de passe de l’utilisateur, si l’envoi activé)</p></li>
|
||||
<li><p>mettre à jour l’adresse électronique de l’utilisateur (et envoyer un message à la nouvelle adresse électronique de l’utilisateur, si l’envoi est activé)</p></li>
|
||||
<li><p>activer le compte d’un utilisateur inactif</p></li>
|
||||
</ul>
|
||||
<p>Only user with admin rights can modify another user.</p>
|
||||
<p>Seul l’utilisateur ayant des droits d’administration peut modifier un autre utilisateur.</p>
|
||||
<p><strong>Scope</strong>: <code class="docutils literal notranslate"><span class="pre">users:write</span></code></p>
|
||||
<p><strong>Example request</strong>:</p>
|
||||
<p><strong>Exemple de requête</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">PATCH</span> <span class="nn">/api/users/<user_name></span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Example response</strong>:</p>
|
||||
<p><strong>Exemple de réponse</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
|
||||
@ -652,43 +647,40 @@ if sending enabled)</p></li>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Paramètres<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>user_name</strong> (<em>string</em>) – user name</p></li>
|
||||
<li><p><strong>user_name</strong> (<em>string</em>) – nom de l’utilisateur</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Objet JSON de requête<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><ul class="simple">
|
||||
<li><p><strong>activate</strong> (<em>boolean</em>) – activate user account</p></li>
|
||||
<li><p><strong>admin</strong> (<em>boolean</em>) – does the user have administrator rights</p></li>
|
||||
<li><p><strong>new_email</strong> (<em>boolean</em>) – new user email</p></li>
|
||||
<li><p><strong>reset_password</strong> (<em>boolean</em>) – reset user password</p></li>
|
||||
<li><p><strong>activate</strong> (<em>boolean</em>) – activer le compte utilisateur</p></li>
|
||||
<li><p><strong>admin</strong> (<em>boolean</em>) – l’utilisateur dispose-t-il de droits d’administration ?</p></li>
|
||||
<li><p><strong>new_email</strong> (<em>boolean</em>) – nouvelle adresse électronique de l’utilisateur</p></li>
|
||||
<li><p><strong>reset_password</strong> (<em>boolean</em>) – réinitialiser le mot de passe de l’utilisateur</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-odd">En-têtes de requête<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.rfc-editor.org/rfc/rfc7235#section-4.2">Authorization</a></span> – OAuth 2.0 Bearer Token</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.rfc-editor.org/rfc/rfc7235#section-4.2">Authorization</a></span> – Jeton “OAuth 2.0 Bearer”</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Status Codes<span class="colon">:</span></dt>
|
||||
<dt class="field-even">Codes d’état<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">200 OK</a></span> – success</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1">200 OK</a></span> – <code class="docutils literal notranslate"><span class="pre">success</span></code></p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1">400 Bad Request</a></span> – <ul>
|
||||
<li><p>invalid payload</p></li>
|
||||
<li><p>valid email must be provided</p></li>
|
||||
<li><p>new email must be different than curent email</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">invalid</span> <span class="pre">payload</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">valid</span> <span class="pre">email</span> <span class="pre">must</span> <span class="pre">be</span> <span class="pre">provided</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">new</span> <span class="pre">email</span> <span class="pre">must</span> <span class="pre">be</span> <span class="pre">different</span> <span class="pre">than</span> <span class="pre">curent</span> <span class="pre">email</span></code></p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">401 Unauthorized</a></span> – <ul>
|
||||
<li><p>provide a valid auth token</p></li>
|
||||
<li><p>signature expired, please log in again</p></li>
|
||||
<li><p>invalid token, please log in again</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">provide</span> <span class="pre">a</span> <span class="pre">valid</span> <span class="pre">auth</span> <span class="pre">token</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">signature</span> <span class="pre">expired,</span> <span class="pre">please</span> <span class="pre">log</span> <span class="pre">in</span> <span class="pre">again</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">invalid</span> <span class="pre">token,</span> <span class="pre">please</span> <span class="pre">log</span> <span class="pre">in</span> <span class="pre">again</span></code></p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4">403 Forbidden</a></span> – you do not have permissions</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">404 Not Found</a></span> – <ul>
|
||||
<li><p>user does not exist</p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">500 Internal Server Error</a></span> – </p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4">403 Forbidden</a></span> – <code class="docutils literal notranslate"><span class="pre">you</span> <span class="pre">do</span> <span class="pre">not</span> <span class="pre">have</span> <span class="pre">permissions</span></code></p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">404 Not Found</a></span> – <code class="docutils literal notranslate"><span class="pre">user</span> <span class="pre">does</span> <span class="pre">not</span> <span class="pre">exist</span></code></p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">500 Internal Server Error</a></span> – <code class="docutils literal notranslate"><span class="pre">error,</span> <span class="pre">please</span> <span class="pre">try</span> <span class="pre">again</span> <span class="pre">or</span> <span class="pre">contact</span> <span class="pre">the</span> <span class="pre">administrator</span></code></p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
@ -697,17 +689,16 @@ if sending enabled)</p></li>
|
||||
<dl class="http delete">
|
||||
<dt class="sig sig-object http" id="delete--api-users-(user_name)">
|
||||
<span class="sig-name descname"><span class="pre">DELETE</span> </span><span class="sig-name descname"><span class="pre">/api/users/</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">user_name</span></em><span class="sig-paren">)</span><a class="headerlink" href="#delete--api-users-(user_name)" title="Lien permanent vers cette définition">#</a></dt>
|
||||
<dd><p>Delete a user account.</p>
|
||||
<p>A user can only delete his own account.</p>
|
||||
<p>An admin can delete all accounts except his account if he’s the only
|
||||
one admin.</p>
|
||||
<dd><p>Supprimer un compte utilisateur.</p>
|
||||
<p>Un utilisateur ne peut supprimer que son propre compte.</p>
|
||||
<p>Un administrateur peut supprimer tous les comptes sauf le sien s’il est le seul administrateur.</p>
|
||||
<p><strong>Scope</strong>: <code class="docutils literal notranslate"><span class="pre">users:write</span></code></p>
|
||||
<p><strong>Example request</strong>:</p>
|
||||
<p><strong>Exemple de requête</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">DELETE</span> <span class="nn">/api/users/john_doe</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Example response</strong>:</p>
|
||||
<p><strong>Exemple de réponse</strong>:</p>
|
||||
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">204</span> <span class="ne">NO CONTENT</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">application/json</span>
|
||||
</pre></div>
|
||||
@ -715,33 +706,30 @@ one admin.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Paramètres<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>user_name</strong> (<em>string</em>) – user name</p></li>
|
||||
<li><p><strong>user_name</strong> (<em>string</em>) – nom de l’utilisateur</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">En-têtes de requête<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.rfc-editor.org/rfc/rfc7235#section-4.2">Authorization</a></span> – OAuth 2.0 Bearer Token</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.rfc-editor.org/rfc/rfc7235#section-4.2">Authorization</a></span> – Jeton “OAuth 2.0 Bearer”</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-odd">Status Codes<span class="colon">:</span></dt>
|
||||
<dt class="field-odd">Codes d’état<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5">204 No Content</a></span> – user account deleted</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5">204 No Content</a></span> – compte de l’utilisateur supprimé</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">401 Unauthorized</a></span> – <ul>
|
||||
<li><p>provide a valid auth token</p></li>
|
||||
<li><p>signature expired, please log in again</p></li>
|
||||
<li><p>invalid token, please log in again</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">provide</span> <span class="pre">a</span> <span class="pre">valid</span> <span class="pre">auth</span> <span class="pre">token</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">signature</span> <span class="pre">expired,</span> <span class="pre">please</span> <span class="pre">log</span> <span class="pre">in</span> <span class="pre">again</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">invalid</span> <span class="pre">token,</span> <span class="pre">please</span> <span class="pre">log</span> <span class="pre">in</span> <span class="pre">again</span></code></p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4">403 Forbidden</a></span> – <ul>
|
||||
<li><p>you do not have permissions</p></li>
|
||||
<li><p>you can not delete your account, no other user has admin rights</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">you</span> <span class="pre">do</span> <span class="pre">not</span> <span class="pre">have</span> <span class="pre">permissions</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">you</span> <span class="pre">can</span> <span class="pre">not</span> <span class="pre">delete</span> <span class="pre">your</span> <span class="pre">account,</span> <span class="pre">no</span> <span class="pre">other</span> <span class="pre">user</span> <span class="pre">has</span> <span class="pre">admin</span> <span class="pre">rights</span></code></p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">404 Not Found</a></span> – <ul>
|
||||
<li><p>user does not exist</p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">500 Internal Server Error</a></span> – error, please try again or contact the administrator</p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">404 Not Found</a></span> – <code class="docutils literal notranslate"><span class="pre">user</span> <span class="pre">does</span> <span class="pre">not</span> <span class="pre">exist</span></code></p></li>
|
||||
<li><p><span><a class="reference external" href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">500 Internal Server Error</a></span> – <code class="docutils literal notranslate"><span class="pre">error,</span> <span class="pre">please</span> <span class="pre">try</span> <span class="pre">again</span> <span class="pre">or</span> <span class="pre">contact</span> <span class="pre">the</span> <span class="pre">administrator</span></code></p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
@ -759,7 +747,7 @@ one admin.</p>
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Workouts</div>
|
||||
<div class="title">Séances</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
@ -770,7 +758,7 @@ one admin.</p>
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Statistics</div>
|
||||
<div class="title">Statistiques</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user