First time here? Check out the FAQ!
2017-08-02 21:13:03 -0600 | received badge | ● Famous Question (source) |
2014-11-27 06:52:51 -0600 | received badge | ● Famous Question (source) |
2014-11-27 06:52:51 -0600 | received badge | ● Notable Question (source) |
2014-11-27 06:52:51 -0600 | received badge | ● Popular Question (source) |
2014-09-17 06:43:40 -0600 | received badge | ● Notable Question (source) |
2014-07-03 05:16:03 -0600 | received badge | ● Taxonomist |
2014-06-13 22:44:23 -0600 | received badge | ● Famous Question (source) |
2014-06-13 22:44:23 -0600 | received badge | ● Notable Question (source) |
2014-02-19 06:52:57 -0600 | received badge | ● Popular Question (source) |
2013-12-16 06:15:44 -0600 | received badge | ● Popular Question (source) |
2013-12-06 00:21:52 -0600 | answered a question | error while connecting from API Hi, Now issue resolved. |
2013-12-04 03:33:23 -0600 | asked a question | error while connecting from API Hi I'm using curl command in php to connect horizon. you can check the error with given link. http://znetrocks.com/admin/test/openstack/open_stack_2.php and the code is given below.
$request = ' <auth xmlns="http://103.247.97.1:5000/v2.0/tokens" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <passwordcredentials password="xyz" username="xyz"> </passwordcredentials></auth>'; // Create Headers //$header[] = "Host: http://103.247.97.1:5000/v2.0/tokens%22 (http://103.247.97.1:5000/v2.0/tokens") ; $header[] = "Content-type: text/xml"; //$header[] = "Content-length: ".strlen($request) . "\r\n"; $header[] = $request; // Send using CURL $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, "http://103.247.97.1:5000/v2.0/tokens"); // URL to post curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); // return into a variable curl_setopt( $ch, CURLOPT_HTTPHEADER, $header ); // headers from above curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$request); $result = curl_exec( $ch ); // runs the post print_r($result); curl_close($ch); ?> |
2013-12-01 23:40:42 -0600 | commented answer | Resource id #2 Hi dheeru, Please update me and if possible provide me your email id. Thanks Harish |
2013-11-29 05:27:20 -0600 | answered a question | Resource id #2 Hi Dheeru deeptanshu will coordinate with your for your require details. Meanwhile i'm sending you script detail which i'm using for connection.
/**
function curlInit($login, $password,$host) { $curl = curl_init(); } /**
function sendRequest($curl, $packet) { } function checkResponse(SimpleXMLElement $response) { } ////*******************************/////// $packet='tenantId=32c4101bce274e0ea49180d387a2f907'; $host = 'http://103.247.97.1:5000/v2.0'; $password = 'znet@123'; $login = 'admin'; $curl = curlInit($host, $login, $password); try { print_r($response); } catch (ApiRequestException $e) { print_r($e); } ?> Please check and update me. Thanks Harish |
2013-11-27 04:21:44 -0600 | received badge | ● Editor (source) |
2013-11-27 04:17:40 -0600 | asked a question | Resource id #2 Hi I'm getting error while connecting horizen with API. Resource id #2 ApiRequestException Object ( [message:protected] => Failed to connect to 0.0.0.123: Invalid argument [string:Exception:private] => [code:protected] => 7 [file:protected] => /home/racknapz/public_html/admin/test/openstack/plesk.php [line:protected] => 104 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/racknapz/public_html/admin/test/openstack/openstack.php [line] => 23 [function] => sendRequest [args] => Array ( [0] => Resource id #2 [1] => tenantId=32c4101bce274e0ea49180d387a2f907 ) ) ) [previous:Exception:private] => ) For your reference I'm sending you link : https://manage.znetlive.com/admin/test/openstack/openstack.php Please help me. Thanks Harish |
2013-11-25 05:37:08 -0600 | asked a question | Curl to request to get tokens returns Unauthorized error Hi I'm trying below given API to connect horizon. curl -k -X 'POST' -v http://103.247.97.1:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "xyz", "password":"abc"}, "tenantId":"1"}}' -H 'Content-type: application/json' but getting error :
Please help me out. Thanks Harish |