Media Services migration code sample comparison

migration guide logo


Compare the SDKs

You can use some of our code samples to compare the way things are done between SDKs.

Samples for comparison

The following table is a listing of samples for comparison between v2 and v3 for common scenarios.

Scenario v2 API v3 API
Create an asset and upload a file v2 .NET example v3 .NET example
Submit a job v2 .NET example v3 .NET example

Shows how to first create a Transform and then submit a Job.
Publish an asset with AES encryption 1. Create ContentKeyAuthorizationPolicyOption
2. Create ContentKeyAuthorizationPolicy
3. Create AssetDeliveryPolicy
4. Create Asset and upload content OR submit Job and use OutputAsset
5. Associate AssetDeliveryPolicy with Asset
6. Create ContentKey
7. Attach ContentKey to Asset
8. Create AccessPolicy
9. Create Locator

v2 .NET example
1. Create ContentKeyPolicy
2. Create Asset
3. Upload content or use Asset as JobOutput
4. Create StreamingLocator

v3 .NET example
Get job details and manage jobs Manage jobs with v2 Manage jobs with v3