Download the PHP package ocolin/netbox without Composer

On this page you can find all versions of the php package ocolin/netbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package netbox

Netbox

What is it?

This is a small PHP client for the Netbox API REST services.


Requirements


Installation


TODO


Configuration

The client can be configured in two ways. Via environment variables, and constructor arguments.

Properties

Environment Name Argument Name Type Default Description
NETBOX_API_HOST $host string N/A Hostname of Netbox server
NETBOX_API_AUTH $auth integer 2 Authentication version 1 or 2
NETBOX_API_TOKEN $token string N/A API Auth token
NETBOX_API_KEY $key string N/A API Key for version 2 auth

Note: Version 2 authentication takes both a key and a token, while Version 1 only uses a token.

Environment Variables

Constructor arguments

The constructor takes a configuration object that allows you to add your configuration settings. These can also be used in conjunction with environment variables. Any missing parameters will be checked in the Environment.

Options

As can be seen in previous example, there is an options parameter. This allows you to specify Guzzle HTTP client settings if needed. This can be useful if you want to enable SSL verification, or HTTP timeout, etc. The client defaults to SSL verification off.

HTTP defaults

Option Default Description
timeout 20 Seconds to give HTTP attempt
verify false Verify SSL credentials

Response

The client outputs a response object with the following parameters:

Property Name Type Description
status integer HTTP status code
statusMessage string HTTP status message
headers array List of response headers
body mixed HTTP response body content

Method functions

Path interpolation

Any {tokens} found in the endpoint path will be replaced with matching keys from the $query array. Those keys are then removed from the query string automatically.

Note: Netbox requires a trailing slash on all endpoint paths. The client adds one automatically if missing.

GET

Get a resource

POST

Create a new resource

PATCH

Update a value in a resource

PUT

Update/Replace an entire resource

DELETE

Delete a resource

OPTIONS

OPTIONS returns information about an endpoint.


All versions of netbox with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
guzzlehttp/guzzle Version ^7.10
ocolin/global-type Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ocolin/netbox contains the following files

Loading the files please wait ...