Mudanças entre as edições de "BMAPI POST api/v1/inventoryhardware/"
De MSTECH wiki
| Linha 10: | Linha 10: | ||
{ | { | ||
| − | + | "id": 0, | |
| − | + | "k4":"123633793552315", | |
"diskList":[ | "diskList":[ | ||
{ | { | ||
| − | "name":"/dev/ | + | "name":"/dev/sdaRuz2", |
"serial":"Z3TGYCRW", | "serial":"Z3TGYCRW", | ||
| + | "model":"ST500DM002-1BD142", | ||
"description":null, | "description":null, | ||
"size":500107862016, | "size":500107862016, | ||
| Linha 50: | Linha 51: | ||
}, | }, | ||
{ | { | ||
| − | "name":"/dev/ | + | "name":"/dev/sr0", |
"serial":"K5GD3IF3850", | "serial":"K5GD3IF3850", | ||
| + | "model":"HL-DT-STDVD-RAM_GHA2N", | ||
"description":null, | "description":null, | ||
"size":1073741312, | "size":1073741312, | ||
| − | "partitionList":[ | + | "partitionList":[ |
] | ] | ||
} | } | ||
], | ], | ||
"processor":{ | "processor":{ | ||
| − | "name":"Intel(R) Core(TM) i3-2120 CPU @ 3. | + | "name":"Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz", |
"vendor":"GenuineIntel", | "vendor":"GenuineIntel", | ||
"model":"42", | "model":"42", | ||
| Linha 67: | Linha 69: | ||
"speed":3300000000, | "speed":3300000000, | ||
"id":"AFC1FBFF002006A7", | "id":"AFC1FBFF002006A7", | ||
| − | "uptime": | + | "uptime":1464 |
}, | }, | ||
"motherBoard":{ | "motherBoard":{ | ||
| Linha 75: | Linha 77: | ||
}, | }, | ||
"memory":{ | "memory":{ | ||
| − | "available": | + | "available":6579056640, |
"total":8202752000, | "total":8202752000, | ||
| − | "used": | + | "used":1623695360 |
}, | }, | ||
"network":{ | "network":{ | ||
| − | "host":"MS- | + | "host":"MS-D2819", |
| − | "ipv4Gateway":" | + | "ipv4Gateway":"", |
"ipv6Gateway":"", | "ipv6Gateway":"", | ||
"dns":"[192.168.250.1]", | "dns":"[192.168.250.1]", | ||
| Linha 87: | Linha 89: | ||
"networkInterfaceList":[ | "networkInterfaceList":[ | ||
{ | { | ||
| − | "name":" | + | "name":"eth0", |
"macAddress":"d4:3d:7e:7f:c9:2e", | "macAddress":"d4:3d:7e:7f:c9:2e", | ||
| − | "ipv4Address":"[192.168.13. | + | "ipv4Address":"[192.168.13.29]", |
"ipv6Address":"[fe80:0:0:0:d63d:7eff:fe7f:c92e]" | "ipv6Address":"[fe80:0:0:0:d63d:7eff:fe7f:c92e]" | ||
} | } | ||
| Linha 96: | Linha 98: | ||
"externalDeviceList":[ | "externalDeviceList":[ | ||
{ | { | ||
| − | "name":"EHCI Host | + | "name":"EHCI Host Controller", |
"serial":"0000:00:1a.0", | "serial":"0000:00:1a.0", | ||
"productId":"0002", | "productId":"0002", | ||
| Linha 138: | Linha 140: | ||
}, | }, | ||
{ | { | ||
| − | "name":"USB2.0 | + | "name":"USB2.0 WLAN", |
"serial":"12345", | "serial":"12345", | ||
"productId":"9271", | "productId":"9271", | ||
| Linha 144: | Linha 146: | ||
"vendorId":"0cf3" | "vendorId":"0cf3" | ||
} | } | ||
| − | ] | + | ], |
| + | "memoryBank":{ | ||
| + | "speed":"166MHz, 200MHz", | ||
| + | "description":"Memória 1, memória 2", | ||
| + | "capacity":"1 GB, 3 GB", | ||
| + | "model":"dim 1, dim 1", | ||
| + | "manufacturer":"Samsung, Seagate", | ||
| + | "caption":"Rótulo memória 1, rótulo memória 2", | ||
| + | "bankLabel":"[label banco 1, label banco 2]" | ||
| + | }, | ||
| + | "soundCard":{ | ||
| + | "name":"[6 Series/C200 Series Chipset Family High Definition Audio Controller]" | ||
| + | }, | ||
| + | "videoCard":{ | ||
| + | "name":"[2nd Generation Core Processor Family Integrated Graphics Controller]" | ||
| + | } | ||
} | } | ||
| + | |||
Edição das 20h43min de 27 de março de 2017
Request
Parâmetros
Não há parâmetros
Corpo
{
"id": 0,
"k4":"123633793552315",
"diskList":[
{
"name":"/dev/sdaRuz2",
"serial":"Z3TGYCRW",
"model":"ST500DM002-1BD142",
"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/sr0",
"serial":"K5GD3IF3850",
"model":"HL-DT-STDVD-RAM_GHA2N",
"description":null,
"size":1073741312,
"partitionList":[
]
}
],
"processor":{
"name":"Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz",
"vendor":"GenuineIntel",
"model":"42",
"serial":null,
"coreNumber":4,
"coresPerSocket":2,
"speed":3300000000,
"id":"AFC1FBFF002006A7",
"uptime":1464
},
"motherBoard":{
"serial":"",
"name":"unknown NO DPK",
"manufacturer":"LENOVO"
},
"memory":{
"available":6579056640,
"total":8202752000,
"used":1623695360
},
"network":{
"host":"MS-D2819",
"ipv4Gateway":"",
"ipv6Gateway":"",
"dns":"[192.168.250.1]",
"domain":"MS-D2819.mstech.com.br",
"networkInterfaceList":[
{
"name":"eth0",
"macAddress":"d4:3d:7e:7f:c9:2e",
"ipv4Address":"[192.168.13.29]",
"ipv6Address":"[fe80:0:0:0:d63d:7eff:fe7f:c92e]"
}
]
},
"externalDeviceList":[
{
"name":"EHCI Host Controller",
"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 WLAN",
"serial":"12345",
"productId":"9271",
"vendor":"ATHEROS",
"vendorId":"0cf3"
}
],
"memoryBank":{
"speed":"166MHz, 200MHz",
"description":"Memória 1, memória 2",
"capacity":"1 GB, 3 GB",
"model":"dim 1, dim 1",
"manufacturer":"Samsung, Seagate",
"caption":"Rótulo memória 1, rótulo memória 2",
"bankLabel":"[label banco 1, label banco 2]"
},
"soundCard":{
"name":"[6 Series/C200 Series Chipset Family High Definition Audio Controller]"
},
"videoCard":{
"name":"[2nd Generation Core Processor Family Integrated Graphics Controller]"
}
}
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"
}