-
Notifications
You must be signed in to change notification settings - Fork 0
REST API
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}/ |
GET measurements response:
[
{
"resource": "Host",
"metric": "CPU",
"links": {
"self": {
"href": "../"
},
"details": {
"href": "adres pomiaru na konkretnym monitorze"
}
}
}
]PUT katalogURL/measurement response:
{
"monitor": "192.168.0.22",
"resource": "Host",
"metric": "CPU"
}GET katalogURL/measurement/{id} response:
{
"resource": "Host",
"metric": "CPU",
"links": {
"self": {
"href": "../"
},
"details": {
"href": "adres pomiaru na konkretnym monitorze"
}
}
}DELETE katalogURL/measurement/{id}
GET monitorURL/measurements response:
[
{
"resource": "Host",
"metric": "CPU",
"lastValue": 20,
"unit": "%",
"links": {
"self": {
"href": "/1"
},
"data": {
"href": "/1/data"
}
}
}
]POST measurements/{id}
request:
{
"type" : "mean",
"param0": 5,
"param1": 1
}
DELETE monitorURL/measurement/{id}
GET monitorURL/measurement/{id} response:
{
"resource": "Host",
"metric": "CPU",
"unit": "%",
"links": {
"self": {
"href": "/1"
},
"data": {
"href": "/1/data"
}
}
}monitorURL/measurement/{id}/data
dodac mozliwosc limit'u wynikow
response:
[
{
"timestamp": "2343224",
"data": 30,
},
{
"timestamp": "2343424",
"data": 29,
}
]