Realtime Cloud Storage

updateRole

Updates an existing role.

Sample

curl 'https://storage-backend-prd-useast1.realtime.co/updateRole' -H 'Content-Type: application/json; charset=UTF-8' -d '{"applicationKey": "[YOUR_APP_KEY]","privateKey": "[YOUR_APP_KEY]", "role": "DeveloperRole", "policies": {"database": {"listTables": ["SampleUser", "Admin"], "createTable": false }, "tables": { "SampleUser": { "allow":"R", deny: "CUD" } } } }'

Parameters

String applicationKey

Public key of the application's license.

String privateKey

Private key of the application's license. For administration use only.

String role

The name of the role.

Policy policies

A set of rules that control access to the Storage database.

UpdateRoleResponse callback

Function called when the operation completes.

Response

UpdateRoleResponse(data, error)

Response of the updateRole operation.

Boolean data

True if the role was updated.

Error error

The attribute that holds the results of the operation if an error occurred.