Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NscaleApi

NscaleApi is a lightweight PHP-based interface for interacting with the Nscale Document Management System (DMS) via its REST API.
This project provides a clean and structured way to communicate with the Nscale-REST-API from within your PHP applications, without any external dependencies or frameworks.

Features

  • Connects to the Nscale DMS via REST
  • Provides reusable factories and entities for easier data processing
  • Simple usage through PHP functions
  • Designed for seamless integration into existing PHP applications

Requirements

  • PHP 7.4 or higher
  • REST access to a running Nscale DMS instance

Installation

No package manager or composer setup is required.
Simply drag and drop the source files into your PHP project.

/path-to-your-project/
├── nscale-api/
│   ├── NscaleApi.php
│   ├── Factories/
│   └── Entities/

Usage example

$nscale              = new NscaleAPI( ['username' => $userName, 'password' => $password] );
$nscaleEntityManager = new EntityFactoryManager( $nscale );
$serviceContainer    = new EntityServiceContainer( $nscale );
$nscaleFolderFactory = new FolderFactory( $serviceContainer );

$masterFolder = $nscaleFolderFactory->getFolderById( 1234567 );

$query            = "NQL query string";
$searchResults    = $masterFolder->search( $query );
$resultsToObjects = $nscaleEntityManager->createEntities( $searchResults );

foreach ( $resultsToObjects->toArray() as $object ) {
  // ... do something
  // $object can be a Folder- or Document-Object
}

The library also includes various entities and factory classes to help with structured parsing and further processing of the API responses.

Notes

  • No API keys or tokens required (unless your nscale instance is configured to do so)
  • You are expected to handle authentication based on how your DMS is configured (e.g. HTTP Basic Auth, session cookies, etc.)

Feel free to fork, use, and adapt this code to your needs. This is a standalone helper library meant for developers working with the Nscale DMS ecosystem.

About

NscaleApi is a lightweight PHP-based interface for interacting with the Nscale Document Management System (DMS) via its REST API. This project provides a clean and structured way to communicate with the Nscale-REST-API from within your PHP applications, without any external dependencies or frameworks.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages