RizrvDoc

Did You Know?

PERMISSION

Welcome to Rizrv ! To get characters you need to make a call to the following url :

GET ALL PERMISSION

GEThttps://apis.rizrv.in/api/permissions

Use LARAVEL cURL

                                        
                                            $token = "USER_AUTH_TOKEN";
                                            $ch = curl_init();
                                            $header = array();
                                            $header[] = 'Content-length: 0';
                                            $header[] = 'Content-type: application/json';
                                            $header[] = 'Authorization: Bearer '. $token;
                                            curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/permissions");
                                            curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
                                            curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
                                            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                            $server_output = curl_exec($ch);
                                            curl_close($ch);
                                            $response = json_decode($server_output, true);
                                            if ($response) { ... } else { ... }
                                        
                                    
{
    "status": 200,
    "message": "Success",
    "permissions": [
        {
            "name": "Franchises",
            "items": [
                {
                    "id": 19,
                    "name": "add",
                    "slug": "add-franchises",
                    "description": null,
                    "model": "Franchises",
                    "created_at": "2023-08-11T07:59:12.000000Z",
                    "updated_at": "2023-08-11T07:59:12.000000Z",
                    "deleted_at": null
                }
            ]
        },
        {
            "name": "Membership",
            "items": [
                {
                    "id": 23,
                    "name": "add",
                    "slug": "add-membership",
                    "description": null,
                    "model": "Membership",
                    "created_at": "2023-08-11T07:59:30.000000Z",
                    "updated_at": "2023-08-11T07:59:30.000000Z",
                    "deleted_at": null
                }
            ]
        },
        {
            "name": "RolePremission",
            "items": [
                {
                    "id": 14,
                    "name": "add",
                    "slug": "add-rolepremission",
                    "description": "Welcome  to Add Permission",
                    "model": "RolePremission",
                    "created_at": "2023-08-09T10:59:36.000000Z",
                    "updated_at": "2023-08-09T10:59:36.000000Z",
                    "deleted_at": null
                }
            ]
        }
    ]
}
                                     

Welcome to Rizrv ! To add new roles call to the following url :

PERMISSION DATE STORE

POSThttps://apis.rizrv.in/api/permissions/store

Parameter

Field Type

name

String

description

String

model

String

Use LARAVEL cURL

                                        
                                            $token = "USER_AUTH_TOKEN";
                                            $ch = curl_init();
                                            $header = array();
                                            $header[] = 'Content-length: 0';
                                            $header[] = 'Content-type: application/json';
                                            $header[] = 'Authorization: Bearer '. $token;
                                            curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/permissions/store");
                                            curl_setopt($ch, CURLOPT_POST, 1);
                                            curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
                                            curl_setopt($ch, CURLOPT_POSTFIELDS,"name=permission_name&description=permission_description&model=permission_model");
                                            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                            $server_output = curl_exec($ch);
                                            curl_close($ch);
                                            $response = json_decode($server_output, true);
                                            if ($response) { ... } else { ... }
                                        
                                    
{
    "status": 200,
    "message": "Success",
    "permission": {
        "name": "user12",
        "slug": "user12-1",
        "description": "welcomes",
        "model": "1",
        "updated_at": "2023-08-17T11:08:59.000000Z",
        "created_at": "2023-08-17T11:08:59.000000Z",
        "id": 27
    }
}
                                     

Welcome to Rizrv ! To update permission call to the following url using POST Method:

PERMISSION UPDATE

POSThttps://apis.rizrv.in/api/permissions/update/PERMISSION_ID

Parameter

Field Type

name

String

description

String

model

String

Use LARAVEL cURL

                                
                                    $token = "USER_AUTH_TOKEN";
                                    $ch = curl_init();
                                    $header = array();
                                    $header[] = 'Content-length: 0';
                                    $header[] = 'Content-type: application/json';
                                    $header[] = 'Authorization: Bearer '. $token;
                                    curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/permissions/update/PERMISSION_ID");
                                    curl_setopt($ch, CURLOPT_POST, 1);
                                    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
                                    curl_setopt($ch, CURLOPT_POSTFIELDS,"name=role_name&description=description");
                                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                    $server_output = curl_exec($ch);
                                    curl_close($ch);
                                    $response = json_decode($server_output, true);
                                    if ($response) { ... } else { ... }
                                
                            
{
    "status": 200,
    "message": "Updated",
    "permission": {
        "id": 27,
        "name": "user1",
        "slug": "user1",
        "description": "welcomes",
        "model": "1",
        "created_at": "2023-08-17T11:08:59.000000Z",
        "updated_at": "2023-08-17T11:11:34.000000Z",
        "deleted_at": null
    }
}
                                     

Welcome to Rizrv !To delete role call to the following url using DELETE Method:

PERMISSION DELETE

DELETEhttps://rizrv.in/api/permissions/delete/PERMISSION_ID

Use LARAVEL cURL

                                
                                    $token = "USER_AUTH_TOKEN";
                                    $ch = curl_init();
                                    $header = array();
                                    $header[] = 'Content-length: 0';
                                    $header[] = 'Content-type: application/json';
                                    $header[] = 'Authorization: Bearer '. $token;
                                    curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/permissions/delete/PERMISSION_ID");
                                    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
                                    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
                                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                    $server_output = curl_exec($ch);
                                    curl_close($ch);
                                    $response = json_decode($server_output, true);
                                    if ($response) { ... } else { ... }
                                
                            
{
    "status": 200,
    "message": "Deleted"
}