dns api call
Hello ,
can anyone help me out in designate api call , i am following the documentation "https://designate.readthedocs.org/en/latest/rest/v1/domains.html#create-domain"
Here is my code
$url = "mywebsite.com";
$tokenid = "12313wqw121212121";
$url_send='http://'.$url.':9001/v2/domains';
$header1= "X-Auth-Token:".$tokenid;
$header2 = "Host: $url";
$header3 = "Accept: application/json";
$header4 = "Content-Type: application/json";
$post='{
"name": "domain1.com",
"ttl": 3600,
"email": "test@gmail.com"
}';
$curl = curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_URL, $url_send);
curl_setopt($curl, CURLOPT_HTTPHEADER,array($header1,$header2,$header3,$header4));
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($curl);
curl_close($curl);
The result i am getting here is "Authentication required " . Here i am passing the token-id for authentication bt still its throwing the Authentication error .Can anyone please suggest me where i am going wrong .
Regards , Lokesh.S
Can you successfully use the same token to make a request against another openstack service? Does designate provide any additional information in its server logs?