|
|
@ -11,7 +11,7 @@ |
|
|
|
</title> |
|
|
|
|
|
|
|
</head> |
|
|
|
<body th:with="baseUrl=(@{__${#httpServletRequest.scheme}__} + '://' + @{__${#httpServletRequest.serverName}__} + ':' + @{__${#httpServletRequest.serverPort}__} + '/')"> |
|
|
|
<body th:with="baseUrl=(@{__${#httpServletRequest.scheme}__} + '://' + @{__${#httpServletRequest.serverName}__} + ':' + @{__${#httpServletRequest.serverPort}__} + '/'), adminUser='admin:admin'"> |
|
|
|
|
|
|
|
<h1 th:text="${#messages.msgOrNull('page.title.webform.apiref')} ?: 'page.title.webform.apiref'"> |
|
|
|
page.title.webform.apiref |
|
|
@ -39,7 +39,7 @@ |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/booklist/'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/booklist/' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -53,7 +53,7 @@ |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/categories/'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/categories/' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -67,7 +67,7 @@ |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/authors/'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/authors/' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -93,7 +93,7 @@ |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/booklist/search/title?name=Bloody+Chamber'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/booklist/search/title?name=Bloody+Chamber' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -107,7 +107,7 @@ |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/categories/search/category?name=Fantasy'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/categories/search/category?name=Fantasy' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -122,7 +122,7 @@ |
|
|
|
|
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/categories/search/category?name=horr'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/categories/search/category?name=horr' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -137,7 +137,7 @@ |
|
|
|
|
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET "' + ${baseUrl} + 'api/authors/search/fullname?firstname=Angela&lastname=Carter"'"> |
|
|
|
<code th:text="'curl --include --request GET "' + ${baseUrl} + 'api/authors/search/fullname?firstname=Angela&lastname=Carter"' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -152,7 +152,7 @@ |
|
|
|
|
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/authors/search/firstname?firstname=anGel'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/authors/search/firstname?firstname=anGel' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -167,7 +167,7 @@ |
|
|
|
|
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/authors/search/lastname?lastname=Sapkowski'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/authors/search/lastname?lastname=Sapkowski' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -190,7 +190,7 @@ |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request GET ' + ${baseUrl} + 'api/booklist/2'"> |
|
|
|
<code th:text="'curl --include --request GET ' + ${baseUrl} + 'api/booklist/2' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
<br> |
|
|
@ -222,7 +222,7 @@ |
|
|
|
page.text.apiref.book.add.a |
|
|
|
</small> |
|
|
|
<br> |
|
|
|
<code th:text="'curl --include --request POST --header "Content-Type: application/json" --data \'{"title":"The Witcher: Blood of Elves","year":1994,"isbn":"5474512-543","price":22.49}\' ' + ${baseUrl} + 'api/booklist'"> |
|
|
|
<code th:text="'curl --include --request POST --header "Content-Type: application/json" --data \'{"title":"The Witcher: Blood of Elves","year":1994,"isbn":"5474512-543","price":22.49}\' ' + ${baseUrl} + 'api/booklist' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -234,7 +234,7 @@ |
|
|
|
page.text.apiref.book.add.b |
|
|
|
</small> |
|
|
|
<br> |
|
|
|
<code th:text="'curl --include --request POST --header "Content-Type: application/json" --data \'{"title":"Mass Effect: Retribution","year":2010,"isbn":"0345520-722","price":29.90,"category":{"name":"Sci-Fi"},"author":{"firstname":"Drew","lastname":"Karpyshyn"}}\' ' + ${baseUrl} + 'api/booklist'"> |
|
|
|
<code th:text="'curl --include --request POST --header "Content-Type: application/json" --data \'{"title":"Mass Effect: Retribution","year":2010,"isbn":"0345520-722","price":29.90,"category":{"name":"Sci-Fi"},"author":{"firstname":"Drew","lastname":"Karpyshyn"}}\' ' + ${baseUrl} + 'api/booklist' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -246,7 +246,7 @@ |
|
|
|
page.text.apiref.book.add.c |
|
|
|
</small> |
|
|
|
<br> |
|
|
|
<code th:text="'curl --include --request POST --header "Content-Type: application/json" --data \'{"title":"Mass Effect: Deception","year":2012,"isbn":"0345520-739","price":34.65,"category":{"name":"sci-fi"}}\' ' + ${baseUrl} + 'api/booklist'"> |
|
|
|
<code th:text="'curl --include --request POST --header "Content-Type: application/json" --data \'{"title":"Mass Effect: Deception","year":2012,"isbn":"0345520-739","price":34.65,"category":{"name":"sci-fi"}}\' ' + ${baseUrl} + 'api/booklist' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
<br> |
|
|
@ -262,7 +262,7 @@ |
|
|
|
page.text.apiref.book.add.d |
|
|
|
</small> |
|
|
|
<br> |
|
|
|
<code th:text="'curl --include --request POST --header "Content-Type: application/json" --data \'{"title":"Halo: The Flood","year":2003,"isbn":"0345459-210","price":24.99,"category":{"name":"sCi-fI"},"author":{"lastname":"Dietz"}}\' ' + ${baseUrl} + 'api/booklist'"> |
|
|
|
<code th:text="'curl --include --request POST --header "Content-Type: application/json" --data \'{"title":"Halo: The Flood","year":2003,"isbn":"0345459-210","price":24.99,"category":{"name":"sCi-fI"},"author":{"lastname":"Dietz"}}\' ' + ${baseUrl} + 'api/booklist' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
<br> |
|
|
@ -292,7 +292,7 @@ |
|
|
|
page.text.apiref.book.add.a |
|
|
|
</small> |
|
|
|
<br> |
|
|
|
<code th:text="'curl --include --request PUT --header "Content-Type: application/json" --data \'{"title":"The Witcher: Blood of Elves","year":1999,"isbn":"3213221-3","price":22.49}\' ' + ${baseUrl} + 'api/booklist/2'"> |
|
|
|
<code th:text="'curl --include --request PUT --header "Content-Type: application/json" --data \'{"title":"The Witcher: Blood of Elves","year":1999,"isbn":"3213221-3","price":22.49}\' ' + ${baseUrl} + 'api/booklist/2' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -303,7 +303,7 @@ |
|
|
|
page.text.apiref.book.add.b |
|
|
|
</small> |
|
|
|
<br> |
|
|
|
<code th:text="'curl --include --request PUT --header "Content-Type: application/json" --data \'{"title":"The Witcher: Blood of Elves - Enhanced Edition","year":2019,"author":{"firstname":"Vitaly","lastname":"Zarikov"},"category":{"name":"horror"}}\' ' + ${baseUrl} + 'api/booklist/2'"> |
|
|
|
<code th:text="'curl --include --request PUT --header "Content-Type: application/json" --data \'{"title":"The Witcher: Blood of Elves - Enhanced Edition","year":2019,"author":{"firstname":"Vitaly","lastname":"Zarikov"},"category":{"name":"horror"}}\' ' + ${baseUrl} + 'api/booklist/2' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
</td> |
|
|
@ -330,7 +330,7 @@ |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --request DELETE ' + ${baseUrl} + 'api/booklist/2'"> |
|
|
|
<code th:text="'curl --include --request DELETE ' + ${baseUrl} + 'api/booklist/2' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
<br> |
|
|
@ -350,7 +350,7 @@ |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td class="apiref-table-right"> |
|
|
|
<code th:text="'curl --include --request PUT --header "Content-Type: application/json" --data \'{"firstname":"Tanya","lastname":"Rose"}\' ' + ${baseUrl} + 'api/authors/1'"> |
|
|
|
<code th:text="'curl --include --request PUT --header "Content-Type: application/json" --data \'{"firstname":"Tanya","lastname":"Rose"}\' ' + ${baseUrl} + 'api/authors/1' + ' --user ' + ${adminUser}"> |
|
|
|
code placeholder |
|
|
|
</code> |
|
|
|
<br> |
|
|
|