SOLVED UAPI Functions - Email::list_pops_with_disk

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello @rdgonzalez,

There are currently no UAPI functions that will return information about an individual email account's outgoing suspension status. It makes sense to provide this information as part of the Email::list_pops_with_disk UAPI function's returned data, since it already returns information about an individual email account's incoming email or login suspension status. I've opened internal case CPANEL-21854 to see if we can get the outgoing email suspension status included as part of the data returned by the Email::list_pops_with_disk UAPI function. I'll monitor this case and update this thread with more information as it becomes available.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello @rdgonzalez,

To update, it looks like it's already possible to do this via the "get_restrictions" parameter. EX:

Code:
uapi --user=username Email list_pops_with_disk get_restrictions=1
Internal case DOC-11207 is now open to ensure this parameter is documented. I'll update this thread again once the documentation update is published.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
I did the tests and it works very well. It would be great if we could also get hold status.
Hello @rdgonzalez,

You should see both "hold_outgoing" and "suspended_outgoing" as part of the returned data when using "get_restrictions=1" in the command. EX:

Code:
# uapi --user=user123 Email list_pops_with_disk get_restrictions=1|grep suspended_outgoing
      suspended_outgoing: 0
      suspended_outgoing: 1
      suspended_outgoing: 1
# uapi --user=user123 Email list_pops_with_disk get_restrictions=1|grep hold_outgoing
      hold_outgoing: 0
      hold_outgoing: 0
      hold_outgoing: 0
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

If you are logged in via WHM and you want to run the command via your browser, then you'd append the following to existing URL in your browser (after https://hostname:2087/cpsess12345678/):

Code:
json-api/cpanel?api.version=1&cpanel_jsonapi_module=Email&cpanel_jsonapi_func=list_pops_with_disk&cpanel_jsonapi_user=username123&cpanel_jsonapi_apiversion=3&get_restrictions=1
The full URL would look like this:

Code:
https://hostname:2087/cpsess12345678/json-api/cpanel?api.version=1&cpanel_jsonapi_module=Email&cpanel_jsonapi_func=list_pops_with_disk&cpanel_jsonapi_user=username123&cpanel_jsonapi_apiversion=3&get_restrictions=1
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

You're very welcome. I've marked this thread as solved.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463