Caloriosa / caloriosa

Documentation, Wiki, Analysis, issues and reports for Caloriosa
https://caloriosa.com
0 stars 0 forks source link

Query attributes for filter, sort and agregate results #17

Open purrplingcat opened 6 years ago

purrplingcat commented 6 years ago

Query attributes for filter and agregate results

At REST server side is applied this "magic" query parameters for filter, agregate and sort results.

Category/Type Single Entity {} Native Array [] PCO
Category A
Category B

Category A: Params valid for array/PCO

These parameters are valid for all requests on the collection (array, PCO)

Category B: PCO only params

Additional params accesible only in PCO:

All PCO query params is specified in #16

Example

Fetch all devices, where: field city is Prague, sorted DESC by field title. Limit of records is 10.

/devices?filter[city]=Prague&sortby=title&desc=1&limit=10

Returned data payload (array). Payload can be a part of PCO as attribute data. Example shows only 1 sample.

[
  {
    "name": "XvCfbN0e2c4g",
    "title": "My awesome thermometer",
    "owner": "c54fa45dcc00214a1"
  }
]

Related: #16 Following: #2 Source: