
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...
10/09/2026
Duff Foreman is an AI-generated announcer who will add color to this month's New Mexico Open...
10/09/2026
Bitmovin is rolling out Encoder Version 3, the next major release of the technology behind its VOD and Live Encoders. Version 3 is built on a premise every stre...
10/09/2026
At IBC2026, on booth 1.B47, Net Insight will showcase Open Live Media, its architecture for delivering resilient live media services across networks, partners, ...
10/09/2026
The Professional Women's Hockey League (PWHL) and Scripps Sports have announced a national broadcast rights agreement for the 2026-27 season, a landmark par...
10/09/2026
The Trusted Partner Network (TPN), the global content security initiative powere...
10/09/2026
The NFL is launching its most expansive creator programming yet, bringing togeth...
10/09/2026
Sportsnet is set to deliver its biggest hockey season ever with a national sched...
10/09/2026
LiveU is now a Clarus Integrated Reseller, bringing Starlink's fast, reliabl...
10/09/2026
Mimir is the cloud-native media production platform built for teams that need to move media fast across live, archive, web, social, and broadcast workflows. At ...
10/09/2026
ATSC is being honored with a 2026 Technology & Engineering Emmy Award by the Nat...
10/09/2026
Audio-Technica has introduced the BP880R Contact Transducer, a specialized micro...
10/09/2026
TMRW Sports in partnership with the LPGA, today announced multiyear U.S. media rights agreements with ESPN and Scripps Sports/ION to bring WTGL, the new women...
10/09/2026
SportsNet Pittsburgh (SNP) in partnership with Major League Baseball and the Pit...
10/09/2026
Tennis Channel announced today its launch as a Premium Subscription on The Roku Channel.
Tennis Channel offers viewers a single home for Tennis Channel and Ten...
10/09/2026
Dolby has announced major updates to Dolby OptiView, its live sports platform, ahead of IBC 2026. The updates include new AI-powered intelligence to better unde...
10/09/2026
Dalet has appointed Brian Doheny as CEO. Doheny joined Dalet as President and Chief Revenue Officer in April 2026. Since joining Dalet, Doheny has led the compa...
10/09/2026
Sony, as well as its partner company Nevion, is starting IBC 2026 with a handful of announcements for attendees to see on the show floor.
Sony Announces the 4t...
10/09/2026
The six-year-old venue is expanding capabilities for NFL action, Super Bowl LXI, 2028 Summer Olympics
SoFi Stadium, as well as the surrounding area known as Ho...
10/09/2026
Editing, restoration & mastering suite upgraded Acon Digital Acoustica 8 audio editing restoration mastering software.
Acon Digital have just launched the la...
10/09/2026
Classic synths & drum machines available to play
Based in Reading, UK, Readipop are a music and arts charity with a long track record of innovative, partici...
10/09/2026
Popular model updated & new addition introduced
With many of the models in Neumann's KH family now boasting onboard DSP and support for the company'...
10/09/2026
Improved desktop interface announced
The latest iteration of Arturia's flagship desktop audio interface has just arrived, introducing improved preamps, ...
10/09/2026
Progress needs proof: Rohde & Schwarz showcases its trailblazing test solutions ...
10/09/2026
France launch follows UK and Germany as Nielsen expands product across EMEA
Paris, France, September 10, 2026 - Nielsen, a global leader in audience measuremen...
10/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
10/09/2026
Leading professional audio manufacturers NUGEN Audio, RTW, Steinberg and Telos Alliance have joined forces with Fraunhofer IDMT to establish a common approach t...
10/09/2026
Built Into Setplex's Zapflex Platform, AI Insider Turns Video Service Data Into Actionable Insights
Setplex today introduced AI Insider, a breakthrough new...
10/09/2026
Managed service changes dialogue without actor-specific training or facial rigging while preserving the original performance and fitting established post-produc...
10/09/2026
The ACT Entertainment tvONE and Green Hippo Pixel Academy has released its autumn course schedule, with hands-on training dates in September, October and Novemb...
10/09/2026
Orange Polska continues to Rely on Viaccess-Orca for Secure TV Services and the Next Phase of its Technology Evolution
Viaccess-Orca (VO), a global leader in T...
10/09/2026
Generate and create directly in your timeline with new AI-powered innovations in...
10/09/2026
Tedial is introducing Media Business Hub (MBH) at IBC 2026, a new business enablement platform designed to help media organizations unlock the full value of the...
10/09/2026
Globecast, a leading provider of broadcast, media and entertainment managed services, will unveil the next phase of its transformation at IBC2026 with a preview...
10/09/2026
Fabric Data and TMT Insights today announced that the two companies are combining to create Fabric Insights, uniting authoritative data, purpose-built software,...
10/09/2026
Operative, the preferred advertising and broadcast management provider for the world's leading media brands, today announced a comprehensive slate of new pr...
10/09/2026
Test & measurement innovator, Leader Electronics of Europe, has announced the launch of its latest range of handheld signal generation, analysis and monitoring ...
10/09/2026
The partnership begins with native Zixi protocol support on the Kiloview D350 and will extend to deeper product integration and joint go-to-market initiatives
...
10/09/2026
Avid and FilmLight announce strategic partnership to reimagine the color pipelin...
10/09/2026
Maxon Brings Exclusive Preview of Fall Innovations to IBC2026
Brie Clayton September 10, 2026
0 Comments
IBC attendees will get the first look at new ...
10/09/2026
Puget Systems Launches Built Different by Puget Systems, A New Podcast That Go...
10/09/2026
Three Boston Conservatory Dance Alums Honored for Their Early-Career Promise India Hobbs and Demetrius Lee received Princess Grace Awards, while Lilly David t...
10/09/2026
MonoNeon Returns to Berklee to Kick Off Signature Series The Grammy-winning bassist and alumnus performs with students and faculty from the Planet MicroJam In...
10/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
10/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
10/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
10/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
10/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...