Signed URL
You can manage Signed URLs using the OvenStudio LLHLS API. Below, you will find descriptions of the parameters that can be configured when using the API to generate a Signed URL
API Request
Calling the Signed URL API
POST
{{OS_HOST}}/v1/apis/aws/cf/signedUrl
After integrating with AWS CloudFront, this API allows you to adjust detailed options when using Signed URLs in OvenStudio LLHLS.
Headers
Name | Type | Description |
---|---|---|
"Authorization"* | String | "Bearer {ACCESS_TOKEN}" |
Request Body
Name | Type | Description |
---|---|---|
"stream_name"* | String | "{STREAM_NAME}" |
"date_less_than"* | ISO8601 | "yyyy-mm-ddThh:mm:ssZ" |
"date_greater_than" | ISO8601 | "yyyy-mm-ddThh:mm:ssZ" |
Header Parameters
Parameters | Role |
---|---|
"Authorization" | Enter your Access Token issued by OvenStudio LLHLS. |
Body Parameters
Parameters | Role |
---|---|
"stream_name" | Enter the name of the Streaming box for which you want to generate the Signed URL. |
"date_less_than" | The generated Signed URL is in ISO8601 format and is only valid until the specified date and time. It must be entered. |
"date_grater_than" | The generated Signed URL is in ISO8601 format and is valid starting from the specified date and time. |
It's important to note that the maximum period you can specify for these parameters is until January 19, 2038, 03:14:07 UTC (2038-01-19T03:14:07Z).
Responses
200: OK
All configurations match, and you have successfully generated the Signed URL. The pattern of the issued Signed URL is as follows: https://<DOMAIN>/<PATH>/playlist.m3u8?<AUTH>
400: Bad Request
Message | Reason |
---|---|
The plain HTTP request was sent to the HTTPS port | Your API request is configured by default to use HTTP. Please check the {{OS_HOST}} address. If you are making an HTTP request, include <PUBLIC_IP>:<PORT>, and if you prefer an HTTPS request, add https:// before the <DOMAIN>:<PORT>. |
AWS Signed URL is not enabled. Please enable it in OvenStudio Console > Settings > AWS CloudFront | The Signed URL feature in OvenStudio LLHLS settings is currently disabled. Connect to your OvenStudio LLHLS, navigate to [Settings] - [AWS CloudFront], and enable the [Signed URL] feature. Alternatively, confirm that it is correctly integrated with AWS CloudFront. |
Invalid value: stream_name | It's necessary to provide a value for the "stream_name" parameter. Please check the details in the Body. |
Invalid value: date_less_than | The "date_less_than" parameter is required. Kindly examine the information in the Body. |
date_less_than must be in the future | Check the time entered in "date_less_than". It cannot be set in the past relative to today because this parameter makes the Sigend URL valid until the specified date and time. |
Invalid JSON value: Unexpected character: <REASON> | Ensure that there are no missing characters (Curly braces, Quotes, Commas, etc.) in the content entered in the Body. |
Examples
If you wish to create a Signed URL for a Streaming box named 'OvenStudio' and want the URL to be valid until January 1, 2024, 00:00:00 UTC, please refer to the example below:
"date_less_than" is a directive that restricts the URL's validity until the specified time. Applying it as in the example will ensure that the URL cannot be accessed after January 1, 2024, 00:00:00 UTC.
Now, let's consider another scenario. If you want to generate a Signed URL for a Streaming box named 'OvenStudio_Xmas' and have it valid only from 00:00:00 on December 24, 2023, to 00:00:00 on December 26, 2023 (UTC), you can follow the example below:
"date_greater_than" is a directive that defines the URL's validity starting from the specified time. When used as in the example, the URL can be accessed from December 24, 2023, 00:00:00 UTC onwards.
While you can configure this functionality through [Settings] - [AWS CloudFront] - [Signed URL] (See the Signed URL with AWS CloudFront), you also have the option to make more detailed settings using the API.