mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-21 09:24:37 +08:00
4.6 KiB
4.6 KiB
title, language_tabs, includes, search, toc_footers
| title | language_tabs | includes | search | toc_footers | |||
|---|---|---|---|---|---|---|---|
| API Reference |
|
true |
|
Info
Welcome to the generated API reference. Get Postman Collection
#general
Display a listing of the resource.
Example request:
curl -X GET -G "http://localhost/api/users" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/users",
"method": "GET",
"headers": {
"accept": "application/json",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"index_resource": true
}
HTTP Request
GET api/users
Show the form for creating a new resource.
Example request:
curl -X GET -G "http://localhost/api/users/create" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/users/create",
"method": "GET",
"headers": {
"accept": "application/json",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"create_resource": true
}
HTTP Request
GET api/users/create
Store a newly created resource in storage.
Example request:
curl -X POST "http://localhost/api/users" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/users",
"method": "POST",
"headers": {
"accept": "application/json",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
POST api/users
Display the specified resource.
Example request:
curl -X GET -G "http://localhost/api/users/{user}" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/users/{user}",
"method": "GET",
"headers": {
"accept": "application/json",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"show_resource": true
}
HTTP Request
GET api/users/{user}
Show the form for editing the specified resource.
Example request:
curl -X GET -G "http://localhost/api/users/{user}/edit" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/users/{user}/edit",
"method": "GET",
"headers": {
"accept": "application/json",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"edit_resource": true
}
HTTP Request
GET api/users/{user}/edit
Update the specified resource in storage.
Example request:
curl -X PUT "http://localhost/api/users/{user}" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/users/{user}",
"method": "PUT",
"headers": {
"accept": "application/json",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
PUT api/users/{user}
PATCH api/users/{user}
Remove the specified resource from storage.
Example request:
curl -X DELETE "http://localhost/api/users/{user}" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/users/{user}",
"method": "DELETE",
"headers": {
"accept": "application/json",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
DELETE api/users/{user}