Skip to content

OcBaseApi

FarbodZamani edited this page Mar 25, 2022 · 1 revision

This class contains all REST API call to the /api, /api/info and /api/version endpoints.

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;
$opencastApi = new OpenCast($config);
$ccBaseApi = $opencastApi->baseApi;
...
  1. Direct instantiation:
use OpencastApi\Rest\OcRestClient;
use OpencastApi\Rest\OcBaseApi;
$ocRestClient = new OcRestClient($config);
$ccBaseApi = new OcBaseApi($ocRestClient);
...

Functions

Consumable functions are listed below:

get()

Returns key characteristics of the API such as the server name and the default version. More Detail

  • Returns an array: ['code' => 200, 'body' => '{The api information is returned.}']

getUserInfo()

Returns information on the logged in user. More Detail

  • Returns an array: ['code' => 200, 'body' => '{The api user information is returned.}']

getUserRole()

Returns current user's roles. More Detail

  • Returns an array: ['code' => 200, 'body' => '{The set of roles is returned. }']

getOrg()

Returns the current organization. More Detail

  • Returns an array: ['code' => 200, 'body' => '{TThe organization details are returned.}']

getOrgProps()

Returns the current organization's properties. More Detail

  • Returns an array: ['code' => 200, 'body' => '{The organization properties are returned.}']

getOrgEngageUIUrl()

Returns the engage ui url property. More Detail

  • Returns an array: ['code' => 200, 'body' => '{The engage ui url is returned.}']

getVersion()

Returns a list of available version as well as the default version. More Detail

  • Returns an array: ['code' => 200, 'body' => '{The version list is returned}']

getDefaultVersion()

Returns the default version. More Detail

  • Returns an array: ['code' => 200, 'body' => '{The default version is returned}']
Clone this wiki locally