
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...
04/08/2026
Dalet, a leading technology and service provider for media-rich organizations, t...
24/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/07/2026
Current DASDEC software enables customers to comply with the FCC's new 15-character password mandate without requiring updates
LYNDONVILLE, N.Y. July 23,...
24/07/2026
At the IBC2026 Show, SDVI will give European media organizations their first hands-on look at the next-generation Rally media supply chain management platform f...
24/07/2026
Sonnet Technologies at IBC2026
Brie Clayton July 23, 2026
0 Comments
Hero image: Sonnet Twin25G T5 Thunderbolt 5 Adapter
At this year's IBC Sho...
24/07/2026
Musora Enhances Online Music Lessons with Blackmagic Design
Brie Clayton July 23, 2026
0 Comments
Director of Production Josh Holliday details workflo...
24/07/2026
Kerry and Mayo fans Up For The Match as excitement builds in Croke Park on the e...
23/07/2026
Staines-upon-Thames, UK, 23rd, JULY, 2026 - Yospace, the trusted leader in Dynamic Ad Insertion (DAI), stitched 11.57 billion one-to-one addressable advertisem...
23/07/2026
This Spring 2026 graduate from Honolulu found a home at SoonerVision as a live-production star and is ready to enter the industry as a replay op on Prime Video&...
23/07/2026
As the AUSL postseason begins tonight, listening in to players during games enhances fan engagement for the young organization
Ballplayers chatting with announ...
23/07/2026
Snap Inc. and the Esports Foundation have announced Snap's activations at the Esports World Cup 2026 in Paris, running July 6 through August 23. For the fir...
23/07/2026
Sony has announced the FX5, a full-frame Cinema Line camera built around a newly developed fully stacked Exmor RS CMOS image sensor and BIONZ XR2 image processi...
23/07/2026
TNDV (a division of Live Media Group) provided technical production support for the Pickleball Slam 4 live broadcast from Seminole Hard Rock Live in Hollywood, ...
23/07/2026
LTN has announced it has completed satellite-to-IP migrations for more than 3,00...
23/07/2026
Daktronics has announced the winners of the 2026 DakClassroom Student Showcase, a national competition recognizing student work in media production, storytellin...
23/07/2026
The French Tennis Federation (FFT) and beIN Media Group have announced a five-ye...
23/07/2026
Clear-Com provided the communications infrastructure for the Fryderyk Awards Gal...
23/07/2026
The 2026 FIFA World Cup is, on paper, an unparalleled financial success. Total t...
23/07/2026
Standing inside HQ3 at MediaCity Studios during the FIFA World Cup 2026, it quic...
23/07/2026
Having attracted upwards of 17 billion views throughout the tourney, the broadca...
23/07/2026
Quickly creates reverse reverb effects
Low End Candy have recently released a new plug-in that offers a quick and simple way to create reverse reverb effect...
23/07/2026
New engines, resonators, effects & more
Expressive E's versatile soft synth has just been treated to an update that greatly expands its sonic range. Noi...
23/07/2026
SGL Carbon has further expanded its photovoltaic capacity at its Ort im Innkreis site in Austria. With the commissioning of new PV carports, the sites solar sys...
23/07/2026
NITV launches new By Mob For Mob series in partnership with NRMA Insurance
23 July, 2026
Media releases
National Indigenous Television (NITV) has launched ...
23/07/2026
Rohde & Schwarz presents new software for three-phase power analysis on MXO seri...
23/07/2026
In our latest blog, Laura Rognoni explores how the launch of Play Snooker reflects a wider shift in sports economics - from monetising peak broadcast audiences ...
23/07/2026
Download Now!
To receive a short case study showcasing Vivid Broadcast's audio setup, please enter the following details:
--
First Name* First Name ...
23/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/07/2026
Witbe brings its AI-native testing and monitoring infrastructure to Amsterdam: demonstrations on real devices, a peer-reviewed technical paper in the conference...
23/07/2026
Quickplay, Caretta Research, Evergent, and Yospace have announced that the renowned IBC Pride Happy Hour will once again bring the vibe and fun back to IBC on F...
23/07/2026
At IBC2026, Interra Systems will present this year's focus: operational AI at scale for QC, monitoring, and captioning workflows. The industry has moved pas...
23/07/2026
Illusionfx is finally coming!
Alex Perea July 23, 2026
0 Comments
The new website is now live to mark the occasion.
Since the last update, feedback h...
23/07/2026
Evergent (5.A86) will showcase its Agentic Revenue Orchestration Platform for streaming services, sports leagues, pay-TV operators at IBC2026 (RAI Amsterdam, 11...
23/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/07/2026
David Dvir, 2D founder (left), Sundeep Reddy (center), and Jean-Marc Bouchut (right), both of Zeiss...
23/07/2026
Screen Australia announces new national documentary accelerator program 23 July 2026
Screen Australia has today announced the Above the Line Documentary Accel...
23/07/2026
At this week's AI Summit in San Francisco, South Korean President Jae Myung Lee and some of the country's top business leaders and researchers are meeti...
23/07/2026
X-Rite Pantone and Fashion Institute of Technology (FIT) Partner to Advance Digi...
23/07/2026
Thursday 23 July 2026
New Samsung Galaxy Foldable range available now to pre-order on Sky Mobile
Sky Mobile, the award-winning network voted this year by Expe...
23/07/2026
Thursday 23 July 2026
Jason Statham leads Sky Original action thriller MUTINY in explosive new trailerTurn on cookies to view this content. Go to Privacy optio...