Skip to content

OcSysinfo

FarbodZamani edited this page Jun 22, 2022 · 1 revision

This class contains /bundle/version REST API call to the /sysinfo endpoint.

Namespace

It is accessible under OpencastApi\Rest namespace.

How to use

  1. In OpencastApi\OpenCast as its property with OpenCast properties naming convention:
use OpencastApi\OpenCast;
// Single Node Opencast...
$opencastApi = new OpenCast($config);
$ocSysinfo = $opencastApi->sysinfo;
...

EXTRA: If you are using a dual node Opencast (one for admin and the other one for engage node including presentation/search), you might have to pass an extra parameter called $engageConfig to the OpencastApi\OpenCast when creating the instance like following:

use OpencastApi\OpenCast;
// Dual node Opencast
$config = [/*the config for admin node*/];
$engageConfig = [/*the config for engage node*/];

$opencastApi = new OpenCast($config, $engageConfig);
$ocSysinfo = $opencastApi->sysinfo;
...
  1. Direct instantiation:
use OpencastApi\Rest\OcRestClient;
use OpencastApi\Rest\OcSearch;
$engageConfig = [/*the config for engage node*/];
$ocRestClient = new OcRestClient($engageConfig);
$ocSysinfo = new OcSysinfo($ocRestClient);
...

Functions

Consumable functions are liested below:

getVersion($prefix = '')

Return the common OSGi build version and build number of all bundles matching the given prefix. More Detail

  • $prefix (string) (optional) The bundle name prefixes to check. Defaults to 'opencast'.

  • Returns an array: ['code' => 200, 'body' => '{An object of version structure}'] }']`

Clone this wiki locally