<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>drip-api: UserController</title> <!-- Mobile viewport optimized: j.mp/bplateviewport --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap core CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <!--custom css for these pages--> <link rel="stylesheet" href="css/style.css"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body data-spy="scroll" data-target="#apinav"> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="index.html">drip-api: UserController</a> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-right"> <li><a href="resources.html">Resources</a></li> <li><a href="data.html">Data Types</a></li> <li><a href="downloads.html">Files and Libraries</a></li> </ul> </div> </div> </nav> <div class="container-fluid"> <div class="row"> <div class="col-sm-3 col-md-2 sidebar" id="apinav"> <ul class="nav nav-sidebar"> <li><a href="#resource_UserController_getAll_GET">GET /manager/v1.0/user/all</a></li> <li><a href="#resource_UserController_getIds_GET">GET /manager/v1.0/user/ids</a></li> <li><a href="#resource_UserController_modify_POST">POST /manager/v1.0/user/modify</a></li> <li><a href="#resource_UserController_register_POST"><abbr title="POST /manager/v1.0/user/register">POST /manager/v1.0/user/regist...</abbr></a></li> <li><a href="#resource_UserController_delete_DELETE">DELETE /manager/v1.0/user/{id}</a></li> <li><a href="#resource_UserController_get_GET">GET /manager/v1.0/user/{id}</a></li> <li class="divider"></li> <li class="text-right"><a href="#top"><small>Back to Top</small></a></li> </ul> </div> <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> <ol class="breadcrumb" id="top"> <li class="active dropdown"><a href="index.html">Home</a></li> <li class="active dropdown"><a href="resources.html">Resources</a></li> <li class="dropdown"><a href="resource_UserController.html">UserController</a></li> </ol> <h1 class="page-header">UserController <small>Resource</small></h1> <p>This controller is responsible for handling user accounts</p> <div id="resource_UserController_getAll_GET"> <h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user/all <a href="../manager/v1.0/user/all" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3> <p></p> <dl class="dl-horizontal"> <dt>Security Roles Allowed</dt> <dd>ADMIN</dd> </dl> <table class="table resource-response-codes"> <caption>Response Codes</caption> <thead> <tr> <th>code</th> <th>condition</th> </tr> </thead> <tbody> <tr> <td><span class="label label-warning response-code">401</span></td> <td><span class="response-condition">Bad credentials</span></td> </tr> </tbody> </table> <table class="table resource-response-body"> <caption>Response Body</caption> <thead> <tr> <th>media type</th> <th>data type</th> </tr> </thead> <tbody> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/json" HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td> <td><span class="datatype-reference">array of <a href="json_User.html">User</a> (JSON)</span></td> </tr> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/xml" HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td> <td><span class="datatype-reference">list of <a href="xml_ns0_user.html">user</a> (XML)</span></td> </tr> </tbody> </table> <h4>Example</h4> <div class="container-fluid example panel"> <div class="row panel-body"> <div class="col-md-6"> <h5>Request</h5> <pre> GET /manager/v1.0/user/all Accept: application/json </pre> </div> <div class="col-md-6"> <h5>Response</h5> <pre> HTTP/1.1 200 Looks Good Content-Type: application/json <code class="prettyprint language-js"> [ { "roles" : [ "[\"ADMIN\",\"USER\"]", "..." ], "accountNonExpired" : true, "enabled" : true, "credentialsNonExpired" : true, "accountNonLocked" : true, "id" : "58e3946e0fb4f562d84ba1ad", "username" : "user", "password" : "..." } ] </code> </pre> </div> </div> </div> </div> <div id="resource_UserController_getIds_GET"> <h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user/ids <a href="../manager/v1.0/user/ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3> <p>Gets the IDs of all the stored users</p> <dl class="dl-horizontal"> <dt>Security Roles Allowed</dt> <dd>ADMIN</dd> </dl> <table class="table resource-response-codes"> <caption>Response Codes</caption> <thead> <tr> <th>code</th> <th>condition</th> </tr> </thead> <tbody> <tr> <td><span class="label label-warning response-code">401</span></td> <td><span class="response-condition">Bad credentials</span></td> </tr> </tbody> </table> <table class="table resource-response-body"> <caption>Response Body</caption> <thead> <tr> <th>media type</th> <th>data type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/json" HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td> <td><span class="datatype-reference">array of string (JSON)</span></td> <td rowspan="2" class="multi-row-description"><span class="response-description">a list of all the IDs</span></td> </tr> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/xml" HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td> <td><span class="datatype-reference">list of string (XML)</span></td> </tr> </tbody> </table> <h4>Example</h4> <div class="container-fluid example panel"> <div class="row panel-body"> <div class="col-md-6"> <h5>Request</h5> <pre> GET /manager/v1.0/user/ids Accept: application/json </pre> </div> <div class="col-md-6"> <h5>Response</h5> <pre> HTTP/1.1 200 Looks Good Content-Type: application/json <code class="prettyprint language-txt"> ... </code> </pre> </div> </div> </div> </div> <div id="resource_UserController_modify_POST"> <h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/manager/v1.0/user/modify <a href="../manager/v1.0/user/modify" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3> <p></p> <dl class="dl-horizontal"> <dt>Security Roles Allowed</dt> <dd>ADMIN</dd> </dl> <table class="table resource-request-body"> <caption>Request Body</caption> <thead> <tr> <th>media type</th> <th>data type</th> </tr> </thead> <tbody> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Content-Type: application/json" HTTP header to specify this media type to the server."><span class="request-type">application/json</span></abbr></td> <td><span class="datatype-reference"><a href="json_User.html">User</a> (JSON)</span></td> </tr> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Content-Type: application/xml" HTTP header to specify this media type to the server."><span class="request-type">application/xml</span></abbr></td> <td><span class="datatype-reference"><a href="xml_ns0_user.html">user</a> (XML)</span></td> </tr> </tbody> </table> <table class="table resource-response-codes"> <caption>Response Codes</caption> <thead> <tr> <th>code</th> <th>condition</th> </tr> </thead> <tbody> <tr> <td><span class="label label-warning response-code">401</span></td> <td><span class="response-condition">Bad credentials</span></td> </tr> </tbody> </table> <table class="table resource-response-body"> <caption>Response Body</caption> <thead> <tr> <th>media type</th> <th>data type</th> </tr> </thead> <tbody> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/json" HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td> <td><span class="datatype-reference">string (JSON)</span></td> </tr> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/xml" HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td> <td><span class="datatype-reference">string (XML)</span></td> </tr> </tbody> </table> <h4>Example</h4> <div class="container-fluid example panel"> <div class="row panel-body"> <div class="col-md-6"> <h5>Request</h5> <pre> POST /manager/v1.0/user/modify Content-Type: application/json Accept: application/json <code class="prettyprint language-js"> { "roles" : [ "[\"ADMIN\",\"USER\"]", "..." ], "accountNonExpired" : true, "enabled" : true, "credentialsNonExpired" : true, "accountNonLocked" : true, "id" : "58e3946e0fb4f562d84ba1ad", "username" : "user", "password" : "..." } </code> </pre> </div> <div class="col-md-6"> <h5>Response</h5> <pre> HTTP/1.1 201 Looks Good Content-Type: application/json <code class="prettyprint language-txt"> ... </code> </pre> </div> </div> </div> </div> <div id="resource_UserController_register_POST"> <h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/manager/v1.0/user/register <a href="../manager/v1.0/user/register" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3> <p>Register new user. A normal user cannot create accounts, only the user with the 'ADMIN' role can do that.</p> <dl class="dl-horizontal"> <dt>Security Roles Allowed</dt> <dd>ADMIN</dd> </dl> <table class="table resource-request-body"> <caption>Request Body</caption> <thead> <tr> <th>media type</th> <th>data type</th> </tr> </thead> <tbody> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Content-Type: application/json" HTTP header to specify this media type to the server."><span class="request-type">application/json</span></abbr></td> <td><span class="datatype-reference"><a href="json_User.html">User</a> (JSON)</span></td> </tr> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Content-Type: application/xml" HTTP header to specify this media type to the server."><span class="request-type">application/xml</span></abbr></td> <td><span class="datatype-reference"><a href="xml_ns0_user.html">user</a> (XML)</span></td> </tr> </tbody> </table> <table class="table resource-response-codes"> <caption>Response Codes</caption> <thead> <tr> <th>code</th> <th>condition</th> </tr> </thead> <tbody> <tr> <td><span class="label label-warning response-code">401</span></td> <td><span class="response-condition">Bad credentials</span></td> </tr> </tbody> </table> <table class="table resource-response-body"> <caption>Response Body</caption> <thead> <tr> <th>media type</th> <th>data type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/json" HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td> <td><span class="datatype-reference">string (JSON)</span></td> <td rowspan="2" class="multi-row-description"><span class="response-description">Response on success: The ID of the newly register user. Response on fail: If the user name already exists, or the user name is 'null' or the password is 'null' there will be a 'BadRequestException'</span></td> </tr> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/xml" HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td> <td><span class="datatype-reference">string (XML)</span></td> </tr> </tbody> </table> <h4>Example</h4> <div class="container-fluid example panel"> <div class="row panel-body"> <div class="col-md-6"> <h5>Request</h5> <pre> POST /manager/v1.0/user/register Content-Type: application/json Accept: application/json <code class="prettyprint language-js"> { "roles" : [ "[\"ADMIN\",\"USER\"]", "..." ], "accountNonExpired" : true, "enabled" : true, "credentialsNonExpired" : true, "accountNonLocked" : true, "id" : "58e3946e0fb4f562d84ba1ad", "username" : "user", "password" : "..." } </code> </pre> </div> <div class="col-md-6"> <h5>Response</h5> <pre> HTTP/1.1 201 Looks Good Content-Type: application/json <code class="prettyprint language-txt"> ... </code> </pre> </div> </div> </div> </div> <div id="resource_UserController_delete_DELETE"> <h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/manager/v1.0/user/{id} <a href="../manager/v1.0/user/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3> <p>Deletes a user</p> <dl class="dl-horizontal"> <dt>Security Roles Allowed</dt> <dd>ADMIN</dd> </dl> <table class="table resource-parameters"> <caption>Request Parameters</caption> <thead> <tr> <th>name</th> <th>type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td><span class="parameter-name">id</span></td> <td>path</td> <td><span class="parameter-description"> </span></td> </tr> </tbody> </table> <table class="table resource-response-codes"> <caption>Response Codes</caption> <thead> <tr> <th>code</th> <th>condition</th> </tr> </thead> <tbody> <tr> <td><span class="label label-warning response-code">401</span></td> <td><span class="response-condition">Bad credentials</span></td> </tr> </tbody> </table> <table class="table resource-response-body"> <caption>Response Body</caption> <thead> <tr> <th>media type</th> <th>data type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/json" HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td> <td><span class="datatype-reference">string (JSON)</span></td> <td rowspan="2" class="multi-row-description"><span class="response-description">The ID of the deleted user</span></td> </tr> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/xml" HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td> <td><span class="datatype-reference">string (XML)</span></td> </tr> </tbody> </table> <h4>Example</h4> <div class="container-fluid example panel"> <div class="row panel-body"> <div class="col-md-6"> <h5>Request</h5> <pre> DELETE /manager/v1.0/user/{id} Accept: application/json </pre> </div> <div class="col-md-6"> <h5>Response</h5> <pre> HTTP/1.1 204 Looks Good Content-Type: application/json <code class="prettyprint language-txt"> ... </code> </pre> </div> </div> </div> </div> <div id="resource_UserController_get_GET"> <h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user/{id} <a href="../manager/v1.0/user/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3> <p>Gets the user.</p> <dl class="dl-horizontal"> <dt>Security Roles Allowed</dt> <dd>ADMIN</dd> </dl> <table class="table resource-parameters"> <caption>Request Parameters</caption> <thead> <tr> <th>name</th> <th>type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td><span class="parameter-name">id</span></td> <td>path</td> <td><span class="parameter-description"> </span></td> </tr> </tbody> </table> <table class="table resource-response-codes"> <caption>Response Codes</caption> <thead> <tr> <th>code</th> <th>condition</th> </tr> </thead> <tbody> <tr> <td><span class="label label-warning response-code">401</span></td> <td><span class="response-condition">Bad credentials</span></td> </tr> </tbody> </table> <table class="table resource-response-body"> <caption>Response Body</caption> <thead> <tr> <th>media type</th> <th>data type</th> <th>description</th> </tr> </thead> <tbody> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/json" HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td> <td><span class="datatype-reference"><a href="json_User.html">User</a> (JSON)</span></td> <td rowspan="2" class="multi-row-description"><span class="response-description">the requested user.</span></td> </tr> <tr> <td><abbr data-toggle="tooltip" data-placement="top" title="Use the "Accept: application/xml" HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td> <td><span class="datatype-reference"><a href="xml_ns0_user.html">user</a> (XML)</span></td> </tr> </tbody> </table> <h4>Example</h4> <div class="container-fluid example panel"> <div class="row panel-body"> <div class="col-md-6"> <h5>Request</h5> <pre> GET /manager/v1.0/user/{id} Accept: application/json </pre> </div> <div class="col-md-6"> <h5>Response</h5> <pre> HTTP/1.1 200 Looks Good Content-Type: application/json <code class="prettyprint language-js"> { "roles" : [ "[\"ADMIN\",\"USER\"]", "..." ], "accountNonExpired" : true, "enabled" : true, "credentialsNonExpired" : true, "accountNonLocked" : true, "id" : "58e3946e0fb4f562d84ba1ad", "username" : "user", "password" : "..." } </code> </pre> </div> </div> </div> </div> <footer class="footer"> <div class="container"> <p class="text-muted">Generated by <a href="http://enunciate.webcohesion.com">Enunciate</a>.</p> </div> </footer> </div> </div> </div> <!-- JavaScript placed at the end of the document so the pages load faster. --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <!-- Bootstrap core JavaScript ================================================== --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> <!-- prettify code blocks. see http://code.google.com/p/google-code-prettify/ --> <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js" type="text/javascript"></script> <script> $(function() { $(".clickable-row").click(function() { window.document.location = $(this).data("href"); }); $('[data-toggle="tooltip"]').tooltip() }); </script> </body> </html>