-
Notifications
You must be signed in to change notification settings - Fork 3
OcStatisticsApi
This class contains all REST API calls to the /api/statistics
endpoint.
It is accessible under OpencastApi\Rest
namespace.
This endpoint is available for API Version 1.3.0 or greater, therefore, it throws an Exception upon direct class instantiation, or it won't be defined as property in OpencastApi\OpenCast
class when api version is incompatible!
- In
OpencastApi\OpenCast
as its property with OpenCast properties naming convention:
use OpencastApi\OpenCast;
$opencastApi = new OpenCast($config);
$ocStatisticsApi = $opencastApi->statisticsApi;
...
- Direct instantiation:
use OpencastApi\Rest\OcRestClient;
use OpencastApi\Rest\OcGroupsApi;
$ocRestClient = new OcRestClient($config);
$ocStatisticsApi = new OcStatisticsApi($ocRestClient);
...
Consumable functions are listed below:
Returns a list of workflow instances. More Detail
-
$params
is an optional array that could contain the following:
[
'sort' => (array) {an assiciative array for sorting e.g. ['name' => 'DESC', 'description' => '', 'role' => '']},
'limit' => (int) {the maximum number of results to return},
'offset' => (int) {the index of the first result to return},
'filter' => (array) {an assiciative array for filtering e.g. ['name' => '{Groups where the name specified in the metadata field match}']},
]
- Returns an array:
['code' => 200, 'body' => '{A (potentially empty) list of groups}']
Returns a single group. More Detail
-
$groupId
(string) the identifier of the group. -
Returns an array:
['code' => 200, 'body' => '{The group}']
Creates a group. More Detail
-
$name
(string) Group Name -
$description
(string) (optional) Group Description -
$roles
(array) (optional) list of roles -
$members
(array) (optional) list of members -
Returns an array:
['code' => 201, 'reason' => 'CREATED'] (A new group is created)
Updates a group. If any of form parameters are ommited, the respective fields of the group will not be changed. More Detail
-
$groupId
(string) group id -
$name
(string) (optional) Group Name -
$description
(string) (optional) Group Description -
$roles
(array) (optional) list of roles -
$members
(array) (optional) list of members -
Returns an array:
['code' => 201, 'reason' => 'CREATED'] (The group has been updated)
Deletes a group. More Detail
-
$groupId
(string) group id -
Returns an array:
['code' => 204, 'reason' => 'No Content'] (The group has been deleted)
Adds a member to a group. More Detail
-
$groupId
(string) group id -
$member
(string) The username of the member to be added -
Returns an array:
['code' => 204, 'reason' => 'No Content'] (The member has been added)
Removes a member from a group. More Detail
-
$groupId
(string) group id -
$memberId
(string) member id -
Returns an array:
['code' => 204, 'reason' => 'No Content'] (The member has been removed)