PHP code example of mkevenaar / netbox

1. Go to this page and download the library: Download mkevenaar/netbox library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mkevenaar / netbox example snippets


$api = new \mkevenaar\NetBox\Api\IPAM\IpAddresses(new \mkevenaar\NetBox\Client());
$result = $api->add([
    'address'  => '11.22.33.44/32',
    'dns_name' => 'foo.example.com'
]);

$result = $api->list(['address' => '11.22.33.44/32'])