flyve-mdm / ios-inventory-agent

Flyve MDM Inventory Agent
http://flyve.org/ios-inventory-agent/
Other
29 stars 17 forks source link

POST XML to GLPI #1

Closed ajsb85 closed 7 years ago

ajsb85 commented 7 years ago

GLPI API REST Endpoint

POST https://dev.flyve.org/glpi/plugins/fusioninventory/

Body payload: <XML content>

User-Agent: FusionInventory-Agent-iOS_v1.0
Content-Type: text/plain; charset=ISO-8859-1

Postman Test

var xmlTree = xml2Json(responseBody);
tests["Status code is 200"] = responseCode.code === 200;
tests["Status code name has string"] = responseCode.name.has("OK");
tests["Content-Type is present"] = postman.getResponseHeader("Content-Type");
tests["Body contains REPLY"] = responseBody.has("REPLY");
tests["Valid REPLY"] = xmlTree.REPLY;