Searching DataΒΆ

Filter Mesh data from collection based on query parameters.

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

var pagedPersonResult = await connection.Meshes.SearchAsync<Person>(filter, 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.
mesh : string, required, default: class name
Identifies name of mesh collection. e.g. person.
filter : string
Criteria provided in a MongoDB format to limit results.
orderby : string
Defines which fields need to be sorted and direction in a MongoDB format.
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 anonymousUser = await client.registerAnonymousUser();

var meshyConnection = await client.loginAnonymously(anonymousUser.username);

var pagedResults = await meshyConnection.meshes.search(meshName,
                                                      {
                                                         filter: filter,
                                                         orderby: orderby,
                                                         pageNumber: page,
                                                         pageSize: pageSize
                                                      });

Parameters

accountName : string, required
Indicates which account you are connecting to.
publicKey : string, required
Public identifier of connecting service.
meshName : string, required
Identifies name of mesh collection. e.g. person.
username : string
Unique identifier for user or device.
filter : string
Criteria provided in a MongoDB format to limit results.
orderby : string
Defines which fields need to be sorted and direction in a MongoDB format.
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}/meshes/{mesh}?filter={filter}&
                                                      orderby={orderby}&
                                                      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.
mesh : string, required
Identifies name of mesh collection. e.g. person.
filter : string
Criteria provided in a MongoDB format to limit results.
orderby : string
Defines which fields need to be sorted and direction in a MongoDB format.
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
  • Mesh data found with given search criteria.

Example Result

{
   "page": 1,
   "pageSize": 25,
   "results": [{
                  "_id":"5c78cc81dd870827a8e7b6c4",
                  "firstName": "Bobbo",
                  "lastName": "Bobberson"
              }],
   "totalRecords": 1
}
400 : Bad request
  • Mesh name is invalid and must be alpha characters only.
  • Filter is in an invalid format. It must be in a valid Mongo DB format.
  • Order by is in an invalid format. It must be in a valid Mongo DB format.
401 : Unauthorized
  • User is not authorized to make call.
429 : Too many request
  • You have have either hit your API or Database limit. Please review your account.