You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have just recently started using the php-api client and am trying to get upto speed with how to use it. I am having trouble assigning the next free IP address in a subnet along with properties and values, ie.. hostname, owner, tag, etc..
The call I am executing is as follows : $API->execute ("POST", "addresses", array("first_free", 3), array("hostname"=>"api.client.hostname", "description"=>"created by API client" , "owner"=>"API_Client", "tag"=>3), $token_file);
From my understanding of the client, this is how it should be accomplished, however, I am returned the error which clearly indicates I am wrong 😆 Array ( [code] => 400 [success] => 0 [message] => Invalid request key id3 [time] => 0.025 )
Just looking for some help as to what I am doing wrong?
Any help would be appreciated.
Cheers!
The text was updated successfully, but these errors were encountered:
Cheers for the update.
I actually found the issue and it turned out to be an issue with the POST functionality of the client itself.
The curl_set_params function wasn't properly pushing the params to the server for POST requests.
Once I updated the function to use CURLOPT_POSTFIELDS in cases of POST, then it worked no bother.
Hi,
I have just recently started using the php-api client and am trying to get upto speed with how to use it. I am having trouble assigning the next free IP address in a subnet along with properties and values, ie.. hostname, owner, tag, etc..
The call I am executing is as follows :
$API->execute ("POST", "addresses", array("first_free", 3), array("hostname"=>"api.client.hostname", "description"=>"created by API client" , "owner"=>"API_Client", "tag"=>3), $token_file);
From my understanding of the client, this is how it should be accomplished, however, I am returned the error which clearly indicates I am wrong 😆
Array ( [code] => 400 [success] => 0 [message] => Invalid request key id3 [time] => 0.025 )
Just looking for some help as to what I am doing wrong?
Any help would be appreciated.
Cheers!
The text was updated successfully, but these errors were encountered: