Hey Mike,
It looks like you are not sending the nameservers array properly. The
API document specifies that nameserver_list is an array of nameserver
triplets. You are sending just one associative array (hash) in the place
of what should be an array of hashes.
It looks like you're using PHP, so I'll write in PHP. You are probably
doing:
'nameserver_list' => array(
'name' => 'ns2.domaindirect.com'
'action' => 'add'
),
when the API documentation states you should be doing:
'nameserver_list' => array(
array(
'name' => 'ns2.domaindirect.com'
'action' => 'add'
),
),
This is because "nameserver_list" can contain more than one nameserver:
'nameserver_list' => array(
array(
'name' => 'ns1.domaindirect.com'
'action' => 'add'
),
array(
'name' => 'ns2.domaindirect.com'
'action' => 'add'
),
),
Mike wrote:
> Hi,
>
> I'm receiving a 400: Fatal Server Error Occured when trying to add a
> name server to a domain on the test system via the API.
>
> I can update and remove name servers fine- I only get the error when
> adding one.
>
> I went through the archives and saw a few other related messages, but
> didn't see any solutions- maybe I missed them.
>
> I'm passing the command as:
>
> Array
> (
> [action] => modify
> [object] => domain
> [cookie] => 659305612:391169
> [attributes] => Array
> (
> [data] => nameserver_list
> [nameserver_list] => Array
> (
> [name] => ns2.domaindirect.com
> [action] => add
> )
> )
>
> [registrant_ip] => 10.0.1.2
> [protocol] => XCP
> )
>
> as far as I can tell from the documentation, that's correct.
>
> Any help would be appreciated.
>
> On a side note- "Occurred" (in the error message) has two r's :)
>
> Cheers,
>
> Mike Pultz
> mike@mrhost.ca
-- Jason Slaughter Systems Engineer, Tucows Inc. Freephone: 00.800.371.69922x1386 Toll-Free: 1.800.371.6992x1386 Local: 416.535.0123x1386 jslaughter@tucows.com
This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:37:50 EDT