Retrieving

Retrieve information for specific role.

Role

Retrieve details about role by id.

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

await connection.Roles.GetAsync(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.get(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.
GET 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

200 : OK
  • Identifies if role was found.

Example Result

{
    "name":"test",
    "description":"...",
    "id":"5db..."
}
401 : Unauthorized
  • User is not authorized to make call.
403 : Forbidden
  • User has insufficent permission to read 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

Get specific permission from role by id.

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

var permission = await connection.Roles.GetPermissionAsync(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);

var permission = await meshyConnection.rolesService.getPermission(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.
GET 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

200 : OK
  • Identifies if permission was found.

Example Result

{
    "id":"5db...",
    "permissibleName":"meshes",
    "create":"true",
    "update":"true",
    "read":"true",
    "delete":"true"
}
401 : Unauthorized
  • User is not authorized to make call.
403 : Forbidden
  • User has insufficent permission to read 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.