
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 ...
04/08/2026
Dalet, a leading technology and service provider for media-rich organizations, t...
04/07/2026
April 7 2026, 19:00 (PDT) Detective Conan: Fallen Angel of the Highway Opens in...
09/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
09/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
09/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
09/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
09/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
09/06/2026
Two Alumni Win Tony Awards Mike Morris and Cedric Leiba Jr. won awards for Best Orchestrations and Best Play, respectively.
June 8, 2026
By
Tori Donahue
...
08/06/2026
The two execs discuss the goals and the challenges of building a huge multi-cult...
08/06/2026
This industry legend has been a road warrior since the early '90s and is, today, a lynchpin on College GameDay
The sports-production industry continues to ...
08/06/2026
DAZN has agreed a multi-year rights partnership with Extreme Fighting Championship (EFC), expanding its global combat sports portfolio.
DAZN will broadcast EFC...
08/06/2026
As fans move across broadcast, streaming, social, mobile and creator-led platforms, and they expect every angle, in real time, TVU Networks has released a new e...
08/06/2026
Infront has further strengthened the 2026 Diamond League's international bro...
08/06/2026
Grass Valley has announced the appointment of Sam Craig as Vice President, Global Pre-Sales. Based in the United States, Craig will lead Grass Valley's glob...
08/06/2026
SMPTE has announced its summer 2026 education lineup covering IP networking and SMPTE ST 2110, including two standalone courses, a 13-week boot camp, and a hand...
08/06/2026
Sportradar Group AG has announced a multi-year global agreement with Kalshi, a p...
08/06/2026
FIFA and Gamefam have announced the launch of a FIFA World Cup 2026 event on Roblox, running June 5 through July 31, 2026. The event centers on FIFA Super Socce...
08/06/2026
A collaboration of NHL Productions, Monumental Sports, and Michael Levitt Produc...
08/06/2026
CBS Sports production staffer Bryce Adair has died at the age of 31 after sustaining injuries during a car accident on Wednesday while in Ohio working the the P...
08/06/2026
Behind The Mic provides a roundup of recent news regarding on-air talent, including new deals, departures, and assignments compiled from press releases and repo...
08/06/2026
WMT Digital today announced the launch of WMT Fan Intelligence, designed to unif...
08/06/2026
The Heat are the seventh NBA team to air their games over-the-air next season...
08/06/2026
Paramount and UFC have announced an expansion of their media rights partnership making Paramount the exclusive home of UFC Numbered Event main cards in Canada ...
08/06/2026
The Qatar Football Association (QFA), in cooperation with Sponix and broadcaster...
08/06/2026
Project B has announced the appointment of Host Broadcast Services (HBS) as Offi...
08/06/2026
The Buckeyes now produce and stream upwards of 200 sports events annually with a...
08/06/2026
At Spotify, our commitment to the LGBTQIA community is year-round. Through GLOW, our global music program, we celebrate and amplify the contributions of queer ...
08/06/2026
Get Hands-on With Keyboard & Synth Brands
GearExpo UK wouldn't be complete without some synth action, and we've got some of the industry's most ...
08/06/2026
50 popular in-ear monitoring system profiles added
The latest update for IK Multimedia's headphone-correction system has just arrived, and introduces ca...
08/06/2026
Manny Marroquin signature cans upgraded with SLAM Technology
The flagship model in Audeze's Manny Marroquin Signature Series has just been treated to an...
08/06/2026
Air domain supremacy redefined - New counter UAS, space solutions and directiona...
08/06/2026
he BBC and BritBox have announced that Edward Bluemel (We Might Regret This, My ...
08/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
08/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
08/06/2026
Dante interfaces, intercom and control systems for modern AV environments
Glensound will showcase a focused range of networked audio and intercom solutions fo...
08/06/2026
Bminty is proud to celebrate the first anniversary of T18, the new free national French DTT channel launched on June 6, 2025. This symbolic milestone also marks...
08/06/2026
DaVinci Resolve Used For Global Collaboration on Tony Foster Documentary
Brie Clayton June 8, 2026
0 Comments
DaVinci Resolve Studio and Blackmagic Cl...
08/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
08/06/2026
Plus, 20% off TVs ahead of kick-offMonday 8 June 2026
Sky introduces Real Time...
08/06/2026
FOX Secures Live NFL Game Package in Mexico Starting in Fall 2026 Agreement Features Thursday Night Football, Sunday Games Package, Thanksgiving Day Games, al...
08/06/2026
FOX One, FOX Sports and Indeed Name Austin Franklin and Kevin Akoto as FOX One C...
08/06/2026
Meet us on the show floor
Stand #286310 Discover Nara, the media management tool used by major facilities including Harbor and Molinare.
Nara v2 introduces re...
08/06/2026
L'art de l'Image dans Reflet dans un diamant mort' Une conversation avec le directeur de la photographie Manuel Dacosse, SBC et l' talonneur Pe...
08/06/2026
Embracing today's modern media workflows: FilmLight presents Nara 2.0, with FilmLight API Designed to support the growing demands of today's production ...
08/06/2026
Moderated by Andy Minuth, FilmLight's Colour Workflow Specialist
Wednesday 18 February
6:00pm / Doors open
7:00pm / Presentation in German
8:00pm / Drin...
08/06/2026
Join us on April 14 at 10:00am for a technical roundtable with the Filmlight dev...
08/06/2026
You're invited to FLAPI Classroom The fundamentals of coding and machine-assisted development
These sessions will help you build the skills needed to cre...
08/06/2026
With Sylvain Canaux (St Louis, Paris) and J r me Cloutier (MELS, Montreal)
Wednesday 6 May
Pick your time: 1:00PM / 5:00PM
Note: The presentation will be hel...
08/06/2026
FilmLight, 1107 N El Centro Ave, Los Angeles
Doors open at 3:30pm
Join the FilmLight team on June 9th at 4pm to learn how FilmLight products and APIs can stre...