We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The API should return 304 instead of 200 when updating a notification that contains a user-field (without changing its params).
user
Similar bug as here: #2660 One user also mentions it:
Additionally we have found out that the notification endpoint has also this issue.
When updating a notification via an API-call with POST, it returns 200 instead of 304.
This worked in 1.8.1 but does not work in 1.11.1
testuser
data2.json
{ "apply_to": "service", "assign_filter": "host.groups=%22Live%22&!service.vars.nocall=%22yes%22&service.vars.onlycrit=%22yes%22&!service.display_name=%22f5_pool_/stage/%2A%22", "imports": [ "test" ], "notification_interval": 0, "object_name": "service_warn", "object_type": "apply", "states": [ "Warning" ], "types": [ "Problem" ], "users": [ "testuser" ] }
> curl -v -X PUT --data @data2.json -H "Accept: application/json" -L -u icingaadmin:icinga http://localhost:8083/icingaweb2/director/notification * Trying 127.0.0.1:8083... * Connected to localhost (127.0.0.1) port 8083 (#0) * Server auth using Basic with user 'icingaadmin' > PUT /icingaweb2/director/notification HTTP/1.1 > Host: localhost:8083 > Authorization: Basic aWNpbmdhYWRtaW46aWNpbmdh > User-Agent: curl/7.81.0 > Accept: application/json > Content-Length: 424 > Content-Type: application/x-www-form-urlencoded > * Mark bundle as not supporting multiuse < HTTP/1.1 201 Created < Date: Fri, 19 Apr 2024 09:05:35 GMT < Server: Apache/2.4.57 (Debian) < Content-Length: 443 < Content-Type: application/json < { "apply_to": "service", "assign_filter": "host.groups=%22Live%22&!service.vars.nocall=%22yes%22&service.vars.onlycrit=%22yes%22&!service.display_name=%22f5_pool_/stage/%2A%22", "imports": [ "test" ], "notification_interval": 0, "object_name": "service_warn", "object_type": "apply", "states": [ "Warning" ], "types": [ "Problem" ], "users": [ "testuser" ] }
> curl -vv -X POST --data @data2.json -H "Accept: application/json" -L -u icingaadmin:icinga http://localhost:8083/icingaweb2/director/notification?name=service_warn Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 127.0.0.1:8083... * Connected to localhost (127.0.0.1) port 8083 (#0) * Server auth using Basic with user 'icingaadmin' > POST /icingaweb2/director/notification?name=service_warn HTTP/1.1 > Host: localhost:8083 > Authorization: Basic aWNpbmdhYWRtaW46aWNpbmdh > User-Agent: curl/7.81.0 > Accept: application/json > Content-Length: 424 > Content-Type: application/x-www-form-urlencoded > * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Date: Fri, 19 Apr 2024 09:05:43 GMT < Server: Apache/2.4.57 (Debian) < Content-Length: 443 < Content-Type: application/json < { "apply_to": "service", "assign_filter": "host.groups=%22Live%22&!service.vars.nocall=%22yes%22&service.vars.onlycrit=%22yes%22&!service.display_name=%22f5_pool_/stage/%2A%22", "imports": [ "test" ], "notification_interval": 0, "object_name": "service_warn", "object_type": "apply", "states": [ "Warning" ], "types": [ "Problem" ], "users": [ "testuser" ] }
icinga2 --version
The text was updated successfully, but these errors were encountered:
modified
raviks789
Successfully merging a pull request may close this issue.
Expected Behavior
The API should return 304 instead of 200 when updating a notification that contains a
user
-field (without changing its params).Current Behavior
Similar bug as here: #2660
One user also mentions it:
When updating a notification via an API-call with POST, it returns 200 instead of 304.
This worked in 1.8.1 but does not work in 1.11.1
Steps to Reproduce (for bugs)
testuser
.data2.json
with the contents:Your Environment
icinga2 --version
):The text was updated successfully, but these errors were encountered: