Easy | Private Edge Video Enablement | Setup

Key Information

Register
Submit
Competition Timeline

Timezone:Etc/UTC

Registration

Starts

Sep 01, 2021

06:08

Ends

Sep 30, 2021

06:13

Submission

Starts

Sep 01, 2021

06:14

Ends

Sep 30, 2021

06:19

Review

Starts

Sep 30, 2021

06:19

Ends

Oct 02, 2021

11:35

Appeals

Starts

Oct 02, 2021

11:35

Ends

Oct 03, 2021

11:37

Winners Announced

Oct 03, 2021

11:43

Challenge Overview

Skillbuilder-Challenge-Banner

Easy | Private Edge Video Enablement | Setup

Setup and Access AlefEdge Sandbox Environment

This is the EASY 250 points problem of our Private Edge Video Enablement Skill Builder to make you understand how you can create your Private Edge Developer Account, get a subscription, and view/test a video served from Edge.

Solving this problem you will learn:

  • How to create an Private Edge Developer Account and receive your API key
  • How to create a Video Enablement Subscription
  • How to upload a video to the Edge Network
  • How to request and receive a Sandbox Edge Environment.
  • How to view/test the video served from the Edge Network.

What do you need to do?

Create your AlefEdge Developer Account

Before we get started, you need an AlefEdge Developer Account. Follow the steps mentioned in our Getting Started Challenge to set up your account.

Set-up Video Enablement Subscription

Now that you have access to your account and an API key, it is time to set up a Video Enablement Subscription.

1. From your account dashboard, you can see a list of services (if your account is new, this list will be empty). Hit the plus icon to the right of "My Services" and then select "Alef Video Enablement" to be taken to a page to create your Video Enablement subscription. You can click on "Products" in the navigation bar, and then on the dropdown "Alef Video Enablement".

3. Once on the Pricing page, select the location closest to you and select your desired stack in the form in the upper right of the screen. You will be provided with purchase details. The Private Edge free tier can make unlimited API calls but has a 2GB upload limit.

4. Click purchase to see the service details. Enter a unique and descriptive service name and hit the blue "Confirm" button.

5. After hitting "confirm" you will be taken to a page where you can configure your new Video Enablement Subscription. There are a few pre-populated fields and a few that you will need to fill in.

  • Email Id, Phone Number, Full Name, Service Id, Edge Storage Size, and Tenancy will come pre-populated. Leave them as they are. You will need the Service Id for your API request. The Service Id field is equivalent to the Partner Name API parameter.

  • Whitelist Domain should include the domain that corresponds to the URL of the video you are adding to the Video Enablement Subscription. This is required to avoid a DNS error.

  • Secret Key and Secret Token are applicable for private videos protected by a signed URL. They are not needed for this challenge and should be left blank.

6. Once you have completed all your fields, hit the submit button below to complete configuring your Video Enablement Subscription.

Request a Sandbox

In the real world, Private Edge requires some infrastructure that is not easily replicated for development and testing. Alef provides the developer with a sandbox environment that replicates an Edge Network connection. From within a sandbox, you will be able to view content that has been added to the edge.

To request your sandbox, make sure you are on your portal dashboard site (https://portal.developer.alefedge.com/). Once there, click on the "Sandbox" link in the navigation bar at the top of the page. You will be taken to a page to name your sandbox and specify the location.

Choose the location that you chose as the location for your service in the previous step. Remember that edge computing decentralizes the internet and brings computing power closer to the end-user.

Hit the 'Get Sandbox' button below to request your sandbox. Your sandbox will take a bit of time to be built and delivered to you. You can expect an email to be sent to the email address associated with your Private Edge account. This email will provide instructions on how to access your sandbox. It may take an hour for your sandbox to be ready.

Use Onboard Public API to Add Videos to the Edge

Note: You may utilize the Swagger documentation for this part https://developerapis.stg-alefedge.com/api-docs-edgetube/#/Video%20Enablement%20APIs/

Now that you have properly configured your Video Enablement Subscription and have your sandbox, you can use the Public Onboard API to add videos to the Edge. This will be done via curl commands. You will need to open your terminal and run the following from your command line. Be sure to substitute the appropriate parameters for your project.

curl --location --request POST "https://developerapis.stg-alefedge.com/et/api/v1/stream-tech/content/add?partner_name=$SERVICE_ID" \
--header 'api_key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{ "urlList":[{
"url": CONFIRM_URL,
"content_access": "public",
"publish_access": "public",
"partner_cloud_url": CONFIRM_URL
}]
}'

CORRECTION:

Make sure you set publish_access to public

Replace YOUR_API_KEY with the API key you were sent via email. It can also be found on your profile. Replace SERVICE_ID with the Service ID from your configuration page.

Copy this curl statement into your terminal and hit enter. You will see the following message to indicate the video was added.

[ { "message": "Content onboarding is in progress", "status": "INPROGRESS", "url": "CONFIRM_URL", "content_id": "abc" } ]

Your content_id is randomly generated and will be different from the above example.

IMPORTANT:

The value of CONFIRM_URL will be available on this page after you register for the challenge.

Confirm video was added and get Edge URL

Now that you have added a video, you will want to further familiarize yourself with the Edge Net Video Enablement API and to a critical piece of information views from the edge.

Use curl to verify that the video was added to your subscription as follows:

curl -X GET "https://developerapis.stg-alefedge.com/et/api/v1/stream-tech/content/get-all?partner_name=$SERVICE_ID" -H 'accept: application/json' -H 'api_key: YOUR_API_KEY'

As in the previous step, replace SERVICE_ID and YOUR_API_KEY with the appropriate values specific to you and your subscription.

You will receive a response in this form:

[{
"id": 1325,
"partner_name": "6080cd1af470cd000784a8f0",
"content_id": "abb",
"content_url":
"https://edge.stg-alefedge.com/v1/content?url=00c104e612cb7f461e6446d77125a0edb3b8a827df1bd1149f3a08cad05d4af7869b0fd1345afdb80c83ee58c901af0949ef8427cbd7d1d3afde25937daf44be83d2426c08eff1a81cde6f3417278fe9",
"partner_content_url": "CONFIRM_URL",
"partner_cloud_url": "CONFIRM_URL",
"createdAt": "2021-04-22T17:01:51.000Z",
"updatedAt": "2021-04-22T17:01:55.000Z",
"content_upload_status": "success",
"content_access": "public",
"publish_access": "private",
"content_status_message": "Partner Content on-boarded Successfully",
"partner_content_file_name": "CONFIRM_FILE_NAME",
"content_size": 4096
}]

Notice that there is both a content_url and a partner_content_url. The partner_content_url is the URL that you uploaded. The content_url is the URL where the video is now hosted at the edge. You will need the content_url in a later step, so copy it now and keep it ready.

Access your sandbox

You now need to access the sandbox you requested. Check the email associated with your Private Edge account. If you don't see an email yet, don't worry. It may take up to an hour for the sandbox details to be delivered. Take a break, eat a snack, or read our free ebook "40 Edge Use Cases that will Shape the World". If after an hour you have not received your sandbox, please let us know at support@alefedge.com and we will help you with the next steps. In the email to support@alefedge.com, please include the Name of your Sandbox and the Location requested.

If you have received your email, you can use the provided information to access your sandbox. For this challenge, we recommend using a VNC viewer. Input the sandbox address and follow the prompts you are given. Please note, you will have to add the port number at the end of the DNS. What you enter in the address bar is "sandbox.loc-##.alef-edge.net:PORT#" The sandbox password is also provided in the email. Your Private Edge password will not work. Please note, you will have to add the port number at the end of the DNS.

Once you have successfully logged into your sandbox, right-click within the sandbox and select your preferred browser. Now let's watch the video!

View your Video from the Edge

Refer back to the content URL we got in the previous step. It should look something like this:

# https://edge.stg-alefedge.com/v1/content?url=00c104e612cb7f461e6446d77125a0edb3b8a827df1bd1149f3a08cad05d4af7869b0fd1345afdb80c83ee58c901af0949ef8427cbd7d1d3afde25937daf44be83d2426c08eff1a81cde6f3417278fe9

It is necessary to append your API key to this URL. The final URL will be in this form:

content_url&api_key=YOUR_API_KEY

It will look something like this:

# https://edge.stg-alefedge.com/v1/content?url=00c104e612cb7f461e6446d77125a0edb3b8a827df1bd1149f3a08cad05d4af7869b0fd1345afdb80c83ee58c901af0949ef8427cbd7d1d3afde25937daf44be83d2426c08eff1a81cde6f3417278fe9&api_key=XXXX-XXXX-XXXX-XXXX

This URL will need to be pasted into the browser in the sandbox. Command-V won't work in the sandbox. You need to right-click and select 'paste' or use CTRL-V. Hit enter and watch your video!

Resources

Edge Native Services User Guide

Sandbox Tutorial

Submission Deliverables

As a submission to this challenge, you have to submit the screenshots to verify that you were able to follow the steps and create your account and stream a video.

Once you have completed all the steps, follow the steps below to make your submission to this problem:

  • Go to: https://portal.developer.alefedge.com/
  • Check: On the left side, you should have at least 1 service added.
  • Check: On the top right, you should have your name on it.
  • Screenshot: Take a screenshot of this page.
  • Login to your sandbox and play the video.
  • Screenshot: Take a screenshot of the video showing the blue umbrella on the left and the red umbrella on the right.
  • Zip the screenshots. Submit the Zip.

Judging Criteria

  • Your submission will be reviewed manually and you will earn points as the score for your valid submission.
  • In case you don't see a score, make sure you understand the submission guidelines/deliverables. You can also discuss in the challenge forum any issues.

Topcoder Skill Builder Problems | Private Edge Video Enablement API

Host Challenge Link: https://www.topcoder.com/challenges/efe526e7-d82b-4708-beb4-e3390889bb64

Easy | 250 Points. Challenge Link: https://www.topcoder.com/challenges/76757ad7-4bd1-43b1-af7c-a397c99f3394

Medium | 500 Points. Challenge Link:https://www.topcoder.com/challenges/f970f27b-542a-4744-b51e-e9657859618e

Hard | 1000 Points. Challenge Link: https://www.topcoder.com/challenges/4d7e219d-ce91-4d92-82b2-c42f481732b1

ELIGIBLE EVENTS:

2022 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30203996