This is an old revision of the document!
JSON-API ViewListEndpoint sums_by_proto_and_design_element_and_condition
Sums over the values of a field for all Cards of a Proto given a condition from another field.
This endpoint requires four query key components:
- The Proto key
- The design element key for the field to sum over
- The design element key for the condition field
- The conditional value in the field specified in third component
Depending on the field type to sum over (see component 2 above) the endpoint returns:
- For number fields it produces the sum of values over the field.
- For text fields it produces the word count over all text entries.
- For relation fields it produces the number of stored relations.
- For date/time fields it produces the number of stored date/time values.
Example: What is the sum over all values in the “Total” field in the Proto “Invoice”, given that the relation field “customer” holds the key for “John Smith”?