All APIs

{{ $api->name }}

{{ ucfirst($api->status) }}
@php $methods = is_array($api->allowed_methods) ? $api->allowed_methods : json_decode($api->allowed_methods ?? '[]', true); $methods = array_map('strtoupper', $methods ?: ['GET']); $slug = $api->slug; $base = url('/api/generated'); $methodMeta = [ 'GET' => [ 'label' => 'List / Read Records', 'description' => 'Fetch all records with pagination, or look up a single record by ID.', 'badge_bg' => 'bg-emerald-100', 'badge_text' => 'text-emerald-700', 'border' => 'border-emerald-200', 'icon_color' => 'text-emerald-500', 'btn' => 'bg-emerald-600 hover:bg-emerald-700', 'urls' => ["{$base}/{$slug}", "{$base}/{$slug}/{id}"], 'route' => 'apis.endpoint.get', ], 'POST' => [ 'label' => 'Create a Record', 'description' => 'Submit a form with field values to insert a new record into the database.', 'badge_bg' => 'bg-blue-100', 'badge_text' => 'text-blue-700', 'border' => 'border-blue-200', 'icon_color' => 'text-blue-500', 'btn' => 'bg-blue-600 hover:bg-blue-700', 'urls' => ["{$base}/{$slug}/create"], 'route' => 'apis.endpoint.post', ], 'PUT' => [ 'label' => 'Replace a Record (PUT)', 'description' => 'Provide a record ID and all fields to fully replace an existing record.', 'badge_bg' => 'bg-amber-100', 'badge_text' => 'text-amber-700', 'border' => 'border-amber-200', 'icon_color' => 'text-amber-500', 'btn' => 'bg-amber-500 hover:bg-amber-600', 'urls' => ["{$base}/{$slug}/update/{id}"], 'route' => 'apis.endpoint.put', ], 'PATCH' => [ 'label' => 'Partial Update (PATCH)', 'description' => 'Provide a record ID and only the fields you want to change.', 'badge_bg' => 'bg-orange-100', 'badge_text' => 'text-orange-700', 'border' => 'border-orange-200', 'icon_color' => 'text-orange-500', 'btn' => 'bg-orange-500 hover:bg-orange-600', 'urls' => ["{$base}/{$slug}/update/{id}"], 'route' => 'apis.endpoint.patch', ], 'DELETE' => [ 'label' => 'Delete a Record', 'description' => 'Provide a record ID to permanently remove it from the database.', 'badge_bg' => 'bg-red-100', 'badge_text' => 'text-red-700', 'border' => 'border-red-200', 'icon_color' => 'text-red-500', 'btn' => 'bg-red-600 hover:bg-red-700', 'urls' => ["{$base}/{$slug}/delete/{id}"], 'route' => 'apis.endpoint.delete', ], ]; @endphp
@if(session('success'))
{{ session('success') }}
@endif {{-- Info strip --}}

ID

#{{ $api->id }}

Data Source

{{ optional($api->dataSource)->name ?? '—' }}

View

{{ $api->dataset_id }}

Columns

{{ $columnCount ?? 0 }} fields

{{-- Endpoint cards --}}

Available Endpoints

@foreach($methodMeta as $method => $meta) @if(in_array($method, $methods))
{{-- Method badge --}}
{{ $method }}
{{-- Info --}}

{{ $meta['label'] }}

{{ $meta['description'] }}

@foreach($meta['urls'] as $url) {{ $url }} @endforeach
{{-- Action button --}}
@endif @endforeach
{{-- Exposed Columns --}}

Exposed Columns

@php $cols = is_array($api->selected_columns) ? $api->selected_columns : json_decode($api->selected_columns ?? '[]', true); @endphp @if(count($cols ?? []))
@foreach($cols as $col) {{ $col }} @endforeach
@else

No columns recorded.

@endif