API Usage – 5G Video Enablement

Prerequisites

Prior to interacting with any of the Alef APIs for the Video Enablement Product, the developer must have completed the following:

  • Creation of an Alef Developer Portal Account
  • Subscription to the Alef Video Enablement Product
  • Configuration of the Alef Video Enablement Product

If there is any confusion as to how to complete these tasks. Please refer to the following document for instruction, https://developer.alefedge.com/get-started/create-edge-native-services/user-guide/ . If these three things have been completed, interaction with Alef Video Enablement APIs can begin.

Swagger Documentation UI Execution

For greater understanding and simple interaction with the Alef Video Enablement APIs, there is Swagger Documentation available. In addition to the simple execution of Alef Video Enablement APIs, the Swagger documentation provides greater insight into the parameters, request bodies, and expected responses. This section will give greater insight into the parameters of these APIs.

When executing the Video Enablement APIs from the Swagger UI, the first step in executing any API is clicking the “Try it out” button in the top right of the specific API drop-down you are testing, there is an image below for reference. The second step in the process would be filling in the parameters provided. The third step will be updating the request body, if necessary. The final step is clicking the blue “Execute” button just above the “Responses” section. After that, you have successfully used your first Alef Video Enablement API from the Swagger UI.

If there are any issues with this or other workflows discussed in this document, please reach out to support@alefedge.com.

Add Content to Server API

The Add Content to Server API takes existing content that can be played from the cloud and moves it to the specific Edge Site where the user has a Subscription. This will eventually allow the user to play that same cloud content from the Edge.

The Parameters of the Add Content to Server API:

  • API Key – This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • Partner Name – This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.

After adding the parameters to the designated fields, the request body will need to be updated before the API can be executed. Both the “url” and “partner_cloud_url” will need to be updated to the URL where Alef can download the content to be deployed at an Edge Location. Both of these fields will reflect the same URL. Please also note the “publish_access” field is defaulted to private. If the content that is being onboarded is required to be public, please change the value of “publish_access” to “public”.

Expected Responses are presented on the Swagger interface. When the user receives a 200 response, they have properly interacted with the API Endpoint.

Get all Content details for the Given Partner

The Get All Content Details API returns a list of all content that has been added to the Edge Site relevant to a specific subscription service. Within each item of the list a “content_url” which is the URL to leverage when playing content in an Edge Environment (i.e. the Developer Sandbox Container).

The Parameters of the Add Content to Server API:

  • API Key – This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • Partner Name – This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.

After adding the required parameters, there is no additional input required. Simply click the blue execute button on the bottom of the page. Expected Responses are presented on the Swagger interface. When the user receives a 200 response, they have properly interacted with the API Endpoint.

Get URL for the given Content ID

The Get URL for Given Content API returns the URL from which the specific onboard content can be played from the Edge.

The Parameters of the Add Content to Server API:

  • API Key – This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • Partner Name – This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • Content_ID – This piece of information is provided in the response of the “Get All” API. When taking this information ensure you are taking “content_id” and NOT the “id” value.

After adding the required parameters, there is no additional input required. Simply click the blue execute button on the bottom of the page. Expected Responses are presented on the Swagger interface. When the user receives a 200 response, they have properly interacted with the API Endpoint.

Get All App Keys

The Get All App Keys API returns App Keys relevant to the subscription being utilized. These are important as it is a parameter to the Get Signed URL API which allows the playing of Private Content from the Edge.

The Parameters of the Add Content to Server API:

  • API Key – This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • Partner Name – This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • Content_ID – This piece of information is provided in the response of the “Get All” API. When taking this information ensure you are taking “content_id” and NOT the “id” value.

After adding the required parameters, there is no additional input required. Simply click the blue execute button on the bottom of the page. Expected Responses are presented on the Swagger interface. When the user receives a 200 response, they have properly interacted with the API Endpoint.

Request Signed URL

The Request Signed URL API returns a Signed URL in which Private Content can be played from the Edge. Without the Signed URL, private content will not be able to be played within an Edge Environment.

The Parameters of the Add Content to Server API:

  • API Key – This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • App Key – This piece of information is provided to the Developer only through the response of the Get App Key API. If there are any questions on how to do this, please refer to section Get App Key or Get App Key API.
  • Expiry Time – This piece of information is provided by the Developer. It is the duration in which the Signed URL will be active, the time entered is in seconds. There is no maximum value for this parameter.
  • Content – This piece of information is provided to the Developer in the output of Get All Content Details or Get Specific Content. This will be the URL in which the content can be played from the Edge.
  • Allow Signed Cookie – This piece of information is up the Developer’s preference. Indicate whether your what Signed Cookies enabled by entering “true” otherwise enter “false”.
  • Partner Name – This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.

After adding the required parameters, there is no additional input required. Simply click the blue execute button on the bottom of the page. Expected Responses are presented on the Swagger interface. When the user receives a 200 response, they have properly interacted with the API Endpoint.

Get Whitelisted Domain for Specific Partner

The Get Whitelisted Domain for Specific Partner API returns a list of all the Whitelisted Domains that a developer has added for a specific subscription. If there is ever an error in playing of content, this could be used as a check to ensure the proper whitelist domain has been uploaded for that content.

The Parameters of the Add Content to Server API:

  • API Key – This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • Partner Name – This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.

After adding the required parameters, there is no additional input required. Simply click the blue execute button on the bottom of the page. Expected Responses are presented on the Swagger interface. When the user receives a 200 response, they have properly interacted with the API Endpoint.

Add New Whitelist Domain

The Add Whitelisted Domain API enables the Developer to provide additional access to content such that it can be on-boarded onto EdgeNet.

The Parameters of the Add Content to Server API:

  • API Key – This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • Partner Name – This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.

After adding the required parameters, the developer will have to enter their specific whitelist domain they would like accessed for content onboarding. Please note the URL should not include the last slash. For example, https://google.com/ is not valid, it would be https://google.com. Currently, we are providing a default whitelist URL that will be accepted. Expected Responses are presented on the Swagger interface. When the user receives a 200 response, they have properly interacted with the API Endpoint.

Delete given Whitelist Domain

The Delete given Whitelist Domain API enables the Developer to remove access to specific content that was previously hosted on the Edge. This video collateral could not be required for a variety of reasons. Deleting a given whitelist will be an initial step in removing content associated with the respective Edge Sites. The deletion of content is not yet supported and will be released when available.

The Parameters of the Add Content to Server API:

  • API Key – This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • Partner Name – This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.

After adding the required parameters, the specific whitelisted domain to be deleted will have to be entered into the request body. If you used the default value from the Add Whitelist Domain API, feel free to copy and paste the same URL into this Request Body to delete it. Expected Responses are presented on the Swagger interface. When the user receives a 200 response, they have properly interacted with the API Endpoint.

Developer Curl Script Execution

The following sections of this document will describe interaction with Alef Video Enablement API endpoints leveraging the Developer API Curl Scripts across three main areas. The first area is the onboarding of Public Content, the second is the onboarding of private content and the third is additional supporting APIs.

All of these APIs and how to use them through the Swagger User Interface has been explained in section Swagger Documentation UI Execution. This section will explain how to leverage the Developer Curl Scripts to interact with the Alef APIs. If you have not yet seen the Developer Curl Script document, the URL to the document is: https://developer.alefedge.com/reference-docs/apis-sdks/developer-api-curl-scripts/5g-video-enablement/

Onboard Public Content Workflow

The following workflow permits a Developer to take Cloud-Native video content and onboard it to the Edge. Once the Developer has onboard the video content to the Edge it will be available to be played from an Edge Environment without any specific credentials.

Onboard Public Content

Successfully executing the Onboard Public Content Curl request will be the first step in the workflow to onboard public content. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute

  • Domain – In the top line of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a placeholder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • URL & Partner Cloud URL – Within the “urlList” section of the Developer Curl Script there are two fields, “url” and “partner_cloud_url”, that needed to be updated. These two fields should have the same URL, the URL is where Alef can download the content to be deployed at an Edge Location.

Request

curl --location --request POST 'https://<domain>/api/v1/stream-tech/content/add?partner_name=60390bec12b7390008c66b0f' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
  "urlList": [
      {
          "url": "https://example.com/test/myencoding.m3u8",
          "content_access": "public",
          "publish_access": "public",
          "partner_cloud_url": "https://example.com/test/myencoding.m3u8"
      }
  ]
}
'

Included below is the sample successful response when interacting with the Onboard Public Developer Curl Script.

Response

[
   {
       "message": "Content onboarding is in progress",
       "status": "INPROGRESS",
       "url": "https://example.com/test/myencoding.m3u8",
       "content_id": "beg"
   }
]

Get All Content API

After properly Onboarding Public Content to the Edge the next step will be to obtain the URL in which the content can be played from the Edge. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the top line of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.

Request

curl --location --request GET 'https://<domain>/api/v1/stream-tech/content/get-all?partner_name=60390bec12b7390008c66b0f' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX' \
--data-raw ''

Included below is the sample successful response when interacting with the Get All Content Curl Script. When Obtaining the Public Content URL, please look through the response to ensure it has the proper information as the response will contain information for all of the content that has been onboarded for the specific subscription. If you have only uploaded one piece of content to this point, then only one will be present.

Response

[
   {
       "id": 13446,
       "partner_name": "60390bec12b7390008c66b0f",
       "content_id": "bdz",
       "content_url": "https://<domain>/v1/content?url=00c104e612cb7f461e6446d77125a0ed3f839048474bf9305700914f865d122d3f70ba890c64544ea6d97a9261d08cbbcbc3e9088bbe821cca92960b9901a9d7",
       "partner_content_url": "https://example.com/test/raw.mp4",
       "partner_cloud_url": "https://example.com/test",
       "createdAt": "2021-02-26T15:19:03.000Z",
       "updatedAt": "2021-02-26T15:41:12.000Z",
       "content_upload_status": "success",
       "content_access": "public",
       "publish_access": "private",
       "content_status_message": "Partner Content on-boarded Successfully",
       "partner_content_file_name": "main.mp4",
       "content_size": 1533202
   }
   ]

Onboard Private Content Workflow

Onboard Private Content API

Successfully executing the Onboard Private Content Curl request will be the first step in the workflow to onboard private content. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the topline of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • URL & Partner Cloud URL – Within the “urlList” section of the Developer Curl Script there are two fields, “url” and “partner_cloud_url”, that needed to be updated. These two fields should have the same URL, the URL is where Alef can download the content to be deployed at an Edge Location.

Included below is the sample successful response when interacting with the Onboard Private Developer Curl Script.

 

Request

curl --location --request POST 'https://<domain>/api/v1/stream-tech/content/add?partner_name=60390bec12b7390008c66b0f' \
--header 'Content-Type: application/json' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX' \
--data-raw '{
   "urlList": [
       {
           "url": "https://example.com/test/myencoding.m3u8",
           "content_access": "public",
           "publish_access": "private",
           "partner_cloud_url": "https://example.com/test/myencoding.m3u8"
       }
   ]
}'

Included below is the sample successful response when interacting with the Onboard Private Developer Curl Script.

 

Response

[
   {
       "message": "Content onboarding is in progress",
       "status": "INPROGRESS",
       "url": "https://example.com/test/myencoding.m3u8",
       "content_id": "bef"
   }
]

Get All Content API

After properly Onboarding Private Content to the Edge the next step will be to obtain the URL in which the content can be played from the Edge. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the topline of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.

Included below is the sample successful response when interacting with the Get All Content Curl Script. When obtaining the Private Content URL, please look through the response to ensure it has the proper information as the response will contain information for all of the content that has been onboarded for the specific subscription. If you have only uploaded one piece of content to this point, then only one will be present.

Request

curl --location --request GET 'https://<domain>/api/v1/stream-tech/content/get-all?partner_name=60390bec12b7390008c66b0f' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'

Included below is the sample successful response when interacting with the Get All Content Curl Script. When obtaining the Private Content URL, please look through the response to ensure it has the proper information as the response will contain information for all of the content that has been onboarded for the specific subscription. If you have only uploaded one piece of content to this point, then only one will be present.

Response

[
    {
        "id": 13446,
        "partner_name": "60390bec12b7390008c66b0f",
        "content_id": "bdz",
        "content_url": "https://env.alefedge.com/v1/content?url=00c104e612cb7f461e6446d77125a0ed3f839048474bf9305700914f865d122d3f70ba890c64544ea6d97a9261d08cbbcbc3e9088bbe821cca92960b9901a9d7",
        "partner_content_url": "https://example.com/test/myencoding.m3u8",
        "partner_cloud_url": "https://example.com/test/myencoding.m3u8",
        "createdAt": "2021-02-26T15:19:03.000Z",
        "updatedAt": "2021-02-26T15:41:12.000Z",
        "content_upload_status": "success",
        "content_access": "public",
        "publish_access": "private",
        "content_status_message": "Partner Content on-boarded Successfully",
        "partner_content_file_name": "main.m3u8",
        "content_size": 1533202
    }]

Get URL by Content ID API

As opposed to receiving the aggregate list of content that has been onboarded, specific content URLs can be obtained leveraging this API. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the topline of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Content ID – Further to the right in the same line as the domain there is a place holder for content ID. This piece of information is included in the “Get All Content” API Response. Please take the id from the “content_id” field and NOT the “id” field.
  • Partner Name – Further to the right in the same line as the domain and Content ID placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.

Request

curl --location --request GET 'https://<domain>/api/v1/stream-tech/content/get-url/<content_id>?partner_name=60390bec12b7390008c66b0f' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'

Included below is the sample successful response when interacting with the Get URL by Content ID API.

Response

{
"url": "https://edge.qa-alefedge.com/v1/content?url=00c104e612cb7f461e6446d77125a0edaee10e1f5dd6a712998b0091ba5c25b5ddb942f62544082e32f7e77f5b6408f6bf1f85caf763f405fe422366cb56d142"
}

Get App Key API

The Get All App Keys API returns App Keys relevant to the subscription being utilized. These are important as it is a parameter to the Get Signed URL API which allows the playing of Private Content from the Edge. Once the developer obtains the response of this API, they will have all the required parameters to successfully use the get signed URL API. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the topline of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.

Included below is the sample successful response when interacting with the Get App Key API.

Request

curl --location --request GET 'https://<domain>/api/v1/stream-tech/get-app-key?partner_name=60390bec12b7390008c66b0f' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'

Included below is the sample successful response when interacting with the Get App Key API.

Response

{
   "app_keys": [
       "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX25hbWUiOiI2MDM5MGJlYzEyYjczOTAwMDhjNjZiMGYiLCJyb2xlIjoicGFydG5lclVzZXIiLCJpYXQiOjE2MTQzNTEzNjYsImV4cCI6MTY0NTkwODk2Nn0.ceMlHNlE1glNkD7E7r5itDsgR1D3ZYPUqvkn_Nxopa0"
   ]
}

Get Signed URL API

In order to play Private content from the Edge, a Signed URL will need to be generated for the content. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the top line of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • App Key – This piece of information is provided to the Developer only through the response of the Get App Key API. If there are any questions on how to do this, please refer to the section Get App Key or Get App Key API.
  • Expiry Time – This piece of information is provided by the Developer. It is the duration in which the Signed URL will be active, the time entered is in seconds. There is no maximum value for this parameter.
  • Content – This piece of information is provided to the Developer in the output of Get All Content Details or Get Specific Content. This will be the URL in which the content can be played from the Edge.
  • Allow Signed Cookie – This piece of information is up the Developer’s preference. Indicate whether your what Signed Cookies enabled by entering “true” otherwise enter “false”.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown

Included below is the sample successful response when interacting with the Get Signed URL API.

Request

curl --location --request GET 'https://<domain>/api/v1/stream-tech/signed-url?partner_name=60390bec12b7390008c66b0f&app_key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX25hbWUiOiI2MDM5MGJlYzEyYjczOTAwMDhjNjZiMGYiLCJyb2xlIjoicGFydG5lclVzZXIiLCJpYXQiOjE2MTQzNTEzNjYsImV4cCI6MTY0NTkwODk2Nn0.ceMlHNlE1glNkD7E7r5itDsgR1D3ZYPUqvkn_Nxopa0&expiry_time=9000&content=https://edge.dev-alefedge.com/v1/content?url=00c104e612cb7f461e6446d77125a0ed3f839048474bf9305700914f865d122dbaf44cd10cd19272845bdd7d399e613ae516aaeee916339b10dd6c5d2a5301ea&allow_signed_cookie=true' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'

Included below is the sample successful response when interacting with the Get Signed URL API.

Response

{
   "url": "https://env.alefedge.com/v1/content?url=e9ad91a9718a7b60e52723cdde8daf1d01e452a8888dd5178a353f3efdb81f4fee48ce4d128dd1123505d886bda7d3e42295e3dbce819c0b890f163ce22b0b6a1a67d7ec8dc7a406e24d6cc82fe52c7d3f4bdab1a2e89de68cfec0883b86f94b5a22270293f37ebc3ba95bb85f4db48c8df8c4e80f4a8753366f954b589185c31c46a24571c6c5e409aed989ac06cf0572a709b71328424816b7783898867c31db448ec5e035315517a952a2ffc7f9a092392a6b54bb73c5857b6c47d8263bd6dbf43b479e2d2ad781faabb51d4b43623471e1a4a3c74163bde592b1270805e21364d5c61d771fd74ab00f579d2955064778bd5f8eb1e61bb5fb321cf6e76a4249999cd8c8cacac7ec87f018acb47e1d7a6e8acf0fd967b5b6f121b4dabd272c6b145ac07b79bde59c884f44622d055114ccf52b99f6930f5e5b82a55edd8dcfd321c57a0b27118f5730660f6f6fd8cde52b39a3f3c616b40fa886a712bc40dcb30aeb7bb0af790d0e959f947d07e7dc683606fb585f53c18625bcf027d23faa5bec5082eb743f4d69abd809bc57a746261f189cb004ab9acdfbb9133c56c8085c34a4347d37b47cb1d0c2ea30c939f5c2b892fb48e4dd2e1fe6d4be7e7f275e67412d207d4ac2a7c356ff810967e8bf410f6d548bc01fb9b9363ceaa556a299004aeda021d8b3909ac6f0cd91c04c1b2c2761cefff05e68ed89e631a6346ee39da400138244e1620062c95ce3c054ee"
}

Additional Supporting APIs

Get Whitelist Domain API

The Get Whitelisted Domain for Specific Partner API returns a list of all the Whitelisted Domains that a developer has added for a specific subscription. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the top line of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.

Included below is the sample successful response when interacting with the Get Whitelist Domain API.

Request

curl --location --request GET 'https://<domain>/api/v1/stream-tech/get-whitelist-domain?partner_name=60390bec12b7390008c66b0f' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX' \
--data-raw ''

Included below is the sample successful response when interacting with the Get Whitelist Domain API.

Response

{
   "cors_whitelist_domain": [
       "http://abc.com"
   ]
}

Add Whitelist Domain

The Add Whitelisted Domain API enables the Developer to provide additional access to content such that it can be on-boarded onto EdgeNet. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the topline of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • CORS Whitelist Domain – The last line of the Developer Curl Script has a line for the “cors_whitelist_domain”. Please enter the whitelist to be added in the appropriate place.

Included below is the sample successful response when interacting with the Add White Domain API.

Request

curl --location --request POST 'https://<domain>/api/v1/stream-tech/add-whitelist-domain?partner_name=60390bec12b7390008c66b0f' \
--header 'api_key: XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw ' { "cors_whitelist_domain": "https://xyz.com"}
'

Included below is the sample successful response when interacting with the Add White Domain API.

Response

{
   "status": "SUCCESS",
   "message": "Cors whitelist domain added successfully."
}

Delete Whitelist Domain

The Delete given Whitelist Domain API enables the Developer to remove access to specific content that was previously hosted on the Edge. The Developer Curl Script for the request is included below. Please note the following pieces of information need to be updated in the Curl script in order to successfully execute:

  • Domain – In the top line of the Developer Curl Script after the “https://” there is a place holder for domain, <domain>. The proper domain to enter here is, stg-alefedge.com/et.
  • Partner Name – Further to the right in the same line as the domain placeholder, there is the Partner Name parameter. This piece of information is provided to the Developer on the Service Management Screen of the subscription being used. It is important to note this field is called “Service ID’ on the Service Management Screen.
  • API Key – The second line of the Developer Curl Script has a place holder for the API Key. This piece of information was provided to the Developer in their “Welcome to Developer EdgeNet” email, the final step in the Sign-Up process. This information is also accessible via the “My Profile” option from the Account Management Dropdown.
  • CORS Whitelist Domain – The last line of the Developer Curl Script has a line for the “cors_whitelist_domain”. Please enter the whitelist to be added in the appropriate place.

Included below is the sample successful response when interacting with the Delete Whitelist Domain API.

Request

curl --location --request DELETE 'https://<domain>/api/v1/stream-tech/delete-whitelist-domain?partner_name=60390bec12b7390008c66b0f' \
--header 'api_key:  XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
 "cors_whitelist_domain": "https://moodleproxy1.testalef.net"
}'

Included below is the sample successful response when interacting with the Delete Whitelist Domain API.

Response

{
   "status": "SUCCESS",
   "message": "Cors whitelist domain deleted successfully."
}

Playing of Edge Content

In order to play content from the Edge the viewer must be in an Edge Environment. One option for this would be to leverage the Developer Sandbox Container. If you are interested in learning more about how to leverage the sandbox environment, please read this document, https://developer.alefedge.com/managing-your-apps-and-services/debugging-and-testing/sandbox-tutorial/.

Public Edge Content

If the user has an Edge Environment in which Edge content can be played. The process in which to play Edge Content there is as follows:

  1. Possess content that has been onboarded onto the Edge. This can be accomplished by leveraging the Onboard Public API. The check to see whether or not it has been successfully onboarded will come with obtaining the URL of the Edge Content.
  2. After possessing content on the Edge. The Edge URL will need to be obtained, and a check whether the content has been successfully onboarded. This can be completed by leveraging the Get All Content API.
    • Please note, the Content URL can specifically be obtained by leveraging the Get URL for given Content ID. However, the Get All API would have to be leveraged to obtain the content ID anyway.
  1. After calling the Get All API, please take the content_url associated with the piece of content the developer wants to play. At the end of the URL the developer will have to add “&api_key=XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX” to the end (inserting their actual API Key).
  2. Once step three has been completed, the user can take the finalized URL and play it from a browser within the Edge Environment.
    • Please note, if the video uploaded is a M3U8 file, it needs to be served from a player and not just a browser. The recommended player for these files is, https://player.stg-alefedge.com/edge. Please ensure https://player.stg-alefedge.com has been added as a whitelisted domain for the content to properly play.
    • For Mac users, it is also important to note, when playing content from the Firefox browser, the Content URL must be copied in text formatting (not hyperlinked) using the command and “c” keys. When pasting the Content URL inside the browser, use the control and “v” keys.
  •  

Private Edge Content

If the user has an Edge Environment in which Edge content can be played. The process in which to play Edge Content there is as follows:

  1. Possess content that has been onboarded onto the Edge. This can be accomplished by leveraging the Onboard Private API. The check to see whether or not it has been successfully onboarded will come with obtaining the URL of the Edge Content.
  2. After possessing content on the Edge. The Edge URL will need to be obtained, and a check whether the content has been successfully onboarded. This can be completed by leveraging the Get All Content API.
    • Please note, the Content URL can specifically be obtained by leveraging the Get URL for given Content ID. However, the Get All API would have to be leveraged to obtain the content ID anyway.
  1. The next step in the process would be to obtain an App Key that helps generate the Signed URL to play onboarded private content from. This is accomplished by leveraging the Get App Key API
  2. After obtaining the App Key, the user will be able to generate the Signed URL by leveraging the Get Signed URL API.
  3. After obtaining the generated Signed URL associated with the piece of content the developer wants to play. At the end of the URL the developer will have to add “&api_key=XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX” to the end (inserting their actual API Key)
  4. Once step five has been completed, the user can take the finalized URL and play it from a browser within the Edge Environment
    • Please note, if the video uploaded is a M3U8 file, it needs to be served from a player and not just a browser. The recommended player for these files is, https://player.stg-alefedge.com/edge. Please ensure https://player.stg-alefedge.com has been added as a whitelisted domain for the content to properly play.
    • For Mac users, it is also important to note, when playing content from the firefox browser, the Content URL must be copied in text formatting (not hyperlinked) using the command and “c” keys. When pasting the Content URL inside the browser, use the control and “v” keys.
    • Finally, once video collateral has been onboarded, there is some lead time before the content is synced to the Edge. The duration of sync depends on the size of the content. For smaller videos, this process may take 2 minutes. For larger videos, this process may take up to 5 minutes. 
  •  

How useful was this post?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?