FORMAT: 1A
Quick and dirty data consumer/supplier.
Returns all the available collections stored in the database
-
Response 200 (application/json)
-
Body
{ collections: [ "cabbage", "potato", "carrot" ] }
-
-
Parameters
- collection (required, string,
cabbage
) ... Name of the collection
- collection (required, string,
Returns datapoints for the given collection. Limited to 4000 datapoints.
If there is additional metadata, this will also be returned.
Root JSON property is the name of the collection.
-
Response 200 (application/json)
-
Body
{ "cabbage": [ { "date": "2015-01-01T00:00:00Z", "value": 2.53 }, { "date": "2015-01-01T00:01:00Z", "value": 2.20, "meta": { "client": 2401 } } ] }
-
-
Parameters
- collection (required, string,
cabbage
) ... Name of the collection
- collection (required, string,
Accepts one datapoint.
-
Request (application/json)
Field Type Required Description value
Number Yes Value of the datapoint date
String No Date for which the value applies. Defaults to current time. meta
String No Optional metadata for the datapoint. -
Body
{ "value": 2.53, "date": "2015-01-01T00:00:00Z", "meta": { "weight": 24 } }
-
-
Response 200 (application/json)
Root JSON property is the name of the collection.
-
Body
{ "cabbage": { "date": "2015-01-01T00:00:00Z", "value": 2.53, "meta": { "weight": 24 } } }
-
-
Parameters
- collection (required, string,
cabbage
) ... Name of the collection
- collection (required, string,
Purges all datapoints for a given collection.
- Response 204