fairway / netx-fal-api
Client library for netx APIs.
Package info
github.com/ecentral/netx-fal-api
Type:typo3-cms-extension
pkg:composer/fairway/netx-fal-api
1.0.0
2026-09-01 11:23 UTC
Requires
- php: ^8.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.2
- rector/rector: ^2.5
- saschaegerer/phpstan-typo3: ^3.0
- ssch/typo3-rector: ^3.15
- typo3/coding-standards: ^0.9
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-16 08:55:59 UTC
README
PHP SDK for the NetX JSON-RPC API. Includes services for Assets, Folders, Collections, Attributes, Search, Versions, Views, Misc, and File Import.
https://developer.netx.net/#postman
Installation
composer require fairway/netx-fal-api
Getting Started
use Fairway\NetXFalApi\Client; $client = new Client('https://your-netx-host', 'YOUR_API_TOKEN');
Examples
Assets
// Fetch assets $assets = $client->assets->getAssets([17901, 17902]); foreach ($assets as $asset) { echo $asset->id . ': ' . $asset->name . PHP_EOL; } // Update an asset $updated = $client->assets->updateAsset(17901, ['name' => 'New Name']); echo "Updated: " . $updated->name . PHP_EOL; // Delete an asset $client->assets->deleteAsset(17902);
Folders
// Create a new folder $newFolder = $client->folders->createFolder('My Uploads'); // List root folders $roots = $client->folders->getRootFolders(); foreach ($roots as $folder) { echo $folder->id . ': ' . $folder->name . PHP_EOL; }
Collections
// Create a new collection $collection = $client->collections->createCollection('My Collection', 'Description'); // Fetch collection by ID $found = $client->collections->getCollectionById($collection->id); echo $found->name . PHP_EOL; // Add an asset to the collection $client->collections->addAssetToCollection($collection->id, 17901);
Attributes
// Fetch all attributes $attributes = $client->attributes->getAttributes(); foreach ($attributes as $attr) { echo $attr->id . ': ' . $attr->label . PHP_EOL; }
Search
// Search for assets $results = $client->search->searchAssets('demo'); foreach ($results as $asset) { echo $asset->id . ': ' . $asset->name . PHP_EOL; }
Versions
// Get versions of an asset $versions = $client->versions->getVersionsByAsset(17901); foreach ($versions as $version) { echo 'Version ' . $version->versionNumber . ' of ' . $version->fileName . PHP_EOL; }
Views
// Get views for an asset $views = $client->views->getViewsByAsset(17901); foreach ($views as $view) { echo $view->type . ' → ' . $view->url . PHP_EOL; }
Misc
// Get API version echo "API Version: " . $client->misc->getVersion() . PHP_EOL; // Get storage locations $locations = $client->misc->getLocations(); foreach ($locations as $loc) { echo $loc->id . ': ' . $loc->name . PHP_EOL; }
File Import
// Upload a new asset $newAsset = $client->fileImport->importAsset('/path/to/file.jpg', 1234); echo "Asset created with ID " . $newAsset->id . PHP_EOL; // Upload a new version for an asset $updated = $client->fileImport->versionAsset($newAsset->id, '/path/to/newfile.jpg'); echo "New version created for asset " . $updated->id . PHP_EOL;