
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 ...
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...
04/07/2026
April 7 2026, 19:00 (PDT) Detective Conan: Fallen Angel of the Highway Opens in...
16/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/06/2026
Free Program Supports IPMX Education from Foundational Concepts Through System and Network Design
The Alliance for IP Media Solutions (AIMS) today announced t...
16/06/2026
Share your views on Screen Australia and the future of the industry 15 June 2026
Your feedback matters.
Following the instrumental insights provided in 2025,...
15/06/2026
One of the more exciting internal video production divisions within a college at...
15/06/2026
The deal valued at $22 Billion is expected to close in the first half of 2027...
15/06/2026
Golf Channel and the Arnold Palmer Cup have announced a partnership to livestream the 2026 Arnold Palmer Cup on Golf Channel Mobile and GolfChannel.com. The tou...
15/06/2026
TikTok and Panini have announced a partnership to bring a digital collectible ca...
15/06/2026
Cosm and Monster Energy have announced the debut of the first full-dome immersiv...
15/06/2026
Real American Freestyle (RAF) and Fox Nation have announced an exclusive streaming agreement for three RAF international events, beginning with RAF Georgia on J...
15/06/2026
FanConnect has announced a partnership with Extreme Networks integrating FanConn...
15/06/2026
Ten Emerging Filmmakers Ages 18 to 25 Will Start Fellowship Year at Ignite Lab from June 14-19
LOS ANGELES, CA, June 15, 2026 - The nonprofit Sundance Institut...
15/06/2026
Innovative three-band soft synth introduced
UVI's latest synth takes an interesting approach to synthesis, offering a trio of synth engines that each op...
15/06/2026
Applications now open for 2026
The Oram Awards have returned for 2026 to celebrate the unusual, unique and unfiltered creative worlds of women and gender-di...
15/06/2026
New intelligent auto-fader plug-in revealed
PSPaudioware's latest release offers automatic level adjustment and provides more detailed control than many...
15/06/2026
4.78M AUSSIES TUNE IN FOR SOCCEROOS WIN OVER T RK YE ON SBS
15 June, 2026
Media releases
Match had a Total TV average audience of 3.035 million, with over ...
15/06/2026
SBS Head of Commissioning John Godfrey to depart after 18 years
15 June, 2026
Media releases
SBS Head of Commissioning John Godfrey will depart the broadca...
15/06/2026
Greater Manchester Police installs Rohde & Schwarz security scanner for custody ...
15/06/2026
Insights from NAGRAVISION's latest industry webinar featuring One Hungary, Liberty Global and Media Press Group
In this blog, Laura Rognoni explores the k...
15/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
15/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
15/06/2026
Clear-Com has introduced Avalon , a purpose built 1RU IP intercom communication platform for modern networked production, designed to simplify and scale workfl...
15/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
15/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
15/06/2026
MiLB Club Deploys LDX 110 Cameras at CarMax Park to Deliver A New Standard in Engaging Fan Experience
Grass Valley today announced that the Richmond Flying Sq...
15/06/2026
Detach from Direct-Attached: How Remote Editing with EVO Keeps Creative Teams Mo...
15/06/2026
Techtel Completes Media Production Setup for a major AFL sporting organisation
Sports
15 June Written By Suzanne Costello
(Sydney, Australia 15 June 2026)...
15/06/2026
Monday 15 June 2026
Sky News takes viewers inside Minab in new film investigati...
15/06/2026
Fox Corporation to Acquire Roku, Inc. Combination Creates a Scaled Media and Technology Platform with Superior Reach, Engagement and Monetization Capability
...
14/06/2026
Library captures 1960s R&B/pop drum sound
Following on from their recent wave of plug-in effects, Iconic Instruments have just launched an all-new virtual d...
14/06/2026
HBO Comedy Rooster Shot with URSA Cine 17K 65
Brie Clayton June 14, 2026
0 Comments
Large format brings viewers intimately close to characters.
Black...
13/06/2026
Latest expansion pack includes 252 presets
Devious Machines have recently introduced another expansion for their powerful multi-effects plug-in, Infiltrator...
13/06/2026
Create custom DAW/plug-in controllers using prompts
MetaGrid have recently introduced an all-new AI Builder function to their touchscreen-based control surf...
13/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
13/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
YES Network and The Gotham Sports App will air seven Athletes Unlimited Softball...
12/06/2026
The United Football League will host its FAST Innovation Suite at the 2026 United Bowl presented by Credit One Bank on Saturday, June 13 at 3:00 p.m. ET at Audi...
12/06/2026
PTZOptics and LayerJot will present live demonstrations at InfoComm 2026 showing how natural-language AI prompting, robotic camera control, and on-device comput...
12/06/2026
MultiDyne Video and Fiber Optic Systems will exhibit at InfoComm 2026, featuring...
12/06/2026
Ateme has announced that Eurovision Services is using Ateme's software-based frame-rate conversion technology for international live event workflows. The de...
12/06/2026
Bitmovin and Simplestream have announced a partnership with Xperi to simplify the launch of OTT streaming services on TiVo OS smart TVs and devices. The collabo...
12/06/2026
Net Insight has announced that a multinational technology company is deploying a...
12/06/2026
MLB Players Inc., the business arm of the MLB Players Association, has announced a partnership with Athletes First to develop and sell brand partnerships across...
12/06/2026
Guntermann and Drunck (G&D) and VuWall have announced the CommandKeyboard-Advanc...
12/06/2026
Comcast Smart Solutions announces a new smart technology deployment with Major L...
12/06/2026
Elevation Worship completed the initial leg of its Elevation Nights 2026 tour ...