Hello lists, I tried contact group update via API but didn't work. I can add a user to create a group for the first time. But then I can not change this group?
my api call as follows : curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://ICINGA_IP:5665/v1/objects/users/hakgoz' -d '{"attrs":{ "email": "[email protected]", "groups": ["NOC"]}}' | python -m json.tool { "results": [ { "code": 500.0, "name": "hakgoz", "status": "Attribute 'groups' could not be set: Error: Attribute cannot be modified.\n\n\t(0) libbase.so: void boost::throw_exception<boost::exception_detail::error_info_injector<std::invalid_argument> >(boost::exception_detail::error_info_injector<std::invalid_argument> const&) (+0x104) [0x2ae0ed995fd4]\n\t(1) libbase.so: void boost::exception_detail::throw_exception_<std::invalid_argument>(std::invalid_argument const&, char const*, char const*, int) (+0x67) [0x2ae0ed996087]\n\t(2) libbase.so: icinga::ConfigObject::ModifyAttribute(icinga::String const&, icinga::Value const&, bool) (+0x120c) [0x2ae0ed9714ac]\n\t(3) libremote.so: icinga::ModifyObjectHandler::HandleRequest(boost::intrusive_ptr<icinga::ApiUser> const&, icinga::HttpRequest&, icinga::HttpResponse&, boost::intrusive_ptr<icinga::Dictionary> const&) (+0x770) [0x2ae0ee306180]\n\t(4) libremote.so: icinga::HttpHandler::ProcessRequest(boost::intrusive_ptr<icinga::ApiUser> const&, icinga::HttpRequest&, icinga::HttpResponse&) (+0x5ea) [0x2ae0ee3012ea]\n\t(5) libremote.so: icinga::HttpServerConnection::ProcessMessageAsync(icinga::HttpRequest&) (+0x48d) [0x2ae0ee30387d]\n\t(6) libbase.so: icinga::WorkQueue::WorkerThreadProc() (+0x4e3) [0x2ae0ed9480d3]\n\t(7) libboost_thread.so.1.55.0: <unknown function> (+0xdaea) [0x2ae0ecc95aea]\n\t(8) libpthread.so.0: <unknown function> (+0x80a4) [0x2ae0ed63b0a4]\n\t(9) libc.so.6: clone (+0x6d) [0x2ae0f01bb87d]\n\n", "type": "User" } ] }
_______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
