API Listing Functions

Discussion in 'Feature Requests' started by Steveorevo, Jul 5, 2022.

  1. Steveorevo

    Steveorevo Member

    It appears that the list of "primary ids" for databases, shells, ftp, etc. have unique ids that are needed for subsequent function calls to delete or update them. However, there lacks a method to list such IDs. These are available to web users by inspecting the HTML markup; they might be query-able via a lower level SQL query. I'd list to suggest a high-level function to query existing IDs either by server, domain, user, or combination thereof; this would allow us to better utilize the API functions for update and delete without having to resort to other means to obtain such ids.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    That's all available in the API already. All *_get functions of the API, which are also used for querying for records, return these ID's as well. Example:

    Code:
    $record = $remoteclient->mail_user_get($session_id, ['email => '[email protected]']);
    or to get all mail accounts of the system:

    Code:
    $record = $remoteclient->mail_user_get($session_id, -1);
     
  3. Steveorevo

    Steveorevo Member

    Excellent. Thanks for the clarification Till.
     

Share This Page