PHPackages                             ocolin/calix-axos-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. ocolin/calix-axos-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ocolin/calix-axos-client
========================

REST Client for Calix AXOS SMx Northbound server

v2.0.0(2mo ago)07MITPHPPHP &gt;=8.3

Since Nov 13Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/ocolin/CalixAxos)[ Packagist](https://packagist.org/packages/ocolin/calix-axos-client)[ Docs](https://github.com/ocolin/CalixAxos)[ RSS](/packages/ocolin-calix-axos-client/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (9)Versions (6)Used By (0)

Calix Axos
==========

[](#calix-axos)

What is it?
-----------

[](#what-is-it)

A lightweight HTTP REST client for Calix AXOS Northbound interface.

No worrying about HTTP and authentication. Just provide an endpoint path and the payload data.

---

Table of Contents
-----------------

[](#table-of-contents)

- [What is it?](#What-is-it)
- [Installation](#Installation)
- [Requirements](#Requirements)
- [Instantiation](#Instantiation)
    - [Using Environment variables](#Using-Environment-variables)
    - [Using Constructor arguments](#Using-Constructor-arguments)
    - [Options](#Options)
- [Response](#Response)
- [Request Methods](#Request-Methods)
    - [Parameters](#Parameters)
    - [Path replacement](#Path-Replacement)
    - [GET Method](#GET-Method)
    - [POST Method](#POST-Method)
    - [PUT Method](#PUT-Method)
    - [DELETE Method](#DELETE-Method)
    - [Request Method](#Request-Method)

---

Installation
------------

[](#installation)

```
composer require ocolin/calix-axos

```

---

Requirements
------------

[](#requirements)

- php ^8.3
- guzzlehttp/guzzle ^7.10
- ocolin/global-type ^2.0

---

Instantiation
-------------

[](#instantiation)

The client can be configured either via constructor arguments or environment parameters.

Argument NameEnvironment NameTypeDescription$hostSMX\_AXOS\_HOSTstringHostname/IP, port, and URI path$usernmaeSMX\_AXOS\_USERNAMEstringUsername of account to use$passwordSMX\_AXOS\_PASSWORDstringPassword of account to use### Using Environment variables

[](#using-environment-variables)

```
// Setting manually for demonstration
$_ENV['SMX_AXOS_HOST'] = 'https://smx.servername.com:18443/rest/v1/';
$_ENV['SMX_AXOS_USERNAME'] = 'api_user';
$_ENV['SMX_AXOS_PASSWORD'] = 'password1234';

$client = new Ocolin\CalixAxos\Client();
```

### Using Constructor arguments

[](#using-constructor-arguments)

The constructor takes a DTO called Config.

```
$client = new Ocolin\CalixAxos\Client(
    client: new Ocolin\CalixAxos\Config(
            host: 'https://smx.servername.com:18443/rest/v1/',
        username: 'api_user',
        password: 'password1234'
    )
);
```

### Options

[](#options)

The Config object can also take an options parameter for setting guzzle options such as HTTP timeout, verifying SSL, etc.

Default Options:

- timeout: 20 sec
- verify: false

```
$client = new Ocolin\CalixAxos\Client(
    client: new Ocolin\CalixAxos\Config(
        options: [
            'timeout' => 60,
            'verify'  => true
        ]
    )
);
```

---

Response
--------

[](#response)

The client will response with a data object containing the following properties:

NameTypeDescriptionstatusintegerHTTP response status codestatusMessagestringHTTP response status messageheadersarrayHTTP response headersbodyarray|objectAPI response payload---

Request Methods
---------------

[](#request-methods)

The Calix API allows four HTTP methods, each is a function on the client:

MethodFunctionDescriptionGETget()Retrieve existing resource(s)POSTpost()Create a new resourcePUTput()Modify an existing resourceDELETEdelete()Delete an existing resource### Parameters

[](#parameters)

NameTypeDescriptionendpointstringThe URI of an API endpointmethodstringThe HTTP method (only used in request())queryarray|objectBoth path and URI query parametersbodyarray|objectPayload from API server### Path Replacement

[](#path-replacement)

Any parameters in the query argument with names that match a variable token in the endpoint path name will swap those token names with their value. This allows you to past the endpoint URI as is from the docs and replace them automatically. See the GET method example below.

### GET Method

[](#get-method)

```
$response = $client->get(
    endpoint: '/config/device/{device-name}/ont',
       query: [
            'device-name' => 'OLT-NAME',
            'ont-id'      => 777
       ]
);
```

### POST Method

[](#post-method)

```
$response = $client->post(
    endpoint: '/config/device/{device-name}/ont',
       query: [ 'device-name' => 'OLT-NAME' ],
        body: [
            'ont-id'         => 777,
            'ont-reg-id'     => 777,
            'ont-type'       => 'Residential',
            'ont-profile-id' => '844G'
        ]
);
```

### PUT Method

[](#put-method)

```
$response = $client->put(
    endpoint: '/config/device/{device-name}/ont',
       query: [ 'device-name' => 'OLT-NAME' ],
        body: [
            'ont-id'         => 777,
            'ont-reg-id'     => 777,
            'ont-type'       => 'Business',
            'ont-profile-id' => '844G'
        ]
);
```

### DELETE Method

[](#delete-method)

```
$response = $client->delete(
    endpoint: '/config/device/{device-name}/ont',
       query: [
            'device-name' => 'OLT-NAME',
            'ont-id'      => 777
       ]
);
```

### Request Method

[](#request-method)

There is a request method which lets you manually specify the HTTP method to use rather than a specific method function.

```
$response = $client->request(
    endpoint: '/config/device/{device-name}/ont',
      method: 'POST',
       query: [ 'device-name' => 'OLT-NAME' ],
        body: [
            'ont-id'         => 777,
            'ont-reg-id'     => 777,
            'ont-type'       => 'Business',
            'ont-profile-id' => '844G'
        ]
);
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance73

Regular maintenance activity

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Total

5

Last Release

78d ago

Major Versions

1.3 → v2.0.02026-04-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/e97ac0aa452b872ddc3f7f4c56c83852574a27bb74622f8c054d11ca20008fc9?d=identicon)[Ocolin](/maintainers/Ocolin)

---

Top Contributors

[![ocolin](https://avatars.githubusercontent.com/u/8870196?v=4)](https://github.com/ocolin "ocolin (2 commits)")

---

Tags

httpapiclientrestGuzzleprovisioningnetworkingispsmxfibergponcalixaxos

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ocolin-calix-axos-client/health.svg)

```
[![Health](https://phpackages.com/badges/ocolin-calix-axos-client/health.svg)](https://phpackages.com/packages/ocolin-calix-axos-client)
```

###  Alternatives

[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

12262.2k1](/packages/e-moe-guzzle6-bundle)[meteocontrol/vcom-api-client

HTTP Client for meteocontrol's VCOM API - The VCOM API enables you to directly access your data on the meteocontrol platform.

188.0k1](/packages/meteocontrol-vcom-api-client)[openapi/openapi-sdk

Minimal and agnostic PHP SDK for Openapi® (https://openapi.com)

171.5k1](/packages/openapi-openapi-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
