|
@@ -0,0 +1,285 @@
|
|
|
+---
|
|
|
+title: API Reference
|
|
|
+
|
|
|
+language_tabs:
|
|
|
+- bash
|
|
|
+- javascript
|
|
|
+
|
|
|
+includes:
|
|
|
+
|
|
|
+search: true
|
|
|
+
|
|
|
+toc_footers:
|
|
|
+- <a href='http://github.com/mpociot/documentarian'>Documentation Powered by Documentarian</a>
|
|
|
+---
|
|
|
+<!-- START_INFO -->
|
|
|
+# Info
|
|
|
+
|
|
|
+Welcome to the generated API reference.
|
|
|
+[Get Postman Collection](http://localhost/docs/collection.json)
|
|
|
+
|
|
|
+<!-- END_INFO -->
|
|
|
+
|
|
|
+#general
|
|
|
+<!-- START_2ea88ff35aa222f5582e50f39a2b35fd -->
|
|
|
+## Display a listing of the resource.
|
|
|
+
|
|
|
+> Example request:
|
|
|
+
|
|
|
+```bash
|
|
|
+curl "http://localhost/api/user" \
|
|
|
+-H "Accept: application/json"
|
|
|
+```
|
|
|
+
|
|
|
+```javascript
|
|
|
+var settings = {
|
|
|
+ "async": true,
|
|
|
+ "crossDomain": true,
|
|
|
+ "url": "http://localhost/api/user",
|
|
|
+ "method": "GET",
|
|
|
+ "headers": {
|
|
|
+ "accept": "application/json"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$.ajax(settings).done(function (response) {
|
|
|
+ console.log(response);
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+> Example response:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "index_resource": true
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+### HTTP Request
|
|
|
+`GET api/user`
|
|
|
+
|
|
|
+`HEAD api/user`
|
|
|
+
|
|
|
+
|
|
|
+<!-- END_2ea88ff35aa222f5582e50f39a2b35fd -->
|
|
|
+<!-- START_99a7210df460e7fd8ad2508ee28b9763 -->
|
|
|
+## Show the form for creating a new resource.
|
|
|
+
|
|
|
+> Example request:
|
|
|
+
|
|
|
+```bash
|
|
|
+curl "http://localhost/api/user/create" \
|
|
|
+-H "Accept: application/json"
|
|
|
+```
|
|
|
+
|
|
|
+```javascript
|
|
|
+var settings = {
|
|
|
+ "async": true,
|
|
|
+ "crossDomain": true,
|
|
|
+ "url": "http://localhost/api/user/create",
|
|
|
+ "method": "GET",
|
|
|
+ "headers": {
|
|
|
+ "accept": "application/json"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$.ajax(settings).done(function (response) {
|
|
|
+ console.log(response);
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+> Example response:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "create_resource": true
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+### HTTP Request
|
|
|
+`GET api/user/create`
|
|
|
+
|
|
|
+`HEAD api/user/create`
|
|
|
+
|
|
|
+
|
|
|
+<!-- END_99a7210df460e7fd8ad2508ee28b9763 -->
|
|
|
+<!-- START_f0654d3f2fc63c11f5723f233cc53c83 -->
|
|
|
+## Store a newly created resource in storage.
|
|
|
+
|
|
|
+> Example request:
|
|
|
+
|
|
|
+```bash
|
|
|
+curl "http://localhost/api/user" \
|
|
|
+-H "Accept: application/json"
|
|
|
+```
|
|
|
+
|
|
|
+```javascript
|
|
|
+var settings = {
|
|
|
+ "async": true,
|
|
|
+ "crossDomain": true,
|
|
|
+ "url": "http://localhost/api/user",
|
|
|
+ "method": "POST",
|
|
|
+ "headers": {
|
|
|
+ "accept": "application/json"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$.ajax(settings).done(function (response) {
|
|
|
+ console.log(response);
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+### HTTP Request
|
|
|
+`POST api/user`
|
|
|
+
|
|
|
+
|
|
|
+<!-- END_f0654d3f2fc63c11f5723f233cc53c83 -->
|
|
|
+<!-- START_7a5835399fad9a53bc0430d6e3054297 -->
|
|
|
+## Display the specified resource.
|
|
|
+
|
|
|
+> Example request:
|
|
|
+
|
|
|
+```bash
|
|
|
+curl "http://localhost/api/user/{user}" \
|
|
|
+-H "Accept: application/json"
|
|
|
+```
|
|
|
+
|
|
|
+```javascript
|
|
|
+var settings = {
|
|
|
+ "async": true,
|
|
|
+ "crossDomain": true,
|
|
|
+ "url": "http://localhost/api/user/{user}",
|
|
|
+ "method": "GET",
|
|
|
+ "headers": {
|
|
|
+ "accept": "application/json"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$.ajax(settings).done(function (response) {
|
|
|
+ console.log(response);
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+> Example response:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "show_resource": "1"
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+### HTTP Request
|
|
|
+`GET api/user/{user}`
|
|
|
+
|
|
|
+`HEAD api/user/{user}`
|
|
|
+
|
|
|
+
|
|
|
+<!-- END_7a5835399fad9a53bc0430d6e3054297 -->
|
|
|
+<!-- START_5ed9d10b12650f9536edfa994fafae15 -->
|
|
|
+## Show the form for editing the specified resource.
|
|
|
+
|
|
|
+> Example request:
|
|
|
+
|
|
|
+```bash
|
|
|
+curl "http://localhost/api/user/{user}/edit" \
|
|
|
+-H "Accept: application/json"
|
|
|
+```
|
|
|
+
|
|
|
+```javascript
|
|
|
+var settings = {
|
|
|
+ "async": true,
|
|
|
+ "crossDomain": true,
|
|
|
+ "url": "http://localhost/api/user/{user}/edit",
|
|
|
+ "method": "GET",
|
|
|
+ "headers": {
|
|
|
+ "accept": "application/json"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$.ajax(settings).done(function (response) {
|
|
|
+ console.log(response);
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+> Example response:
|
|
|
+
|
|
|
+```json
|
|
|
+{
|
|
|
+ "edit_resource": "1"
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+### HTTP Request
|
|
|
+`GET api/user/{user}/edit`
|
|
|
+
|
|
|
+`HEAD api/user/{user}/edit`
|
|
|
+
|
|
|
+
|
|
|
+<!-- END_5ed9d10b12650f9536edfa994fafae15 -->
|
|
|
+<!-- START_a4a2abed1e8e8cad5e6a3282812fe3f3 -->
|
|
|
+## Update the specified resource in storage.
|
|
|
+
|
|
|
+> Example request:
|
|
|
+
|
|
|
+```bash
|
|
|
+curl "http://localhost/api/user/{user}" \
|
|
|
+-H "Accept: application/json"
|
|
|
+```
|
|
|
+
|
|
|
+```javascript
|
|
|
+var settings = {
|
|
|
+ "async": true,
|
|
|
+ "crossDomain": true,
|
|
|
+ "url": "http://localhost/api/user/{user}",
|
|
|
+ "method": "PUT",
|
|
|
+ "headers": {
|
|
|
+ "accept": "application/json"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$.ajax(settings).done(function (response) {
|
|
|
+ console.log(response);
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+### HTTP Request
|
|
|
+`PUT api/user/{user}`
|
|
|
+
|
|
|
+`PATCH api/user/{user}`
|
|
|
+
|
|
|
+
|
|
|
+<!-- END_a4a2abed1e8e8cad5e6a3282812fe3f3 -->
|
|
|
+<!-- START_4bb7fb4a7501d3cb1ed21acfc3b205a9 -->
|
|
|
+## Remove the specified resource from storage.
|
|
|
+
|
|
|
+> Example request:
|
|
|
+
|
|
|
+```bash
|
|
|
+curl "http://localhost/api/user/{user}" \
|
|
|
+-H "Accept: application/json"
|
|
|
+```
|
|
|
+
|
|
|
+```javascript
|
|
|
+var settings = {
|
|
|
+ "async": true,
|
|
|
+ "crossDomain": true,
|
|
|
+ "url": "http://localhost/api/user/{user}",
|
|
|
+ "method": "DELETE",
|
|
|
+ "headers": {
|
|
|
+ "accept": "application/json"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$.ajax(settings).done(function (response) {
|
|
|
+ console.log(response);
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+### HTTP Request
|
|
|
+`DELETE api/user/{user}`
|
|
|
+
|
|
|
+
|
|
|
+<!-- END_4bb7fb4a7501d3cb1ed21acfc3b205a9 -->
|