API always works fine until we XPUT a service whose service description contained "/", ":" and " " (space).
Here's the problem:
This is the service shown on Nagios XI looks like:
Code: Select all
"20001-Serial0/0:0 Status"
Code: Select all
{
...
"service_description": "20001-Serial0\/0:0 Status",
...
}
Here is command:
Code: Select all
curl -k -XPUT 'https://<NXI_IP>/nagiosxi/api/v1/config/service/<config_name>/20001-Serial0%2F0%3A0%20Status?apikey=<mykey>&pretty=1&check_interval=10&retry_interval=2&max_check_attempts=2'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /nagiosxi/api/v1/config/service/<config_name>/20001-Serial0/0:0 Status was not found on this server.</p>
</body></html>
Why would this "20001-Serial0%2F0%3A0%20Status" not match "20001-Serial0/0:0 Status" in API?
Could you help me test it?
I am pretty sure that it is not config_name wrong or other issue, because I can XPUT (update) other services whose description NOT contained those "need-to-be-urlencoded" characters. (e.g. "10004-PING")