Deleting

Delete information for specific role.

Role

Delete details about role by id.

var client = MeshyClient.Initialize(accountName, publicKey);
var connection = await client.LoginAnonymouslyAsync(username);

await connection.Roles.DeleteAsync(roleId);

Parameters

accountName : string, required
Indicates which account you are connecting to.
publicKey : string, required
Public identifier of connecting service.
username : string, required
Unique identifier for user or device.
roleId : string, required
Identifies id of role.
var client = MeshyClient.initialize(accountName, publicKey);

var meshyConnection = await client.loginAnonymously(username);

await meshyConnection.rolesService.delete(roleId);

Parameters

accountName : string, required
Indicates which account you are connecting to.
publicKey : string, required
Public identifier of connecting service.
username : string, required
Unique identifier for user or device.
roleId : string, required
Identifies id of role.
DELETE https://api.meshydb.com/{accountName}/roles/{roleId} HTTP/1.1
Authentication: Bearer {access_token}

Parameters

accountName : string, required
Indicates which account you are connecting to.
access_token : string, required
Token identifying authorization with MeshyDB requested during Generating Token.

Responses

204 : No Content
  • Identifies if role was deleted.
400 : Bad request
  • Unable to delete role that starts with ‘meshy.’.
401 : Unauthorized
  • User is not authorized to make call.
403 : Forbidden
  • User has insufficent permission to delete roles.
404 : Not Found
  • Role was not found.
429 : Too many request
  • You have either hit your API or Database limit. Please review your account.

Permission

Delete specific permission from role by id.

var client = MeshyClient.Initialize(accountName, publicKey);
var connection = await client.LoginAnonymouslyAsync(username);

await connection.Roles.DeletePermissionAsync(roleId, permissionId);

Parameters

accountName : string, required
Indicates which account you are connecting to.
publicKey : string, required
Public identifier of connecting service.
roleId : string, required
Identifies id of role.
permissionId : string, required
Identifies id of permission.
var client = MeshyClient.initialize(accountName, publicKey);

var meshyConnection = await client.loginAnonymously(username);

await meshyConnection.rolesService.deletePermission(roleId, permissionId);

Parameters

accountName : string, required
Indicates which account you are connecting to.
publicKey : string, required
Public identifier of connecting service.
username : string, required
Unique identifier for user or device.
roleId : string, required
Identifies id of role.
permissionId : string, required
Identifies id of permission.
DELETE https://api.meshydb.com/{accountName}/roles/{roleId}/permissions/{permissionId} HTTP/1.1
Authentication: Bearer {access_token}

Parameters

accountName : string, required
Indicates which account you are connecting to.
access_token : string, required
Token identifying authorization with MeshyDB requested during Generating Token.
roleId : string, required
Identifies id of role.
permissionId : string, required
Identifies id of permission.

Responses

204 : No Content
  • Identifies if permission was deleted.
401 : Unauthorized
  • User is not authorized to make call.
403 : Forbidden
  • User has insufficent permission to delete roles.
404 : Not Found
  • Permission was not found.
429 : Too many request
  • You have either hit your API or Database limit. Please review your account.

Remove Users

Remove users from specific role.

var client = MeshyClient.Initialize(accountName, publicKey);
var connection = await client.LoginAnonymouslyAsync(username);

var batchRoleRemove = new BatchRoleRemove();

await connection.Roles.RemoveUsersAsync(roleId, batchRoleRemove);

Parameters

accountName : string, required
Indicates which account you are connecting to.
publicKey : string, required
Public identifier of connecting service.
roleId : string, required
Identifies id of role.
batchRoleRemove : object, required
Batch object of user ids to be removed from role.
var client = MeshyClient.initialize(accountName, publicKey);

var meshyConnection = await client.loginAnonymously(username);

await meshyConnection.rolesService.removeUsers(roleId, batchRoleRemove);

Parameters

accountName : string, required
Indicates which account you are connecting to.
publicKey : string, required
Public identifier of connecting service.
username : string, required
Unique identifier for user or device.
roleId : string, required
Identifies id of role.
batchRoleRemove : object, required
Batch object of user ids to be removed from role.
DELETE https://api.meshydb.com/{accountName}/roles/{roleId}/users HTTP/1.1
Authentication: Bearer {access_token}
Content-Type: application/json

{
    "users": [
                {
                    "id":"5db..."
                }
             ]
}

Parameters

accountName : string, required
Indicates which account you are connecting to.
access_token : string, required
Token identifying authorization with MeshyDB requested during Generating Token.
roleId : string, required
Identifies id of role.

Responses

204 : No Content
  • Identifies if role is removed.
401 : Unauthorized
  • User is not authorized to make call.
403 : Forbidden
  • User has insufficent permission to update roles.
404 : Not Found
  • Role was not found.
429 : Too many request
  • You have either hit your API or Database limit. Please review your account.