diff options
Diffstat (limited to 'php-client/example.php')
-rw-r--r-- | php-client/example.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/php-client/example.php b/php-client/example.php index 74ea511..9d3eb9e 100644 --- a/php-client/example.php +++ b/php-client/example.php @@ -14,12 +14,17 @@ require("class.phpipam-api.php"); # init object with settings from $API = new phpipam_api_client ($api_url, $api_app_id, $api_key, $api_username, $api_password, $result_format); # debug - only to debug curl -$API->set_debug (false); +$API->set_debug (true); # execute - result is stored to $API->result, save it to own array if multiple calls needed after execute -$API->execute ("GET", "sections", array(5), array(), $token_file); + +$API->execute ("POST", "addresses", array("first_free", "7"), array(), $token_file); + + +// $API->execute ("DELETE", "subnets", array(7, "permissions"), array(), $token_file); +// $API->execute ("POST", "vrf", array(), array("number"=>"114","name"=>"API"), $token_file); # ger result $result = $API->get_result(); # print result -print_r($result); -?>
\ No newline at end of file +print_r(json_decode($result, true)); +?> |