Reading Business Logic Permissions

Reading Business Logic Permissions

You can use roles to control who can invoke Business Logic endpoints. The read operation provides a list of roles that can access a given endpoint or endpoints.

The read operation depends on the endpoint type:

Reading Cloud Functions Permissions

Use the following operation to get the permissions of all cloud functions:

Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/CloudFunctionPermissions
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
Response:
{
   "Count":2,
   "Result":[
      {
         "RoleId":"597dcac0-2bd6-11e5-af54-91e80abdb73c",
         "CloudFunctionId":"05cbf380-2f8b-11e5-8cd0-533ae3a8f949",
         "CanExecute":true,
         "CreatedAt":"2015-07-21T09:29:45.046Z",
         "ModifiedAt":"2015-07-21T09:29:45.046Z",
         "CreatedBy":"00000000-0000-0000-0000-000000000000",
         "ModifiedBy":"00000000-0000-0000-0000-000000000000",
         "Owner":"00000000-0000-0000-0000-000000000000",
         "Id":"05e40f60-2f8b-11e5-8cd0-533ae3a8f949"
      },
      {
         "RoleId":"5ab22ec5-7648-4288-b3b0-a0da02d66203",
         "CloudFunctionId":"05cbf380-2f8b-11e5-8cd0-533ae3a8f949",
         "CanExecute":true,
         "CreatedAt":"2015-07-21T09:29:45.046Z",
         "ModifiedAt":"2015-07-21T09:29:45.046Z",
         "CreatedBy":"00000000-0000-0000-0000-000000000000",
         "ModifiedBy":"00000000-0000-0000-0000-000000000000",
         "Owner":"00000000-0000-0000-0000-000000000000",
         "Id":"05e40f61-2f8b-11e5-8cd0-533ae3a8f949"
      }
   ]
}

Reading Stored Procedures Permissions

Use the following operation to get the permissions of all stored procedures:

Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/ProcedurePermissions
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
Response:
{
    "Count": 2,
    "Result": [{
        "RoleId": "93e2c7d0-1996-11e5-8879-a93b5c225836",
        "SqlProcedureId": "e84f1e80-199c-11e5-9f0d-4ba7449cc0d5",
        "CanExecute": true,
        "CreatedAt": "2015-06-23T11:42:20.781Z",
        "ModifiedAt": "2015-06-23T11:42:20.781Z",
        "CreatedBy": "00000000-0000-0000-0000-000000000000",
        "ModifiedBy": "00000000-0000-0000-0000-000000000000",
        "Owner": "00000000-0000-0000-0000-000000000000",
        "Id": "e84fe1d0-199c-11e5-9f0d-4ba7449cc0d5"
    }, {
        "RoleId": "5ab22ec5-7648-4288-b3b0-a0da02d66203",
        "SqlProcedureId": "e84f1e80-199c-11e5-9f0d-4ba7449cc0d5",
        "CanExecute": true,
        "CreatedAt": "2015-06-23T11:42:20.782Z",
        "ModifiedAt": "2015-06-23T11:42:20.782Z",
        "CreatedBy": "00000000-0000-0000-0000-000000000000",
        "ModifiedBy": "00000000-0000-0000-0000-000000000000",
        "Owner": "00000000-0000-0000-0000-000000000000",
        "Id": "e85008e0-199c-11e5-9f0d-4ba7449cc0d5"
    }]
}

Use the following operation to get the permissions that apply to a given stored procedure endpoint:

Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/ProcedurePermissions
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
    X-Everlive-Filter: { "SqlProcedureId": "c1947800-1bed-11e5-b547-1fd52c775607" }
Response:
    Status: 200 OK
    Content-Type: application/json
Payload - raw:
    {
        "Count": 2,
        "Result": [
            {
                "RoleId": "058972b0-1b47-11e5-aa23-43addf27d282",
                "SqlProcedureId": "c1947800-1bed-11e5-b547-1fd52c775607",
                "CanExecute": false,
                "CreatedAt": "2015-06-26T10:26:07.389Z",
                "ModifiedAt": "2015-06-26T10:55:00.066Z",
                "CreatedBy": "00000000-0000-0000-0000-000000000000",
                "ModifiedBy": "00000000-0000-0000-0000-000000000000",
                "Owner": "00000000-0000-0000-0000-000000000000",
                "Id": "c198e4d0-1bed-11e5-b547-1fd52c775607"
            },
            {
                "RoleId": "5ab22ec5-7648-4288-b3b0-a0da02d66203",
                "SqlProcedureId": "c1947800-1bed-11e5-b547-1fd52c775607",
                "CanExecute": true,
                "CreatedAt": "2015-06-26T10:26:07.389Z",
                "ModifiedAt": "2015-06-26T10:26:07.389Z",
                "CreatedBy": "00000000-0000-0000-0000-000000000000",
                "ModifiedBy": "00000000-0000-0000-0000-000000000000",
                "Owner": "00000000-0000-0000-0000-000000000000",
                "Id": "c198e4d1-1bed-11e5-b547-1fd52c775607"
            }
        ]
    }

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.