BMAPI POST api/v1/inventorysoftware/
De MSTECH wiki
Request
Parâmetros
Não há parâmetros
Corpo
{
"id":null,
"k4":"1163683367371843",
"operatingSystem" : {
"name" : "Debian GNU/Linux 8.7 (jessie)ruz1",
"version" : "8.7",
"manufacturer" : "Debian",
"architecture" : "x86_64"
},
"softwareList" : [ {
"name" : "acl",
"version" : "2.2.52-2",
"installDate" : null
}, {
"name" : "acpi",
"version" : "1.7-1",
"installDate" : null
}, {
"name" : "acpi-support-base",
"version" : "0.142-6",
"installDate" : null
}, {
"name" : "acpid",
"version" : "1:2.0.23-2",
"installDate" : null
}, {
"name" : "adduser",
"version" : "3.113+nmu3",
"installDate" : null
}, {
"name" : "adwaita-icon-theme",
"version" : "3.14.0-2",
"installDate" : null
} ]
}
Exemplo
http://painelacessa.hominterna.fde.devedu.ms/BlueMonitorAPI/api/v1/inventorysoftware
Response
Http Status Code
| Código | Nome | Descrição |
|---|---|---|
| 201 | Created | Registro criado com sucesso |
| 412 | PreConditionFailed | Entidade vazia |
| 503 | ServiceUnavailable | Servidor ElasticSearch não encontrado |
| 500 | InternalServerError | Erro geral de servidor |
Corpo
| Nome | Descrição | Tipo |
|---|---|---|
| _index | Nome do índice Elastic | String |
| _type | Tipo do índice Elastic | String |
| _id | Id do inventário gravado no banco do BlueMonitor | Unique Identitifier (GUID) |
| _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": "c550659b-a297-4a7f-9365-4692e452cea7", "_version": 1, "created": true, "result": "created"
}