port389 / netbox
Netbox for PHP
v2.3.0
2023-02-15 17:18 UTC
Requires
- php: ^8.1|^8.0|^7.4|^7.3|^7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.5|^7.0
README
Note, this is a fork of the Wicked Software Corp. "Laravel NetBox" Package, original Credits go to them.
The Package was refactored to allow Installation as a standalone composer package (thus is available under the port389
namespace for this package). The package was tested against NetBox v3.2.2 while implementing NetBox in the company I'm working for in "scratch your own itch"-Mode. We mainly use the IPAM module in NetBox, other components are not heavily tested.
Installation
composer require port389/netbox-php
Environment Variables
The package requires 2 environment variables being set accessible through getenv()
Example Usage
$api = new \port389\NetBox\Api\IPAM\IpAddresses(new \port389\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'])
Supported NetBox APIs
- Circuits
- DCIM
- Cables
- ConnectedDevices
- ConsoleConnections
- ConsolePortTemplates
- ConsolePorts
- ConsoleServerPortTemplates
- ConsoleServerPorts
- DeviceBayTemplates
- DeviceBays
- DeviceRoles
- DeviceTypes
- Devices
- FrontPortTemplates
- FrontPorts
- InterfaceConnections
- InterfaceTemplates
- Interfaces
- InventoryItems
- Manufacturers
- Platforms
- PowerFeeds
- PowerOutletTemplates
- PowerOutlets
- PowerPanels
- PowerPortTemplates
- PowerPorts
- RackGroups
- RackReservations
- RackRoles
- Racks
- RearPortTemplates
- RearPorts
- Regions
- Sites
- VirtualChassis
- Extras
- IPAM
- Secrets
- Tenancy
- Users
- Virtualization