Skip to content
bigmax1 edited this page Mar 28, 2014 · 40 revisions

###Katalog

id zasób opis
[[RST_KT_MSL REST-API#rst_kt_msl]] GET measurements
[[RST_KT_MSA REST-API#rst_kt_msa]] POST measurements
[[RST_KT_MSG REST-API#rst_kt_msg]] GET measurements/{id}
[[RST_KT_MSD REST-API#rst_kt_msd]] DELETE measurements/{id}
[[RST_KT_MSS REST-API#rst_kt_mss]] GET measurements/filter{?resource,metric}
[[RST_KT_RSL REST-API#rst_kt_rsl]] GET resources/

###Monitor

id zasób opis
[[RST_MT_MSL REST-API#rst_mt_msl]] GET measurements
[[RST_MT_CMSA REST-API#rst_mt_cmsa]] POST measurements/{id}
[[RST_MT_MSG REST-API#rst_mt_msg]] GET measurements/{id}
[[RST_MT_MSVL REST-API#rst_mt_msvl]] GET measurements/{id}/data{filter}
[[RST_MT_CMSD REST-API#rst_mt_cmsd]] DELETE measurements/{id}
[[RST_MT_SER REST-API#rst_mt_ser]] GET sensors/{id}
[[RST_MT_RSL REST-API#rst_mt_rsl]] GET resources/
[[RST_MT_RSR REST-API#rst_mt_rsr]] GET resources/{id}/

RST_KT_MSL

Lista wszystkich pomiarów

GET measurements response:

[
  {
    "resource": "Host",
    "metric": "CPU",
    "links": {
      "self": {
        "href": "../"
      },
      "details": {
        "href": "adres pomiaru na konkretnym monitorze"
      }
    }
  }
]

RST_KT_MSA

Dodanie nowego pomiaru do katalogu ( przez monitor )

PUT katalogURL/measurement response:

{
   "monitor": "192.168.0.22",
   "resource": "Host",
   "metric": "CPU"
}

RST_KT_MSG

Przeglądanie konkretnego pomiaru w monitorze

GET katalogURL/measurement/{id} response:

{
    "resource": "Host",
    "metric": "CPU",
    "links": {
      "self": {
        "href": "../"
      },
      "details": {
        "href": "adres pomiaru na konkretnym monitorze"
      }
    }
}

RST_KT_MSD

Usunięcie z katalogu pomiaru

DELETE katalogURL/measurement/{id}

RST_KT_MSS

Lista mozliwych wyszukiwan

RST_KT_MSSP

Filtrowanie pomiarów wg kryteriów

RST_KT_RSL

Lista zasobów

RST_MT_MSL

Pobranie listy aktualnych pomiarów na danym monitorze.

GET monitorURL/measurements response:

[
  {
    "resource": "Host",
    "metric": "CPU",
    "lastValue": 20,
    "unit": "%",
    "links": {
      "self": {
        "href": "/1"
      },
      "data": {
        "href": "/1/data"
      }
    }
  }
]

RST_MT_CMSA

Dodawanie nowego pomiaru złozonego

POST measurements/{id}

request:

 {
    "type" : "mean",
    "param0": 5,
    "param1": 1
  }

RST_MT_CMSD

usuwanie złożonego pomiaru

DELETE monitorURL/measurement/{id}

RST_MT_MSG

Pobranie pomiaru na danym monitorze.

GET monitorURL/measurement/{id} response:

{
    "resource": "Host",
    "metric": "CPU",
    "unit": "%",
    "links": {
      "self": {
        "href": "/1"
      },
      "data": {
        "href": "/1/data"
      }
    }
}

RST_MT_MSVL

Pobranie danych do wykresu dla pomiaru o okreslonym Id

monitorURL/measurement/{id}/data

dodac mozliwosc limit'u wynikow

response:

[
  {
    "timestamp": "2343224",
    "data": 30,
  },
  {
    "timestamp": "2343424",
    "data": 29,
  }
]

Clone this wiki locally