4leads / php-ninox-api
HTTP REST client, simplified for PHP
v1.0.2
2021-02-08 10:11 UTC
Requires
- php: >=7.3
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2025-04-08 19:30:36 UTC
README
PHP Ninox REST-API Client/Wrapper
This libary allows you to quickly and easily perform REST actions on the Ninox backend using PHP.
Installation
Prerequisites
- PHP version ^7.4
- Ninox Account including API function
Ninox API-Docs
Install Package
Add Ninox-API to your composer.json
file. If you are not using Composer, we highly recommend it. It's an excellent way to
manage dependencies in your PHP application.
composer require 4leads/php-ninox-api
Usage
Set team_id
and/or database_id
static or dynamic
use Ninox\Ninox; $client = new Ninox("API_KEY"); //either set team_id and/or databse globally Ninox::setFixTeam("teamId"); Ninox::setFixDatabase("databseId"); $client->listTables(); //or set it on every request (overwrites global settings for this request if set) $client->listTables("databseId2","teamId2"); //or just override database id but use global teamId $client->listTables("databseId3");
On private cloud/on-premise systems
use Ninox\Ninox; $client = new Ninox("API_KEY",["host" => "yourprivate.host.com"]); //or $client = new Ninox("API_KEY",["host" => "yourprivate.host.com/TEAMID/api/v1"]); //or $client = new Ninox("API_KEY",["host" => "yourprivate.host.com"], "TEAMID");
On private-cloud/on-premise endpoints the call listTeams
is not available. It is advised to set the teamid on construct, which will be used as
global setting.
File Up-/Downloads
The library uses bare curl functions for file up-/downloads. This may lead to problems on bigger files. Consider script runtime and curl timeout on bigger files as well.