B2H BaaS

Data API

CRUD operations for your collections.

Create Documents

const doc = await client.collection('users').add({
  name: 'John Doe',
  email: 'john@example.com',
  age: 30
});
console.log('Created:', doc.id);

Read Documents

// Get all documents
const users = await client.collection('users').list();

// Get single document
const user = await client.collection('users').get('doc-id');

// Query with filters
const adults = await client.collection('users').list({
  'age[$gte]': 18,
  orderBy: 'name',
  limit: 10
});

Update Documents

await client.collection('users').update('doc-id', {
  age: 31
});

Delete Documents

await client.collection('users').delete('doc-id');