Is there a hammer command to configure email settings?

The web ui lets one configure the email notifications one can receive but I
could not find a way to do the same thing via hammer cli. Is this a RFE?

API supports this as well, through /api/v2/users - the parameter is called
email_notifications.
I believe the right place for this to be implemented would be hammer user update --email_notifications but this apparently does not exist (yet)

··· On Wednesday, 1 June 2016 18:21:06 UTC+2, Og Maciel wrote: > > The web ui lets one configure the email notifications one can receive but > I could not find a way to do the same thing via hammer cli. Is this a RFE? >

I ended up filing 2 new issues:

I see this:

curl -k -X GET -H "Content-Type: application/json" -u admin:changeme
https://127.0.0.1/api/v2/mail_notifications/
{
"total": 10,
"subtotal": 10,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [{"id":7,"name":"audit_summary","description":"A summary of
audit changes
report","subscription_type":"report"},{"id":8,"name":"host_built","description":"A
notification when a host finishes
building","subscription_type":"alert"},{"id":1,"name":"host_errata_advisory","description":"A
summary of available and applicable errata for your
hosts","subscription_type":"report"},{"id":10,"name":"openscap_policy_summary","description":"A
summary of reports for OpenScap
policies","subscription_type":"report"},{"id":3,"name":"promote_errata","description":"A
post-promotion summary of hosts with installable
errata","subscription_type":"alert"},{"id":5,"name":"puppet_error_state","description":"A
notification when a host reports a puppet
error","subscription_type":"alert"},{"id":4,"name":"puppet_summary","description":"A
summary of eventful puppet
reports","subscription_type":"report"},{"id":2,"name":"sync_errata","description":"A
summary of new errata after a repository is
synchronized","subscription_type":"alert"}]
}

I have not tried to POST or PUT a user with this information yet, but when
I manually configured mail notifications for an existing user and then
looked at /api/v2/users/:id/mail_notifications and I saw the same exact
content as /api/mail_notifications:

{"firstname":"Og","lastname":"Maciel","mail":"<edited>","admin":true,"auth_source_id":1,"auth_source_name":"Internal","timezone":"","locale":null,"last_login_on":"2016-06-01
17:39:36 UTC","created_at":"2016-04-08 21:54:36
UTC","updated_at":"2016-06-01 17:39:36
UTC","id":3,"login":"admin","default_location":null,"locations":[],"default_organization":{"id":1,"name":"Default
Organization","title":"Default
Organization","description":""},"organizations":[],"auth_source_internal":{"id":1,"type":"AuthSourceInternal","name":"Internal"},"mail_notifications":[{"id":7,"name":"audit_summary","description":"A
summary of audit changes
report","subscription_type":"report"},{"id":8,"name":"host_built","description":"A
notification when a host finishes
building","subscription_type":"alert"},{"id":1,"name":"host_errata_advisory","description":"A
summary of available and applicable errata for your
hosts","subscription_type":"report"},{"id":10,"name":"openscap_policy_summary","description":"A
summary of reports for OpenScap
policies","subscription_type":"report"},{"id":3,"name":"promote_errata","description":"A
post-promotion summary of hosts with installable
errata","subscription_type":"alert"},{"id":5,"name":"puppet_error_state","description":"A
notification when a host reports a puppet
error","subscription_type":"alert"},{"id":4,"name":"puppet_summary","description":"A
summary of eventful puppet
reports","subscription_type":"report"},{"id":2,"name":"sync_errata","description":"A
summary of new errata after a repository is
synchronized","subscription_type":"alert"}]

,"roles":[{"name":"Anonymous","id":21}],"usergroups":[]}

I was expecting that I should be able to see the values (daily, weekly,
etc) as well…