{{ $metadata['title'] }}
{{ $metadata['description'] ?? '' }}
@if($intro)Authenticating Requests
To authenticate requests, include an Authorization header with the value "Bearer {'{YOUR_API_TOKEN}'}".
All authenticated endpoints are marked with a requires authentication badge.
@if($auth['extra_info'] ?? false){!! $auth['extra_info'] !!}
@endif{{ $group['name'] }}
@if($group['description'] ?? false){{ $group['description'] }}
@endif {{-- Endpoints --}} @foreach($group['endpoints'] as $endpoint) @php $endpointId = $group['name'] . '-' . implode('', $endpoint->httpMethods) . str_replace(['/', '{', '}'], ['-', '-', '-'], $endpoint->uri); $endpointId = Str::slug($endpointId); $method = $endpoint->httpMethods[0]; $formId = implode('', $endpoint->httpMethods) . str_replace(['/', '{', '}', '-'], '', $endpoint->uri); @endphp{{ $endpoint->uri }}
@if($endpoint->metadata->authenticated ?? false)
requires authentication
@endif
{{ $endpoint->metadata->title ?? '' }}
{{ $endpoint->metadata->description }}
@endif {{-- URL Parameters --}} @if(count($endpoint->urlParameters) > 0)URL Parameters
{{ $name }}
{{ $param['type'] ?? 'string' }}
@if($param['required'] ?? false)
required
@endif
{{ $param['description'] }}
@endifQuery Parameters
{{ $name }}
{{ $param['type'] ?? 'string' }}
@if($param['required'] ?? false)
required
@endif
{{ $param['description'] }}
@endifBody Parameters
{{ $name }}
{{ $param['type'] ?? 'string' }}
@if($param['required'] ?? false)
required
@endif
{{ $param['description'] }}
@endifResponse Examples
@foreach($endpoint->responses as $response){{ is_string($response['content']) ? $response['content'] : json_encode(json_decode($response['content']), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
@endif
Example Request
{{-- Mobile Language Tabs --}}curl --request {{ $method }} \
--get "{{ $baseUrl }}/{{ $endpoint->uri }}" \
--header "Authorization: Bearer {'{YOUR_API_TOKEN}'}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL("{{ $baseUrl }}/{{ $endpoint->uri }}");
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "{{ $method }}",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '{{ $baseUrl }}/{{ $endpoint->uri }}';
$response = $client->{{ strtolower($method) }}(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Try It Out
{{-- Response Display --}}Response