Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Introduction

A simple PHP client for leveraging the pfsense_fauxapi. See pfsense_fauxapi for available methods. Review Client.php if further details are needed.

Sample

<?php

require_once('vendor/autoload.php');

$options = [
    'uri' => 'http(s)://host[:port]',
    'apiKey' => 'PFFA...',
    'apiSecret' => '<secret>',
];

$client = new PfSenseFauxApi\Client($options);
$response = $client->config_get();
var_dump($response);

$response = $client->config_backup_list();
var_dump($response);

//$response = $client->config_reload();
//var_dump($response);

//$response = $client->gateway_status();
//var_dump($response);

//$response = $client->rule_get();
//var_dump($response);


/*
$data  [
  "system" => [
    "dnsserver" => [
      "8.8.8.8",
      "8.8.4.4"
    ],
    "hostname" => "newhostname"
  ]
];

$response = $client->config_patch($data);
var_dump($response);

$data = [
    'function' => 'openbgpd_install_conf'
];
$response = $client->function_call($data);
var_dump($response);

*/

?>

About

pfSense PHP API client

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages