Add a media library video to an Advanced Local Video(s) banner
Adds a media library video to the banner's video files.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/banner/{bannerId}/vast/media-files/from-library.do
Adds a media library video to the banner's video files. The file is referenced, not copied, so deleting the row later leaves the library file in place. A video the banner already has is not added again: 'created' is then empty and 'alreadyAdded' names its row. Needs the Advanced Local Video(s) and Media Library permissions and update rights on the banner's advertiser; the file must be one the user can see in the library.
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/banner/5001/vast/media-files/from-library.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["mediaAssetId"] = "42" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());