Skip to main content

Get Documents

info

All JSON array responses have been shortened for readability.

GET/<ApplicationID/collections/<CollectionID>/documents
SEARCH/<ApplicationID/collections/<CollectionID>/documents
POST/<ApplicationID/collections/<CollectionID>/documents/query
Endpoint Requires Authentication
Example
https://api.weightron.cloud/641c1177ebc8b2f3c195b02c/collections/641c1177ebc8b2f3c195b033/documents
Description

Returns an array of objects stored in this collection. Supports query parameters to preprocess data.

To filter returned data a

SEARCH
endpoint is avaiable. When the
SEARCH
method is used, a request body can provide additional parameters to filter and sort data. See Body Parameters for more info.

For systems where the

SEARCH
method is not supported, an equivalent
POST
endpoint is available:

POST/<ApplicationID/collections/<CollectionID>/documents/query

Example
https://api.weightron.cloud/641c1177ebc8b2f3c195b02c/collections/641c1177ebc8b2f3c195b033/documents/query
Request Body
{ "filter": { "name": { "$eq": "Area 1" } } }
Returns
{
"timestamp": "2023-03-23T14:41:02.473Z",
"data": [
{
"_id": "641c64ef8fde9d1d8a0e1e39",
"name": "Area 1",
"_hash": "ee59d627c649ce1d1e7ad553dfc98235b06f27d9",
"_updatedAt": "2023-03-23T14:40:47.594Z",
"_createdAt": "2023-03-23T14:40:47.594Z",
"_changedBy": "627a5d6cea128a40043bf6aa"
}
]
}
Returns
{
"timestamp": "2023-03-23T14:41:02.473Z",
"data": [
{
"_id": "641c64ef8fde9d1d8a0e1e39",
"name": "Area 1",
"_hash": "ee59d627c649ce1d1e7ad553dfc98235b06f27d9",
"_updatedAt": "2023-03-23T14:40:47.594Z",
"_createdAt": "2023-03-23T14:40:47.594Z",
"_changedBy": "627a5d6cea128a40043bf6aa"
},
{
"_id": "641c64f28fde9d1d8a0e1e54",
"name": "Area 2",
"_hash": "76211f529c67481615fd8032c250d51f8a309eb4",
"_updatedAt": "2023-03-23T14:40:50.969Z",
"_createdAt": "2023-03-23T14:40:50.969Z",
"_changedBy": "627a5d6cea128a40043bf6aa"
}
]
}