Skip to main content

Sources(namesOrIds).Docs.find

Find documents with equal field values across several sources.

const insights = sdk.asAdmin().Insights()

const { result } = await insights.Sources(['Orders', 'Sensor readings']).Docs.find(
{ status: 'paid', country: 'DE' },
{ size: 20 }
)

GET /api/v2/sources/{id1,id2}/docs?size=N&filter=[…]

ParameterDescription
filterObj{ field: value }. Sent as [{ field, operator: 'eq', value }]
sizeDefault 10, capped at 1000 by the server

Response { total, [sourceName]: docs[] }.

Errors: sources/customers-source-not-supported, source/not-found, filter/unknown-operator.

info

The REST endpoint supports the operators eq, neq, gt, gte, lt, lte, in, exists, contains. The SDK only sends eq. See the REST reference.