Mudanças entre as edições de "BMAPI POST api/v1/inventoryhardware/"
De MSTECH wiki
(Criou página com 'BlueMonitorAPI > Inventory == Request == '''Parâmetros''' Não há parâmetros '''Corpo''' { "diskList":[ { "na...') |
(→Request) |
||
| Linha 52: | Linha 52: | ||
"description":null, | "description":null, | ||
"size":1073741312, | "size":1073741312, | ||
| − | "partitionList":[ | + | "partitionList":[ |
| − | + | ||
] | ] | ||
} | } | ||
Edição das 15h52min de 14 de março de 2017
Request
Parâmetros
Não há parâmetros
Corpo
{
"diskList":[
{
"name":"/dev/sda44",
"serial":"Z3TGYCRW",
"description":null,
"size":500107862016,
"partitionList":[
{
"name":"sda1",
"size":374276620288,
"type":"ntfs",
"mountPoint":"",
"label":null
},
{
"name":"sda2",
"size":1024,
"type":"partition",
"mountPoint":"",
"label":null
},
{
"name":"sda5",
"size":9998172160,
"type":"swap",
"mountPoint":"",
"label":null
},
{
"name":"sda6",
"size":115829899264,
"type":"ext4",
"mountPoint":"/",
"label":null
}
]
},
{
"name":"/dev/sr011",
"serial":"K5GD3IF3850",
"description":null,
"size":1073741312,
"partitionList":[
]
}
],
"processor":{
"name":"Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz22",
"vendor":"GenuineIntel",
"model":"42",
"serial":null,
"coreNumber":4,
"coresPerSocket":2,
"speed":3300000000,
"id":"AFC1FBFF002006A7",
"uptime":27830
},
"motherBoard":{
"serial":"",
"name":"unknown NO DPK",
"manufacturer":"LENOVO"
},
"memory":{
"available":362652057611,
"total":8202752000,
"used":4576231424
},
"network":{
"host":"MS-D281911",
"ipv4Gateway":"192.168.13.1",
"ipv6Gateway":"",
"dns":"[192.168.250.1]",
"domain":"MS-D2819.mstech.com.br",
"networkInterfaceList":[
{
"name":"eth011",
"macAddress":"d4:3d:7e:7f:c9:2e",
"ipv4Address":"[192.168.13.42]",
"ipv6Address":"[fe80:0:0:0:d63d:7eff:fe7f:c92e]"
}
]
},
"externalDeviceList":[
{
"name":"EHCI Host Controller11",
"serial":"0000:00:1a.0",
"productId":"0002",
"vendor":"Linux 3.16.0-4-amd64 ehci_hcd",
"vendorId":"1d6b"
},
{
"name":"8087:0024",
"serial":"",
"productId":"0024",
"vendor":"",
"vendorId":"8087"
},
{
"name":"Dell USB Entry Keyboard",
"serial":"",
"productId":"2107",
"vendor":"Dell",
"vendorId":"413c"
},
{
"name":"USB Optical Mouse",
"serial":"",
"productId":"c05a",
"vendor":"Logitech",
"vendorId":"046d"
},
{
"name":"EHCI Host Controller",
"serial":"0000:00:1d.0",
"productId":"0002",
"vendor":"Linux 3.16.0-4-amd64 ehci_hcd",
"vendorId":"1d6b"
},
{
"name":"8087:0024",
"serial":"",
"productId":"0024",
"vendor":"",
"vendorId":"8087"
},
{
"name":"USB2.0 WLAN44",
"serial":"12345",
"productId":"9271",
"vendor":"ATHEROS",
"vendorId":"0cf3"
}
]
}
Exemplo
http://painelacessa.hominterna.fde.devedu.ms/BlueMonitorAPI/api/v1/inventoryhardware
Response
Http Status Code
| Código | Nome | Descrição |
|---|---|---|
| 201 | Created | |
| 412 | PreConditionFailed | Entidade vazia |
Corpo
| Nome | Descrição | Tipo |
|---|---|---|
| _index | Nome do índice Elastic | String |
| _type | Tipo do índice Elastic | String |
| _id | Id do registro no Elastic (provisório) | String |
| _version | (Desconhecido. Pesquisar) | Int |
| created | Sinaliza se o registro foi criado com sucesso no ElasticSearch | Bool |
| result | Mensagem de retorno do ElasticSearch | String |
Exemplo
{
"_index": "inventoryhardware",
"_type": "inventoryhardwaremodel",
"_id": "AVrNeAXW4V4gpZD5CXqu",
"_version": 1,
"created": true,
"result": "created"
}