cdock1029 / ceres

Cloud data collector
3 stars 0 forks source link

more restful style api #2

Closed xingzhong closed 11 years ago

xingzhong commented 11 years ago

our current api separate different functions through different url. It could be more simplicity and data-model oriented. In general, we have two layers apis. The first one works on the low level raw data which provides CURD operations, collect, read, update and delete. The second one works on the higher level analytic level, which provides aggregate metrics. By understanding above, I propose the following url style. It is heavily influenced by RESTful style, therefore will be more easy and compatiable for us to develop client App throught existed framework

  1. POST /collect -> POST /data
  2. GET /query -> GET /data
  3. POST /modify -> PUT /data
  4. POST /delete -> DELETE /data
  5. GET /metrics -> GET /metrics
  6. POST /metrics -> POST /metrics
linux-colonel commented 11 years ago

Done.