
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
Dalet, a leading technology and service provider for media-rich organizations, today announced the latest Long-Term Supported (LTS) release of Dalet Flex. Build...
19/09/2026
Two High-Profile Professional Sports Franchises Renew creative.space Contracts with DigitalGlue
NFL team and Major League Soccer Club cite ease of use, secure ...
19/09/2026
Limited Edition Audio releases VoxSplit Pro for overlapping dialogue separation ...
18/09/2026
IBC 2026 Tech Moves Beyond the Gloss and Into the Rack If you spent any time in the halls of the RAI this year, you noticed a clear shift in conversation. The c...
18/09/2026
In-venue and creative video staffers at the professional and collegiate level ha...
18/09/2026
Qvest has appointed Jens Miedek as Senior Vice President Sales, Media and Entertainment. Before joining Qvest, Miedek spent 16 years at Riedel Communications an...
18/09/2026
Fonn Group has acquired full ownership of everviz, a cloud-native platform for interactive charts, maps, and data-driven graphics, and will rebrand it as Teikna...
18/09/2026
Other World Computing (OWC) has announced the acquisition of OpenDrives, a provider of software-defined video and rich media storage management solutions. The a...
18/09/2026
Kaltura and Verimatrix have announced a partnership integrating Verimatrix's Digital Rights Management and security capabilities into Kaltura's Cloud TV...
18/09/2026
The sixth edition of the World Nomad Games combined traditional sports, large-scale cultural performances, and some decidedly modern broadcast technology. Held ...
18/09/2026
DAZN and Super League Basketball (SLB) have extended their partnership for the 2026-27 season. Every Championship, Cup, and Play-Off fixture will be available l...
18/09/2026
Nielsen has announced that its Streaming Content Ratings (SCR) product will move from weekly to daily data delivery, with clients now receiving viewership data ...
18/09/2026
ESPN will present LALIGA's ElCl sico on ABC for the first time, with FC Barcelona vs. Real Madrid airing Sunday, October 25 at 4 p.m. ET. A one-hour pre-mat...
18/09/2026
The University of Pennsylvania's Division of Recreation and Intercollegiate ...
18/09/2026
The Charlotte Hornets have announced DAZN as their exclusive direct-to-consumer streaming partner for the 2026-27 NBA season. The service launches immediately, ...
18/09/2026
Broadcast sports' original medium will let drivers keep on hearing the plays thanks to a new bill set to pass the Senate....
18/09/2026
Fourteen iPhone 18 Pro devices - eight connected over a T-Mobile Private 5G Netw...
18/09/2026
The Minnesota Lynx have announced that their final local broadcast of the 2026 regular season will air free on FOX 9 following the shutdown of Victory . The Ly...
18/09/2026
Monumental Sports Network (MNMT) has announced that its Monumental+ streaming service is now available as a subscription through Prime Video, giving Capitals an...
18/09/2026
WTGL, the women's team golf league created by TMRW Sports in partnership with the LPGA, has announced its inaugural season schedule. The season premieres Su...
18/09/2026
Ratings Roundup is a rundown of recent ratings news and is derived from press re...
18/09/2026
Studio Network Solutions (SNS) has won Best Journal Article at the 2026 IAMT Impact Awards for What Video Editors Need When Everything Is Changing Around Them, ...
18/09/2026
10 new voice models join line-up
The latest expansion for IK Multimedia's AI-powered vocal-modelling software has arrived, delivering a set of 10 new vo...
18/09/2026
A day of hands-on synthesis, sound design & performance
On Saturday 26 September 2026, The Museum of Synthesisers will be hosting a full day of hands-on syn...
18/09/2026
HPA is supporting Fix It or Risk It, a non-commercial, industry-wide public-service campaign helping organizations across the media and entertainment supply cha...
18/09/2026
AgileTV has successfully wrapped up its participation at IBC 2026 in Amsterdam, following four days of conversations with customers, partners and industry profe...
18/09/2026
aconnic AG (ISIN: DE000A0LBKW6), Munich, invites its shareholders and investors to a Virtual Investor Conference on Tuesday, September 29th, 2026, at 11.00 am.
...
18/09/2026
DHD reports a high level of interest in its range of audio production equipment on all four days of the September 11-14 International Broadcasting Convention in...
18/09/2026
Sonnet Announces Thunderbolt 5 eGPU With 850-Watt Power Supply and Integrated Do...
18/09/2026
DeckBridge adds live Resolve playback and Fairlight controls to Stream Deck
Brie Clayton September 17, 2026
0 Comments
DeckBridge starting profiles ac...
18/09/2026
Learn to arrange tracks using Color With Live's Free Stencil Pack
Brie Clayton September 17, 2026
0 Comments
Stencils are Color With Live's or...
18/09/2026
Berklee Establishes Susan Tedeschi Scholarship in Honor of Grammy-Winning Alumna The scholarship is announced as Tedeschi returns to headline the Berklee Bloc...
18/09/2026
The inside scoop on attention-grabbing market assets from those in the know 17 September 2026
(L-R): Sophie Green, Todd Brown and Edwina Waddy
Find this episo...
18/09/2026
Friday 18 September 2026
The new iPhone 18 Pro, iPhone 18 Pro Max, Apple Watch ...
18/09/2026
Senior Colorist Siggy Ferstl of Company 3 has been grading The Boys since the sh...
17/09/2026
Lions vs. Bills will also be the first regular-season game at new Highmark Stadi...
17/09/2026
Teradek has announced Bolt 7, a wireless video and data system that adds an integrated 900MHz radio to the Bolt's zero-delay video pipeline. The 900MHz chan...
17/09/2026
DAZN has announced three appointments to its executive leadership team, all reporting to CEO Shay Segev effective immediately.
Patrick Delany has been appointe...
17/09/2026
Monumental Sports and Entertainment (MSE) has announced a leadership restructuring. Zach Leonsis has been named President and Vice Chairman, a newly created pos...
17/09/2026
CP Communications has been named Best of Florida for Audio-Visual Services, and its subsidiary Red House Streaming has been named Best Movie and Recording Studi...
17/09/2026
Scripps Sports and ION have announced a broadcast partnership for the Shriners Children's East-West Bowl, the nation's oldest college all-star football ...
17/09/2026
The 17th annual espnW: Women + Sports Summit, presented by Toyota, will take place October 14-16 at the Ojai Valley Inn in Ojai, California, with virtual attend...
17/09/2026
The Professional Audio Manufacturers Alliance (PAMA) and Shure Incorporated have...
17/09/2026
Lithuanian broadcaster LNK Group has completed a migration of playout and media management for its five national television networks - LNK, BTV, TV1, InfoTV, an...
17/09/2026
Net Insight has announced a pan-Asian live media network created with its regional partners, giving broadcasters, production companies, and media service provid...
17/09/2026
After a high school football injury, the Orlando native found a new path in video production, gaining experience on ESPN college football broadcasts, Tampa Bay ...
17/09/2026
Popular DAW gains free pitch-correction tool
Image-Line have teamed up with Antares to kit their popular DAW software out with a built-in pitch-correction p...
17/09/2026
Promises unprecedented realism, dynamic nuance and clarity
Gibson have teamed up with acoustic pickup experts Baggs, creating a next-generation' pickup...