It is possible to get dashboard account limits information with remote API?

Discussion in 'Plugins/Modules/Addons' started by Olda, Jul 1, 2020.

  1. Olda

    Olda New Member

    Hi there,
    basically I'm trying to get info like:

    Assigned mailbox quota
    Number of email domains
    Number of mailboxes
    Number of web domains
    Number of DNS zones
    Number of Databases

    This information is normaly displayed in clients dashboard but I did not find a way how to get it from ISPConfig remote API.
    I need this info per client. We are using ISPConfig 3.1.15
    Thank you for any advice.

    Best regards, Olda
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The limits are part of the client, so you get them with the client_get(....) API call.
     
  3. Olda

    Olda New Member

    I know that I can get info about defined limits, but in dashboard I see usage of these limits and I'm not able to get info that for example client has limit of 5 DNS domains and he already use 5 of them.

    Olda
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The usage statistics are not available by api, you can just calculate them yourself by querying the domains of that user and counting the result.
     
  5. Olda

    Olda New Member

    This is solutions I wanted to go around because I already use remote API for some operation and it looks to me more cleaver to use API also for this, because after upgrade of ISPConfig I will not need to check if database structure changed. If there is no other way I will take these statistics from database directly. Thank you
     
  6. Jesse Norell

    Jesse Norell Well-Known Member

    It is not difficult to create API functions, if you're going to work out the database code anyways, you might consider wrapping that in a set of API functions and submitting them to the upstream codebase.
     

Share This Page