Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Setting Business Logic Permissions

Setting Business Logic Permissions

You can use roles to control who can invoke Business Logic endpoints. The set operation overwrites the current set of permissions for a given endpoint.

The set operation depends on the endpoint type:

Setting Cloud Functions Permissions

The following request updates the permission of a given role over a cloud function endpoint.

Request:
    PUT https://api.everlive.com/v1/Metadata/Applications/your-app-id/CloudFunctionPermissions
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
Payload - raw: 
    {  
      "RoleId":"597dcac0-2bd6-11e5-af54-91e80abdb73c",
      "CloudFunctionId":"05cbf380-2f8b-11e5-8cd0-533ae3a8f949",
      "CanExecute":false
   }
Response:
    Status: 200 OK
    Content-Type: application/json
Payload - raw:
    {
       "Result": 1
    }

You can also update multiple permissions pairings by supplying multiple permissions objects. The following request updates the permissions of several roles over a cloud function:

Request:
    PUT https://api.everlive.com/v1/Metadata/Applications/your-app-id/CloudFunctionPermissions
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
Payload - raw: 
    [  
       {  
          "RoleId":"597dcac0-2bd6-11e5-af54-91e80abdb73c",
          "CloudFunctionId":"05cbf380-2f8b-11e5-8cd0-533ae3a8f949",
          "CanExecute":true
       },
       {  
          "RoleId":"5ab22ec5-7648-4288-b3b0-a0da02d66203",
          "CloudFunctionId":"05cbf380-2f8b-11e5-8cd0-533ae3a8f949",
          "CanExecute":false
       }
    ]
Response:
    Status: 200 OK
    Content-Type: application/json
Payload - raw:
    {
       "Result": 2
    }

Setting Stored Procedures Permissions

The following request updates the permission of a given role over a mapped stored procedure endpoint.

Request:
    PUT https://api.everlive.com/v1/Metadata/Applications/your-app-id/ProcedurePermissions
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
Payload - raw: 
    {
      "RoleId": "93e2c7d0-1996-11e5-8879-a93b5c225836",
      "SqlProcedureId": "e84f1e80-199c-11e5-9f0d-4ba7449cc0d5",
      "CanExecute": false
    }
Response:
    Status: 200 OK
    Content-Type: application/json
Payload - raw:
    {
       "Result": 1
    }

You can also update multiple permissions pairings by supplying multiple permissions objects. The following request updates the permissions of several roles over a stored procedure:

Request:
    PUT https://api.everlive.com/v1/Metadata/Applications/your-app-id/ProcedurePermissions
Headers:
    Content-Type: application/json
    Authorization: Masterkey your-master-key-here
Payload - raw: 
    [  
       {  
          "RoleId":"93e2c7d0-1996-11e5-8879-a93b5c225836",
          "SqlProcedureId":"e84f1e80-199c-11e5-9f0d-4ba7449cc0d5",
          "CanExecute":false
       },
       {  
          "RoleId":"87w3c7d0-1574-14w5-3698-a94a8s25r784",
          "SqlProcedureId":"e84f1e80-199c-11e5-9f0d-4ba7449cc0d5",
          "CanExecute":true
       },
       {  
          "RoleId":"87w3c7d0-1574-14w5-3698-2d3l3ad58d28",
          "SqlProcedureId":"e84d2e80-154d-a13s-3s2q-4ba7449cc0d5",
          "CanExecute":true
       }
    ]
Response:
    Status: 200 OK
    Content-Type: application/json
Payload - raw:
    {
       "Result": 3
    }

See Also

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