
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 ...
09/10/2026
September 10 2026, 06:00 (PDT) Dolby Expands Dolby OptiView Platform with New Capabilities at IBC 2026
New Sports Intelligence helps providers better unders...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Cobalt Digital to Bring End-to-End ST 2110/IPMX Solutions and Practical Tools to NAB Show New York
Highlights include complete path from SDI to IP, C-band tran...
07/10/2026
Deerstalker Pictures The Exorcism of Nixie Shot With Blackmagic Cameras
Brie Clayton October 6, 2026
0 Comments
Fantasy series relied on Blackmagic ca...
07/10/2026
Nevion announces Providius NVRT integration with eMerge switches for expanded br...
07/10/2026
DriveShelf - A Filmmaker's Mac App for Finding Footage on Unplugged Drives
Brie Clayton October 6, 2026
0 Comments
DriveShelf for Mac catalogs eve...
07/10/2026
COW Jobs: Cinematographer, Video Editor - Baltimore, MD
Brie Clayton October 7, 2026
0 Comments
Cinematographer / Video Editor
September 23, 2026 ...
07/10/2026
Behind the Scenes at Berklee Homecoming 2026 Follow Marley Striem BM '25 behind the scenes as she manages a team of students and liaises with artists duri...
07/10/2026
Berklee College of Music and Berklee Valencia Named to Billboards 2026 List of T...
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/10/2026
A response to Mark Turner and the SVG AI Innovation Lab
SVG AI Innovation Lab Program Director Mark Turner's How Broadcast Sports Can Apply the Newsroom S...
06/10/2026
Cobalt Digital will exhibit at NAB Show New York 2026 (Booth 226, Javits Center, October 21-22), demonstrating its ST 2110/IPMX product line alongside solutions...
06/10/2026
LiveU and Airwise have announced a strategic partnership integrating LiveU's bonded video transmission with Airwise's drone fleet management, airspace a...
06/10/2026
Hotspur Labs, Tottenham Hotspur's corporate venture programme, will co-host ...
06/10/2026
SPORTEL Monaco 2026 will take place October 19-21 at the Grimaldi Forum in Monaco, with the conference programme running October 19-20.
Sessions include:
Mast...
06/10/2026
Zixi has announced the appointment of John Towers as Chief Financial Officer. Towers brings more than 20 years of experience in media and entertainment, includi...
06/10/2026
The Memphis Grizzlies, DAZN, and WATN/ABC24 have announced a partnership to simulcast 15 regular season Grizzlies games free over-the-air on ABC24 during the 20...
06/10/2026
The Minnesota Timberwolves, KARE 11, and DAZN have announced a partnership to simulcast 15 Timberwolves games free over-the-air on KARE 11 during the 2026-27 se...
06/10/2026
Sportel 2026 is set to be held in Monaco in less than two weeks (beginning Octob...
06/10/2026
The company's Pro Data portable storage unit enabled the Dallas Cowboys prod...
06/10/2026
Three new compact pedals announced
Warm Audio have just introduced a new guitar pedal line-up that offers compact, pedalboard-friendly versions of some of t...
06/10/2026
Drum-replacement tool gets major overhaul
WaveMachine Labs have announced that the latest version of their drum-replacement software is now available, and i...
06/10/2026
Firmware update implements user-requested features
Arturia's stage-going keyboard series has just received a significant update that addresses some of t...
06/10/2026
(4:51 PM) Wiesbaden, October 06, 2026. Based on business performance to date, pa...
06/10/2026
SBS invites audiences and communities to help shape the future of its language s...
06/10/2026
Manufacturer receives honors from both TV Tech and TVB Europe for advancements in compression technology
AMSTERDAM September 30, 2026 - Cobalt Digital has ...
06/10/2026
Cobalt Digital NAB NY Booth 226 // Journalists: Click to visit Cobalt
Highlight...
06/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
06/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
06/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
06/10/2026
Imaginary Forces Paints a Portrait of Conflict in War
Brie Clayton October 6, 2026
0 Comments
Director Ronnie Koff of Imaginary Forces (IF) transforms...
06/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
06/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
06/10/2026
Pebble, a leading specialist in automation, content management and integrated channel solutions, is supporting the continued modernisation of playout at Brazili...
06/10/2026
Techex, a specialist in software-defined live video workflows, will demonstrate the how tx darwin platform combines satellite and IP delivery at NAB New York 20...
06/10/2026
NVIDIA DGX Spark 64GB Gives Developers More Ways to Build and Scale Local AI
Allen Bourgoyne October 5, 2026
0 Comments
Local AI is becoming more usef...
06/10/2026
Cannes Premiere Documentary The Match Shot with Blackmagic URSA Cine
Brie Clayton October 5, 2026
0 Comments
Portraiture and archival footage bring pl...
06/10/2026
Boston Conservatory Artists Turn Chairs on The Voice Watch Lexi Stephens (BFA 25) and Marcus Ladden Jr. (BFA 30) wow the celebrity coaches during their blind au...
06/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
06/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
06/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...