...
curl -u "admin:yourpassword" http://netmri_host_name_or_ip/api/server_info.xml
Request Format
The HTTP standard requires the requests to consist of a request line, headers, and an optional request body. The NetMRI does not utilize any special request methods or headers beyond the HTTP/1.1 standard.
...
JSON | XML | |
---|---|---|
Format | { "model": "<model name>", "id": <id value>, "uri": http://<ip>/<plural-model -name>/<id>, "<model name>": { … } } | <?xml version="1.0" encoding="UTF-8"?> <response> <model>model name</model> <id>id value</id> <uri> http://<ip>/<plural-model-name>/<id>.xm l </uri> <model name> … </model name> </response> |
Example | { "model": "script", "id": 45, "uri": "http://10.1.1.1/scripts/ 45" "script": { "id":45, … } } | <?xml version="1.0" encoding="UTF-8"?> <response> <model>script</model> <id>45</id> <uri> http://10.1.1.1/scripts/45.xml </uri> <script> <id type="int">45</id> ... </script> </response> |
...