@extends('layouts.main') @section('title', 'REST API') @section('content')
{{ __('The Radmin API is a low-level HTTP-based API for a Laravel admin starter kit that you can use to')}} create/edit/update
{{ __('Radmin API uses')}}Laravel Passport
Full documentation and API endpoints: https://documenter.getpostman.com/view/11223504/Szmh1vqc?version=latest

{{ __('Example:')}}


{{ __('Laravel Passport')}} {{ __('documentation')}} .
{{ __('Passport')}}

{{ __('Basic Usage')}}

After successful login, an access_token will be provided to user. This token will be used for further requests

access_token will be like, eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvd29ya3N1aXRlLmRldlwvYXBpXC92MVwvYXV0aFwvbG9naW4iLCJpYXQiOjE1ODAyODA3MjksImV4cCI6MTYxMTkwMzEyOCwibmJmIjoxNTgwMjgwNzI5LCJqdGkiOiJBYXE1QkdnT0p1dG1ycUdIIiwic3ViIjoxLCJwcnYiOiI4MThmNWM5OGFjZTIzNzUzMmQ5ZDQ5NDNmZDhlZmI1NDBiODU1YjQyIiwicmVtZW1iZXIiOjEsInR5cGUiOjF9.wK4OhcwUWa9uwFboqkZCOznjnRnjU19yzoCGCKIZUY0
User must set request header with this data

'headers' => [
    'Accept' => 'application/json',
    'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvd29ya3N1aXRlLmRldlwvYXBpXC92MVwvYXV0aFwvbG9naW4iLCJpYXQiOjE1ODAyODA3MjksImV4cCI6MTYxMTkwMzEyOCwibmJmIjoxNTgwMjgwNzI5LCJqdGkiOiJBYXE1QkdnT0p1dG1ycUdIIiwic3ViIjoxLCJwcnYiOiI4MThmNWM5OGFjZTIzNzUzMmQ5ZDQ5NDNmZDhlZmI1NDBiODU1YjQyIiwicmVtZW1iZXIiOjEsInR5cGUiOjF9.wK4OhcwUWa9uwFboqkZCOznjnRnjU19yzoCGCKIZUY0',
],

Part after "Bearer" is the access token

{{ __('Available Api Endpoints')}}

{{ __('Method')}} {{ __('URl')}} {{ __('Parameters')}}
POST /api/v1/login {email, password}
GET /api/v1/profile
POST /api/v1/change-password {old_password, password, password_confirmation}
POST /api/v1/update-profile {name, email}
GET /api/v1/logout
GET /api/v1/users
POST /api/v1/user/create {name, email, password, password_confirmation, role[]}
GET /api/v1/user/1 Note:1 is id, you can replace it with any id
GET /api/v1/user/delete/1 Note:1 is id, you can replace it with any id
POST /api/v1/user/change-role/1 {role[]}Note:1 is id, you can replace it with any id
GET /api/v1/roles
POST /api/v1/role/create {role, permissions[]}
GET /api/v1/
GET /api/v1/role/1 Note:1 is id, you can replace it with any id
GET /api/v1/role/delete/1 Note:1 is id, you can replace it with any id
POST /api/v1/role/change-permission/1 {permissions[]}Note:1 is id, you can replace it with any id
GET /api/v1/permissions
POST /api/v1/permission/create {permission}
GET /api/v1/
GET /api/v1/permission/1 Note:1 is id, you can replace it with any id
GET /api/v1/permission/delete/1 Note:1 is id, you can replace it with any id
@endsection