Get business role by ID
curl --request GET \
--url http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id} \
--cookie mogl_session=import requests
url = "http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}"
headers = {"cookie": "mogl_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'mogl_session='}};
fetch('http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "mogl_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "mogl_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}")
.header("cookie", "mogl_session=")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["cookie"] = 'mogl_session='
response = http.request(request)
puts response.read_body{
"id": 1,
"name": "Manager",
"status": "A",
"is_deleted": "N",
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-06-01 12:00:00"
}Get business role by ID
Returns a single business role record from the database.
GET
/
business-role
/
get
/
{id}
Get business role by ID
curl --request GET \
--url http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id} \
--cookie mogl_session=import requests
url = "http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}"
headers = {"cookie": "mogl_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'mogl_session='}};
fetch('http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "mogl_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "mogl_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}")
.header("cookie", "mogl_session=")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-admin-dashboard/business-role/get/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["cookie"] = 'mogl_session='
response = http.request(request)
puts response.read_body{
"id": 1,
"name": "Manager",
"status": "A",
"is_deleted": "N",
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-06-01 12:00:00"
}Authorizations
Session-based authentication via cookies + CSRF token
Path Parameters
Business role ID