Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED UAPI Functions - Email::list_pops_with_disk

Discussion in 'cPanel Developers' started by rdgonzalez, Jul 20, 2018.

Tags:
  1. rdgonzalez

    rdgonzalez Member

    Joined:
    Jul 20, 2018
    Messages:
    13
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Valencia, Carabobo, Venezuela
    cPanel Access Level:
    Root Administrator
    Best regards.

    The help I need is the following: Is there any UAPI that shows the status of the suspension in the mail (suspended_outgoing)?
    upload_2018-7-20_9-18-14.png
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. rdgonzalez

    rdgonzalez Member

    Joined:
    Jul 20, 2018
    Messages:
    13
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Valencia, Carabobo, Venezuela
    cPanel Access Level:
    Root Administrator
    Good morning Michael.

    I did the tests and it works very well. It would be great if we could also get hold status.

    upload_2018-7-25_9-4-5.png
     
  5. rdgonzalez

    rdgonzalez Member

    Joined:
    Jul 20, 2018
    Messages:
    13
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Valencia, Carabobo, Venezuela
    cPanel Access Level:
    Root Administrator
    Thank you very much for the help
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. rdgonzalez

    rdgonzalez Member

    Joined:
    Jul 20, 2018
    Messages:
    13
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Valencia, Carabobo, Venezuela
    cPanel Access Level:
    Root Administrator
    It works very well from the console, but how would the Use WHM API to Call cPanel API and UAPI statement be?

    upload_2018-7-25_15-43-13.png
     
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. rdgonzalez

    rdgonzalez Member

    Joined:
    Jul 20, 2018
    Messages:
    13
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Valencia, Carabobo, Venezuela
    cPanel Access Level:
    Root Administrator
    Correct, thank you very much again for all the help my friend Michael.
     
    cPanelMichael likes this.
  10. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    You're very welcome. I've marked this thread as solved.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. rdgonzalez

    rdgonzalez Member

    Joined:
    Jul 20, 2018
    Messages:
    13
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Valencia, Carabobo, Venezuela
    cPanel Access Level:
    Root Administrator
    Excelent Michael, thanks so much again.
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice