Files
scribe/tests/Fixtures/partial_resource_index.md

1.7 KiB

title, language_tabs, includes, search, toc_footers
title language_tabs includes search toc_footers
API Reference
bash
javascript
true
<a href='http://github.com/mpociot/documentarian'>Documentation Powered by Documentarian</a>

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"
const url = new URL("http://localhost/api/users");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "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"
const url = new URL("http://localhost/api/users/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "create_resource": true
}

HTTP Request

GET api/users/create