-
Notifications
You must be signed in to change notification settings - Fork 3
OcSecurityApi
FarbodZamani edited this page Mar 25, 2022
·
1 revision
This class contains a REST API call to the /api/security
endpoint.
It is accessible under OpencastApi\Rest
namespace.
- In
OpencastApi\OpenCast
as its property with OpenCast properties naming convention:
use OpencastApi\OpenCast;
$opencastApi = new OpenCast($config);
$ocSecurityApi = $opencastApi->securityApi;
...
- Direct instantiation:
use OpencastApi\Rest\OcRestClient;
use OpencastApi\Rest\OcSecurityApi;
$ocRestClient = new OcRestClient($config);
$ocSecurityApi = new OcSecurityApi($ocRestClient);
...
Consumable functions are listed below:
Returns a signed URL that can be played back for the indicated period of time, while access is optionally restricted to the specified IP address. More Detail
-
$url
(string) The URL to be signed -
$validUntil
(string) The date and time until when the signed URL is valid (type of ISO 8602) e.g. "2018-03-11T13:23:51Z" -
$validSource
(string) The IP address from which the url can be accessed. -
Returns an array:
['code' => 200, 'body' => '{The signed URL}']