Searching

Search for information related to roles.

Role

Search details about roles.

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

await connection.Roles.SearchAsync(name, page, pageSize);

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.
name : string
Case-insensitive partial name search.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.
var client = MeshyClient.initialize(accountName, publicKey);

var meshyConnection = await client.loginAnonymously(username);

await meshyConnection.rolesService.search({
                                            name: name,
                                            page: page,
                                            pageSize: pageSize
                                         });

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.
name : string
Case-insensitive partial name search.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.
GET https://api.meshydb.com/{accountName}/roles?name={name}&
                                                page={page}&
                                                pageSize={pageSize} HTTP/1.1
Authentication: Bearer {access_token}

(Line breaks added for readability)

Parameters

accountName : string, required
Indicates which account you are connecting to.
access_token : string, required
Token identifying authorization with MeshyDB requested during Generating Token.
name : string
Case-insensitive partial name search.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.

Responses

200 : OK
  • Identifies if role were found.

Example Result

{
   "page": 1,
   "pageSize": 25,
   "results": [{
                 "name":"test",
                 "description":"...",
                 "id":"5db...",
                 "numberOfUsers": 0
              }],
   "totalRecords": 1
}
401 : Unauthorized
  • User is not authorized to make call.
403 : Forbidden
  • User has insufficent permission to read roles.
429 : Too many request
  • You have either hit your API or Database limit. Please review your account.

Permission

Search permissions from role by id.

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

await connection.Roles.SearchPermissionAsync(roleId, permissibleName, page, pageSize);

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.
permissibleName : string
Case-insensitive partial name search of permissible.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.
var client = MeshyClient.initialize(accountName, publicKey);

var meshyConnection = await client.loginAnonymously(username);

await meshyConnection.rolesService.searchPermission(roleId, {
                                                                permissibleName: permissibleName,
                                                                page: page,
                                                                pageSize: pageSize
                                                            });

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.
permissibleName : string
Case-insensitive partial name search of permissible.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.
GET https://api.meshydb.com/{accountName}/roles/{roleId}/permissions?permissibleName={permissibleName}&
                                                                     page={page}&
                                                                     pageSize={pageSize} HTTP/1.1
Authentication: Bearer {access_token}

(Line breaks added for readability)

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.
permissibleName : string
Case-insensitive partial name search of permissible.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.

Responses

200 : OK
  • Identifies if permissions were found.

Example Result

{
    "results":[
        {
            "permissibleName":"meshes",
            "create":true,
            "update":true,
            "read":true,
            "delete":true,
            "id":"5d9..."
        }
    ],
    "page":1,
    "pageSize":25,
    "totalRecords":1
}
401 : Unauthorized
  • User is not authorized to make call.
403 : Forbidden
  • User has insufficent permission to read roles.
429 : Too many request
  • You have either hit your API or Database limit. Please review your account.

Permissibles

Search for permissible to assign to a permission.

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

await connection.Roles.SearchPermissibleAsync(name, page, pageSize);

Parameters

accountName : string, required
Indicates which account you are connecting to.
publicKey : string, required
Public identifier of connecting service.
name : string
Case-insensitive partial name search.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.
var client = MeshyClient.initialize(accountName, publicKey);

var meshyConnection = await client.loginAnonymously(username);

await meshyConnection.rolesService.searchPermissible(name, page, pageSize);

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.
name : string
Case-insensitive partial name search.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.
GET https://api.meshydb.com/{accountName}/permissibles?name={name}&
                                                       page={page}&
                                                       pageSize={pageSize} HTTP/1.1
Authentication: Bearer {access_token}

(Line breaks added for readability)

Parameters

accountName : string, required
Indicates which account you are connecting to.
access_token : string, required
Token identifying authorization with MeshyDB requested during Generating Token.
name : string
Case-insensitive partial name search.
page : integer, default: 1
Page number of results to bring back.
pageSize : integer, max: 200, default: 25
Number of results to bring back per page.

Responses

200 : OK
  • Identifies if permissibles were found.

Example Result

{
    "results":[
        {
            "name":"meshes",
            "canCreate":true,
            "canUpdate":true,
            "canRead":true,
            "canDelete":true
        }
    ],
    "page":1,
    "pageSize":25,
    "totalRecords":1
}
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.