
Three Simple Methods to Invoke the Vidispine API From .NET Code by Vidispine June 15, 2016 Howto
Binagora is on fire and returns with another guest post. We know we have a bunch of developers on .NET, therefore we created a .NET SDK. This post shows how you can invoke the Vidispine API from .NET, using the SDK or using standard .NET classes. All with example code.
The following article describe three simple ways to invoke the Vidispine API from .NET code. Two of them use standard .NET classes, while the last one uses the Vidispine .NET SDK. Code snippets were written using C# but you can of course use another language, such as VB.NET, if you want to.
We'll use the simplest test case possible, and let us retrieve the id of the first available item in the Vidispine library.
First of all, let's see how it's done in Postman. As you may already know, it's just a simple http GET request to the Vidispine API to retrieve an item id.
Notice that we're using two Postman variables for a specific environment:
{{vs}}: this is the Vidispine base address (url + port)
{{credentials}}: this is the username and password in basic http format (:) encoded in base64.
Ok, that was the principle of how to query the Vidispine API for an item id. Now let's do the same thing from code.
Given the following constants:
C#
private const string address = http://xxx.xxx.xxx.xxx:8080/API; private const string userName = admin; private const string password = admin;
1
2
3
private const string address = http://xxx.xxx.xxx.xxx:8080/API;
private const string userName = admin;
private const string password = admin;
Option 1: Using WebRequest class
C#
private static string GetUsingWebRequest(string requestUri) { var request = (HttpWebRequest)WebRequest.Create(requestUri); request.Credentials = new NetworkCredential(userName, password); using(var response = (HttpWebResponse)request.GetResponse()) { var stream = response.GetResponseStream(); var reader = new StreamReader(stream); string result = reader.ReadToEnd(); return result; } }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
private static string GetUsingWebRequest(string requestUri)
{
var request = (HttpWebRequest)WebRequest.Create(requestUri);
request.Credentials = new NetworkCredential(userName, password);
using(var response = (HttpWebResponse)request.GetResponse())
{
var stream = response.GetResponseStream();
var reader = new StreamReader(stream);
string result = reader.ReadToEnd();
return result;
}
}
Create a WebRequest, set the credentials and execute the request. Remember to release the request calling the Dispose() method or wrapping the instance into a using statement as we did in the sample.
Notice that in this case, we know the response contains a plain text with an item id. That's why we read the stream, and converts it into a string instead of a specific type.
Option 2: Using HttpClient class
C#
private static string GetUsingHttpClient(string requestUri) { var handler = new HttpClientHandler() { Credentials = new NetworkCredential(userName, password) }; var client = new HttpClient(handler); client.BaseAddress = new Uri(address); string message = client.GetStringAsync(requestUri).Result; return message; }
1
2
3
4
5
6
7
8
9
10
11
12
13
private static string GetUsingHttpClient(string requestUri)
{
var handler = new HttpClientHandler()
{
Credentials = new NetworkCredential(userName, password)
};
var client = new HttpClient(handler);
client.BaseAddress = new Uri(address);
string message = client.GetStringAsync(requestUri).Result;
return message;
}
Similar to previous option, it is just a matter of using another http client from the .NET framework.
In this case, credentials are specified on a client handler, then the http client is created using that handler.
The request is executed asynchronously, which is powerful and could be needed in a real situation.
In this case we're just reading the Result property immediately, but it's important to understand that the request is fired in an independent thread. Once thread is completed, you can execute your own callback.
Option 3: Using Vidispine .NET SDK
C#
private static string GetUsingVidispineSdk() { var rootResource = new VidispineResource(address).Authenticate(userName, password); var itemResource = rootResource.Item; string result = itemResource.SearchPlainGET.Number(1).CallText(); return result; }
1
2
3
4
5
6
7
8
private static string GetUsingVidispineSdk()
{
var rootResource = new VidispineResource(address).Authenticate(userName, password);
var itemResource = rootResource.Item;
string result = itemResource.SearchPlainGET.Number(1).CallText();
return result;
}
Finally the easiest way to do it, just call the SDK. Notice that in this case, the action to be executed is not part of the address. You specify the object and action based on the properties. We may say this is the strongly typed option to do it.
You can find more information about how to download and use the Vidispine .NET SDK in the post Getting Started With the Vidispine .NET SDK. If you want to try out the SDK, you can find the latest versions of the SDK here:
64-bit version of the Vidispine .NET SDK v4.5
32-bit version of the Vidispine .NET SDK v4.5
Running the app will show you the result 3 times, once for each option. In this case first item available is #525 but of course that will depend on your environment.
You can download the full console app code from the following GitHub Gist.
Hope you like it.
This blog post was written by our friends at Binagora. Check them out and see how they can help you with your next Media&Entertainment project.
Most recent headlines
05/01/2027
Worlds first 802.15.4ab-UWB chip verified by Calterah and Rohde & Schwarz to be ...
07/10/2026
Dalet, a leading technology and service provider for media-rich organizations, today announced the latest Long-Term Supported (LTS) release of Dalet Flex. Build...
06/09/2026
June 9 2026, 23:00 (PDT) Dolby and MagentaTV Bring Fans Closer to the FIFA Worl...
26/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
26/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
26/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
26/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
26/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
26/08/2026
PTZ Camera Manufacturer and FPGA Design Specialist Join Alliance to Advance IPMX and Open AV-over-IP Standards
The Alliance for IP Media Solutions (AIMS) today...
26/08/2026
BATON offers ZOO Digital advanced audio and video quality analysis, and scalable architecture
Interra Systems, a leading provider of end-to-end quality assuran...
26/08/2026
Riedel Communications today announced the continued expansion of its managed coach communications partnership with Scottish Rugby Union. Now entering its third ...
26/08/2026
Zixi brings Broadcaster V19 and showcases interoperable platform on Stand 5.A76
Zixi, a leader in live video delivery and workflow orchestration, will be exhib...
26/08/2026
LA JOLLA, CA-Jeffery Kelly, the H. Lutcher Brown Professor of Chemistry at Scrip...
26/08/2026
Indie Developer Launches Orty, aWindows App That Helps Freelance VideoEditors Fi...
26/08/2026
BTS on Sinners and Is God Is Shot with Pocket Cinema Camera 6K Pro
Brie Clayton August 25, 2026
0 Comments
Award winning filmmaker Travis Henry elevat...
25/08/2026
Open, Sustainable, Predictable: What Utah Scientific Is Bringing to IBC 2026 As broadcast leaders prepare to gather at the RAI Amsterdam for IBC 2026, the main ...
25/08/2026
NC State's Matthew Byrd breaks down how an IP-based infrastructure is delivering greater flexibility and scalability for Wolfpack productions...
25/08/2026
Deal expands the DTC reach in-market of Capitals, Wizards, Mystics games and oth...
25/08/2026
The two-year renovation period will create a stadium of the future for the NFL f...
25/08/2026
Behind The Mic provides a roundup of recent news regarding on-air talent, includ...
25/08/2026
Shell Energy Stadium in Houston has installed a new L-Acoustics A Series loudspeaker system, designed and installed by LD Systems, a Clair Global brand. The 20,...
25/08/2026
FloCollege is expanding its distribution and product offerings for the 2026-27 season, covering more than 20 NCAA partner conferences across Division I, II, and...
25/08/2026
TNA Wrestling and REVOLT have announced a content partnership bringing exclusive TNA Xplosion matches and content from TNA's library to REVOLT.
Our indust...
25/08/2026
Gracenote, Nielsen's content intelligence business, has released its Q3 2026 Data Hub analysis showing that FAST sports programming is growing at more than ...
25/08/2026
Amagi has appointed Thomas d'H rouville as Head of Sales for France, Benelux, and Nordics. Based in Paris, he will lead Amagi's growth strategy across t...
25/08/2026
IPC has appointed CCATech as its channel partner in Brazil, expanding the company's presence in Latin America. CCATech was founded in 2023 by Carlos Abrah o...
25/08/2026
FanConnect has announced the FC4, a multi-output media player designed to drive mid-sized video walls, multi-screen concession stands, and multi-display digital...
25/08/2026
JWX has launched JWX Content Hub, a platform for publisher video that combines content transformation, social distribution, audience engagement, and monetizatio...
25/08/2026
Techex has appointed Stuart Almond as Chief Revenue Officer. Almond brings more than 25 years of experience across technology, media, and telecommunications, ha...
25/08/2026
Grass Valley will demonstrate infrastructure connecting SDI, SMPTE ST 2110, MXL, and software-based processing at IBC2026 (Booth 9.A01, RAI Amsterdam, September...
25/08/2026
Franchises are taking greater ownership of production, distribution, and the fan...
25/08/2026
The first-year circuit for former professional athletes leans on LiveU, Starlink...
25/08/2026
Announcing the 2026 Sundance Institute Breakthrough | Focus Features Fellows
L...
25/08/2026
Auction Part 3 running until 9 September 2026
Soundgas have announced that the latest stage of their John Paul Jones Gear Auction is now live, and that bids...
25/08/2026
Over 60 award-winning artists, songwriters, producers, engineers
The MONO Music Conference (formerly Music Expo SF), San Francisco's premier event for m...
25/08/2026
All three versions receive firmware upgrade
Groove Synthesis have just launched a free firmware update that kits the 3rd Wave out with two major new feature...
25/08/2026
eds3_5_jq(document).ready(function($) { $(#eds_sliderM519).chameleonSlider_2_1({...
25/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/08/2026
Lingopal, the AI-powered live translation and localization specialist, is unveiling new platform capabilities at IBC2026 (11 14 September, RAI Amsterdam), helpi...
25/08/2026
Bminty is supporting TV5MONDE in the evolution of its editorial processes through a new AI-assisted press information generation solution. Combining the Louise ...
25/08/2026
Two Cultures. Millions Reached. One Berklee Connection. Meet Annie Dickinson and Zhengxi Zhang-the couple who turned their creative partnership into music car...
25/08/2026
Amagi, the media industry cloud platform for unified broadcast, streaming, and monetization, today announced that Law&Crime has migrated its Court TV channel, s...
25/08/2026
Broadcast Solutions, a leading systems integrator and provider of innovative solutions for the broadcast and media industry, is showcasing the breadth of its ca...
25/08/2026
Thatcham, UK 25 August 2026: Test & measurement innovator, Leader Electronics, has announced that leading broadcast rental company Minitech has purchased a Le...
25/08/2026
Appear's X20 Platform enables visually lossless video contribution with sub-frame latency and full path redundancy for TVTEL's centralised VAR operation...
25/08/2026
World-first demonstration combines 5G Broadcast and Media over QUIC for seamless, ultra-low-latency hybrid media delivery
Big Blue Marble will showcase new dev...