| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>org.apache.archiva.redback.rest.api.services.v2 (Apache Archiva Redback 3.0.0-SNAPSHOT API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../../../../../jquery/jquery-3.5.1.js"></script> |
| <script type="text/javascript" src="../../../../../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="org.apache.archiva.redback.rest.api.services.v2 (Apache Archiva Redback 3.0.0-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var pathtoroot = "../../../../../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../../index.html">Overview</a></li> |
| <li class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <main role="main"> |
| <div class="header"> |
| <h1 title="Package" class="title">Package org.apache.archiva.redback.rest.api.services.v2</h1> |
| </div> |
| <div class="contentContainer"> |
| <section role="region"><a id="package.description"> |
| <!-- --> |
| </a> |
| <div class="block"><p>This is the V2 REST API of Redback. It uses JAX-RS annotations for defining the endpoints. |
| The API is documented with OpenApi annotations.</p> |
| |
| <h3>Some design principles of the API and classes:</h3> |
| <ul> |
| <li>All services use V2 model classes. Internal models are always converted to V2 classes.</li> |
| <li>Schema attributes use the snake case syntax (lower case with '_' as divider)</li> |
| <li>Return code <code>200</code> and <code>201</code> (POST) is used for successful execution.</li> |
| <li>Return code <code>403</code> is used, if the user has not the permission for the action.</li> |
| <li>Return code <code>422</code> is used for input that has invalid data.</li> |
| </ul> |
| |
| <h4>Querying entity lists</h4> |
| <p>The main entities of a given path are retrieved on the base path. |
| Further sub entities or entries may be retrieved via subpaths. |
| A single entity is returned by the "{id}" path. Be careful with technical paths that are parallel to the |
| id path. Avoid naming conflicts with the id and technical paths. |
| Entity attributes may be retrieved by "{id}/{attribute}" path or if there are lists or collections by |
| "{id}/mycollection/{subentryid}"</p> |
| |
| <ul> |
| <li><code>GET</code> method is used for retrieving entities on the base path ""</li> |
| <li>The query for base entities should always return a paged result and be filterable and sortable</li> |
| <li>Query parameters for filtering, ordering and limits should be optional and proper defaults must be set</li> |
| <li>Return code <code>200</code> is used for successful retrieval</li> |
| <li>This action is idempotent</li> |
| </ul> |
| |
| <h4>Querying single entities</h4> |
| <p>Single entities are retrieved on the path "{id}"</p> |
| <ul> |
| <li><code>GET</code> method is used for retrieving a single entity. The id is always a path parameter.</li> |
| <li>Return code <code>200</code> is used for successful retrieval</li> |
| <li>Return code <code>404</code> is used if the entity with the given id does not exist</li> |
| <li>This action is idempotent</li> |
| </ul> |
| |
| <h4>Creating entities</h4> |
| <p>The main entities are created on the base path "".</p> |
| <ul> |
| <li><code>POST</code> is used for creating new entities</li> |
| <li>The <code>POST</code> body must always have a complete definition of the entity.</li> |
| <li>A unique <code>id</code> or <code>name</code> attribute is required for entities. If the id is generated during POST, |
| it must be returned by response body.</li> |
| <li>A successful <code>POST</code> request should always return the entity definition as it would be returned by the GET request.</li> |
| <li>Return code <code>201</code> is used for successful creation of the new entity.</li> |
| <li>A successful response has a <code>Location</code> header with the URL for retrieving the single created entity.</li> |
| <li>Return code <code>303</code> is used, if the entity exists already</li> |
| <li>This action is not idempotent</li> |
| </ul> |
| |
| <h4>Updating entities</h4> |
| <p>The path for entity update must contain the '{id}' of the entity. The path should be the same as for the GET operation.</p> |
| <ul> |
| <li><code>PUT</code> is used for updating existing entities</li> |
| <li>The body contains a JSON object. Only existing attributes are updated.</li> |
| <li>A successful PUT request should return the complete entity definition as it would be returned by the GET request.</li> |
| <li>Return code <code>200</code> is used for successful update of the new entity. Even if nothing changed.</li> |
| <li>This action is idempotent</li> |
| </ul> |
| |
| <h4>Deleting entities</h4> |
| <p>The path for entity deletion must contain the '{id}' of the entity. The path should be the same as |
| for the GET operation.</p> |
| <ul> |
| <li><code>DELETE</code> is used for deleting existing entities</li> |
| <li>The successful operation has no request and no response body</li> |
| <li>Return code <code>200</code> is used for successful deletion of the new entity.</li> |
| <li>This action is not idempotent</li> |
| </ul> |
| |
| <h4>Errors</h4> |
| <ul> |
| <li>A error uses a return code <code>>=400</code> </li> |
| <li>All errors use the same result object (<code>org.apache.archiva.rest.api.services.v2.ArchivaRestError</code></li> |
| <li>Error messages are returned as keys. Translation is part of the client application.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.0</dd> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd>Martin Stockhammer <martin_s@apache.org></dd> |
| </dl> |
| </section> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <table class="typeSummary"> |
| <caption><span>Interface Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Interface</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <th class="colFirst" scope="row"><a href="AuthenticationService.html" title="interface in org.apache.archiva.redback.rest.api.services.v2">AuthenticationService</a></th> |
| <td class="colLast"> |
| <div class="block">Authentication service</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colFirst" scope="row"><a href="GroupService.html" title="interface in org.apache.archiva.redback.rest.api.services.v2">GroupService</a></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <th class="colFirst" scope="row"><a href="RoleService.html" title="interface in org.apache.archiva.redback.rest.api.services.v2">RoleService</a></th> |
| <td class="colLast"> |
| <div class="block">Service interface for role management.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colFirst" scope="row"><a href="UserService.html" title="interface in org.apache.archiva.redback.rest.api.services.v2">UserService</a></th> |
| <td class="colLast"> |
| <div class="block">Service interface for user management</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| </ul> |
| </div> |
| </main> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../../index.html">Overview</a></li> |
| <li class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2006–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |