-
Notifications
You must be signed in to change notification settings - Fork 3
API Endpoints
FarbodZamani edited this page Mar 25, 2022
·
18 revisions
This page contains all class definitions related to API Endpoint knows as /api/*.
All classes under this endpoint are named using class naming convention, it means that the class name must consist of Oc[endpoit name]Api with Api at the end to define its category!
All Endpoint are accessible under OpencastApi\Rest namespace.
- In
OpencastApi\OpenCastas its property:
use OpencastApi\OpenCast;
$opencastApi = new OpenCast($config);
$ocEventsApi = $opencastApi->eventsApi;
...- Direct instantiation:
use OpencastApi\Rest\OcRestClient;
use OpencastApi\Rest\OcEventsApi;
$ocRestClient = new OcRestClient($config);
$ocEventsApi = new OcEventsApi($ocRestClient);
...- OcEventsApi
- OcSeriesApi
- OcWorkflowsApi
- OcGroupsApi
- OcStatisticsApi
- OcSecurityApi
- OcBaseApi
- OcAgentsApi
This class is responsible to perform all REST API calls to the /api/events endpoint and it consists of the following functions to consume:
Retrieves the list of events. More Detail
-
$paramsis an optional array that could contain the following:
[
'sign' => (boolean) {Whether public distribution urls should be signed.},
'withacl' => (boolean) {Whether the acl metadata should be included in the response.},
'withmetadata' => (boolean) {Whether the metadata catalogs should be included in the response. },
'withscheduling' => (boolean) {Whether the scheduling information should be included in the response. (version 1.1.0 and higher)},
'withpublications' => (boolean) {Whether the publication ids and urls should be included in the response.},
'onlyWithWriteAccess' => (boolean) {Whether only to get the events to which we have write access.},
'sort' => (array) {an assiciative array for sorting e.g. ['title' => 'DESC']},
'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. ['is_part_of' => '{series id}']},
]- On success,
Response['body']then should contain an array of events
Retrieves a list of events for specified series. More Detail
-
$seriesIdthe identifier for a series -
$paramsis an optional array that could contain the following:
[
'sign' => (boolean) {Whether public distribution urls should be signed.},
'withacl' => (boolean) {Whether the acl metadata should be included in the response.},
'withmetadata' => (boolean) {Whether the metadata catalogs should be included in the response. },
'withscheduling' => (boolean) {Whether the scheduling information should be included in the response. (version 1.1.0 and higher)},
'withpublications' => (boolean) {Whether the publication ids and urls should be included in the response.},
'onlyWithWriteAccess' => (boolean) {Whether only to get the events to which we have write access.},
'sort' => (array) {an assiciative array for sorting e.g. ['title' => 'DESC']},
'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. ['is_part_of' => '{series id}']},
]- On success,
Response['body']then should contain an array of events for that series