|
105 | 105 | then a 400 (bad-request) response must be returned. Other appropriate |
106 | 106 | error codes can also be thrown.") |
107 | 107 |
|
108 | | - (add-metric |
109 | | - [this collection-id data options] |
110 | | - "This function adds the given metric to the database. The metric |
111 | | - must not already exist in the database. |
112 | | -
|
113 | | - On success, the function must return a 201 ring response with the |
114 | | - relative URL of the new metric as the Location. |
115 | | -
|
116 | | - On failure, the function must throw an ex-info containing the error |
117 | | - ring response. The error must be 409 (conflict) if the metric |
118 | | - exists already. Other appropriate error codes can also be thrown.") |
119 | | - |
120 | | - (bulk-insert-metrics |
121 | | - [this collection-id data options] |
122 | | - "This function insert the given metrics in the database where the |
123 | | - collection-id corresponds to the name of a metrics Collection. |
124 | | -
|
125 | | - On success, the function must return the summary map of what was done |
126 | | - on the db. |
127 | | -
|
128 | | - On failure, the function must throw an ex-info containing the error |
129 | | - ring response. If the resource-id does not correspond to a Collection, |
130 | | - then a 400 (bad-request) response must be returned. Other appropriate |
131 | | - error codes can also be thrown.") |
132 | | - |
133 | 108 | (bulk-delete |
134 | 109 | [this collection-id options] |
135 | 110 | "This function removes the given resources in the database where the |
|
157 | 132 | error codes can also be thrown.") |
158 | 133 |
|
159 | 134 | (create-timeseries |
160 | | - [this timeseries-id options] |
161 | | - "This function creates the given timeseries in the database.") |
| 135 | + [this index options] |
| 136 | + "This function creates a timeseries with the given index name in the database.") |
162 | 137 |
|
163 | 138 | (retrieve-timeseries |
164 | | - [this timeseries-id] |
| 139 | + [this index] |
165 | 140 | "This function retrieves the identified timeseries from the database. |
166 | 141 |
|
167 | 142 | On success, this returns the clojure map representation of the |
168 | 143 | timeseries. The response must not be embedded in a ring response. |
169 | 144 |
|
170 | 145 | On failure, this function must throw an ex-info containing the error |
171 | | - ring response. If the resource doesn't exist, use a 404 status.")) |
| 146 | + ring response. If the resource doesn't exist, use a 404 status.") |
| 147 | + |
| 148 | + (add-timeseries-datapoint |
| 149 | + [this index data options] |
| 150 | + "This function adds the given timeseries datapoint to the database. |
| 151 | + The datapoint with the given timestamp and dimensions must not already exist in the database. |
| 152 | +
|
| 153 | + On success, the function must return a 201 ring response with the |
| 154 | + relative URL of the new metric as the Location. |
| 155 | +
|
| 156 | + On failure, the function must throw an ex-info containing the error |
| 157 | + ring response. The error must be 409 (conflict) if the metric |
| 158 | + exists already. Other appropriate error codes can also be thrown.") |
| 159 | + |
| 160 | + (bulk-insert-timeseries-datapoints |
| 161 | + [this index data options] |
| 162 | + "This function insert the given timeseries datapoints in the database. |
| 163 | +
|
| 164 | + On success, the function must return the summary map of what was done |
| 165 | + on the db. |
| 166 | +
|
| 167 | + On failure, the function must throw an ex-info containing the error |
| 168 | + ring response. If the resource-id does not correspond to a Collection, |
| 169 | + then a 400 (bad-request) response must be returned. Other appropriate |
| 170 | + error codes can also be thrown.")) |
0 commit comments