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.
Thread Tools Display Modes
Old 8th July 2013, 17: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
Old 8th July 2013, 18:49
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,654 Times in 4,463 Posts

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
Old 8th July 2013, 21:18
gswartz gswartz is offline
Junior Member
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

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


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 02:54
Cannot set/change open_basedir via remote api tio289 Installation/Configuration 0 27th June 2013 00:03
haproxy with stunnel problem abubin Server Operation 6 10th April 2012 16:08
added client through remote api can't add database paddox Developers' Forum 2 27th February 2012 13:59
[Info] Remote Desktop Solutions for Linux mar.and65 Desktop Operation 0 27th April 2011 08:05

All times are GMT +2. The time now is 22:15.

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