@extends('layouts.app') @section('title', 'API Target Details') @section('breadcrumb') @endsection @section('content')

{{ $apiTarget->name }}

API Target Information

{{ $apiTarget->name }}

{{ $apiTarget->is_active ? 'Active' : 'Inactive' }}

@if($apiTarget->description)

{{ $apiTarget->description }}

@endif
API Configuration

{{ $apiTarget->method }}

{{ $apiTarget->source_table }}

{{ $apiTarget->auth_type == 'none' ? 'None' : ucfirst(str_replace('_', ' ', $apiTarget->auth_type)) }}


Scheduling

{{ ucfirst($apiTarget->schedule_type) }} @if($apiTarget->schedule_frequency && $apiTarget->schedule_type !== 'manual') Every {{ $apiTarget->schedule_frequency }} {{ $apiTarget->schedule_type == 'hourly' ? 'hour(s)' : ($apiTarget->schedule_type == 'daily' ? 'day(s)' : 'week(s)') }} @endif

@if($apiTarget->last_sent_at) {{ $apiTarget->last_sent_at->format('d M Y, H:i:s') }} ({{ $apiTarget->last_sent_at->diffForHumans() }}) @else Never @endif

{{ $apiTarget->created_at->format('d M Y, H:i:s') }} ({{ $apiTarget->created_at->diffForHumans() }})

{{ $apiTarget->updated_at->format('d M Y, H:i:s') }} ({{ $apiTarget->updated_at->diffForHumans() }})

Recent Activity
View All Logs
@php $recentLogs = $apiTarget->sendLogs()->latest()->limit(5)->get(); @endphp @if($recentLogs->count() > 0) @foreach($recentLogs as $log)
Status: {{ $log->status_code }} {{ $log->error_message ?: 'Success' }}
{{ $log->sent_at ? $log->sent_at->format('d M Y, H:i:s') : $log->created_at->format('d M Y, H:i:s') }} ({{ $log->sent_at ? $log->sent_at->diffForHumans() : $log->created_at->diffForHumans() }}) @if($log->records_sent) • {{ $log->records_sent }} records sent @endif @if($log->response_time) • {{ $log->response_time }}ms @endif
@endforeach @else
No recent activity
@endif
Statistics
{{ $apiTarget->sendLogs()->count() }}
Total Requests
{{ $apiTarget->sendLogs()->where('success', true)->count() }}
Successful
{{ $apiTarget->sendLogs()->where('success', false)->count() }}
Failed
{{ $apiTarget->sendLogs()->where('retry_count', '>', 0)->count() }}
Retried
Quick Actions
View All Logs Edit Configuration
@push('scripts') @endpush @section('styles') @endsection @endsection