Remote API and wrong table name

Discussion in 'Developers' Forum' started by firepages, Sep 22, 2014.

  1. firepages

    firepages New Member

    Hi, just starting out using the remote API and whilst some functions work, others dont e.g.

    domains_domain_get() , wants a session_id and a 'primary id' but assuming this is the server id or a domain id or a client id makes no difference I always get no result and no error..

    looking through I see it requires domain.tform.php which holds information about the database query which references dbispconfig.domain table ... which in my dbispconfig database is an empty table ??

    dbispconfig.web_domain has domains in it as does mail_domain but these tables are not referenced in the remote api ? what am I doing wrong ?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The functions are all working fine and none of them uses a wrong table. I guess you just mix up the functions and their purpose here. The function domains_domain_get() queries the domain limits table, it is not a function to query e.g. a website or mail domain.

    To get a website, use the web_* functions and for mail use the mail_* functions.

    Regarding primare_id: The primary_id is the primary ID column of a given table in the database. you can pas as $primary_id either the ID (integer) or an array which will then be used to search the value in the table. I explianed that in several threads in the developer forum.
  3. firepages

    firepages New Member

    thankyou :)
    ...knew I was doing something wrong and somehow totally missed the site_* functions (though I did see the mail_* ones).

    for anyone else ... cos I still did not get the array() thing at first ...
    #gets all data for domain id 1
    #gets all data for all domains
    #gets all data with subdomain www

Share This Page