PHP code example of 4leads / php-ninox-api

1. Go to this page and download the library: Download 4leads/php-ninox-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

4leads / php-ninox-api example snippets


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");

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");