Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th July 2013, 16:54
gswartz gswartz is offline
Junior Member
 
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default what is $primary_id in remote api?

I'm brand spankin' new to ispconfig and was asked to hook into the api to set up some dns entries for new sites that we create on our windows servers. I've been able to get the dns_cname_add and dns_zone_get methods working. But I'm not clear on the dns_cname_get method. The second parameter in the function is called $primary_id. I guessed that this was the cname I was looking up, so I tried plugging in one that I know is registered. However I was returned an empty array. I then tried sending in the same $params array that I used in the dns_cname_add but still get the same result. Does anyone have any examples of usage for the dns_cname_get method and specifically, what should I be sending in as the $primary_id? Thanks.
Reply With Quote
Sponsored Links
  #2  
Old 8th July 2013, 17:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

The primary ID Variable may either contain the primary ID of that table that you are working on. DNS Records are stored in the table dns_rr, so the primary of that table is the id column. If you want to search for a record, then you can pass a array as primary_id e.g.:

$primary_id = array('name' => 'helloworld.tld', 'type' => 'CNAME');
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 8th July 2013, 20:18
gswartz gswartz is offline
Junior Member
 
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Thank you. The parameter list was basically one of the things I tried to do but I must have had a typo somewhere because now it's working when I retried. Thanks again.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List all websites via ISPConfig remote API todx Developers' Forum 4 9th April 2014 01:54
Cannot set/change open_basedir via remote api tio289 Installation/Configuration 0 26th June 2013 23:03
haproxy with stunnel problem abubin Server Operation 6 10th April 2012 15:08
added client through remote api can't add database paddox Developers' Forum 2 27th February 2012 12:59
[Info] Remote Desktop Solutions for Linux mar.and65 Desktop Operation 0 27th April 2011 07:05


All times are GMT +2. The time now is 18:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.