
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...
30/09/2026
Drawn to the many moving pieces of a live broadcast, this Los Angeles native is building a path in production management and technical operations...
30/09/2026
TNT Sports goes big for its season opener in Philadelphia, and REMI workflows at Techwood will again anchor much of regular-season production...
30/09/2026
Qvest has appointed Katlyn Alexander as CEO of Qvest in North America, effective August 16, 2026. Alexander, who previously served as COO of Qvest US, succeeds ...
30/09/2026
The American Association of Professional Baseball (AAPB) has wrapped its 2026 season, with leaguewide attendance surpassing 1.4 million for the fifth consecutiv...
30/09/2026
Veritone has announced a multi-year content licensing agreement with ATP Media, the broadcast production and distribution arm of the ATP Tour, making ATP's ...
30/09/2026
Netflix has announced it will become the exclusive home for WWE programming in Japan beginning October 1, 2026. The lineup includes Raw, SmackDown, NXT, Premium...
30/09/2026
SES and Sky have announced a new multi-year agreement for direct-to-home satellite services across the United Kingdom and Republic of Ireland, running into the ...
30/09/2026
Big Blue Marble has announced the addition of live multiview channels to its Clo...
30/09/2026
The NHRA has announced multi-year media rights agreements with FOX Sports, The C...
30/09/2026
FOX 5 Atlanta (WAGA-TV) will carry Nashville Predators games during the 2026-27 season as part of Scripps Sports' regional broadcast network for the team. G...
30/09/2026
AI was a big buzz on the IBC show floor but there weren't a ton of companies...
30/09/2026
The PGA TOUR has announced the appointment ofRyan Holcomb as Senior Vice President and Head of Original Content, according to The Hollywood Reporter. Holcomb wi...
30/09/2026
The sound will be more immersive, with improved design and more mikes on the ice and the players
The National Hockey League's season opener on Tuesday nigh...
30/09/2026
TNT Sports is dropping the puck on the 2026-27 NHL season in a big way in Philad...
30/09/2026
The International Swimming League ( ISL ) today announced the appointment of Gravity Media, global leader in live production and content and media services and ...
30/09/2026
By Ramona Flume
One of the most exciting things about the Sundance Film Festiva...
30/09/2026
Add an envelope generator to any plug-in
Sync Audio's latest creation is a handy utility plug-in that can be used to combine and modulate other effects ...
30/09/2026
All-analogue tape-style drive joins Series A
Strymon's reputation was built on their digital knowhow, so many were surprised (and intrigued) when they a...
30/09/2026
Two new expansion packs released
Sonuscore have just introduced two new expansion packs for The Pulse, its production engine instrument for modern cinematic...
30/09/2026
eds3_5_jq(document).ready(function($) { $(#eds_sliderM519).chameleonSlider_2_1({...
30/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
30/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
30/09/2026
The An Evening with Emerson, Lake and Palmer tour brings one of rock's most iconic bands back to the stage. These performances seamlessly blend live foota...
30/09/2026
Schibsted Media, one of Norways largest and most influential digital media publishers and content producers, has invested in mixers and digital signal processor...
30/09/2026
Big Blue Marble announces the addition of live multiview channels to Cloud Video Kit, its broadcast-grade video processing platform. The feature is powered by A...
30/09/2026
Leading video software provider Synamedia today announced that Telekom Slovenije, Slovenia's largest provider of telecommunications and TV services, is open...
30/09/2026
PODCAST EXPO 2026 Recorded Using Blackmagic Design Workflow
Brie Clayton September 29, 2026
0 Comments
Conference featuring 24 sessions over two days ...
30/09/2026
IBC2026 Show Report
David Kirk September 29, 2026
0 Comments
The International Broadcasting Convention has long been Europe's equivalent of the US...
30/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
30/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
30/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
30/09/2026
Mavis has launched Mavis Camera 8.2, the latest release of its professional camera app for the iPhone and iPad. This update brings support for iPhone 18 Pro and...
30/09/2026
September 30th, 2026
TRIBECA FESTIVAL ANNOUNCES 2027 DATES AND CALLS FOR SUBMISSIONS
Following a Record Box Office Year, the 26th Edition, Presented by OKX,...
30/09/2026
New Solution Expands Harmonic's Network Intelligence Portfolio and Brings Comcast-Developed Fiber Monitoring Technology to Broadband Operators, Providing Re...
30/09/2026
Thank you to Film-TV Video for the original article - you can view it here
It was early 1983. I had just turned 21 when I joined Hitachi Denshi's European...
30/09/2026
How to Shop Well Now starts Monday at 9.35pm
on RT One and RT Player
On the...
30/09/2026
Building on nearly a decade of co-engineering, CoreWeave has built NVIDIA compute, networking and software into a cloud purpose-built for AI that's still re...
29/09/2026
Oak View Group (OVG) has announced Cisco as an Official Technology Partner, with plans to standardize infrastructure across its venue network on Cisco solutions...
29/09/2026
SportsNet Pittsburgh (SNP) won three honors at the 2026 Mid-Atlantic Emmy Awards.
Program awards went to Bucs BP in the Sports Program Live category (produced ...
29/09/2026
The Professional Women's Hockey League has announced home openers for all 12 teams for the 2026-27 season, along with a broadcast partnership with CBC under...
29/09/2026
Manifold technologies has been recognized as a contributor to the Media eXchange...
29/09/2026
FuboTV has announced My Local Sports, allowing subscribers in select markets to add their local regional sports network (RSN) as an add-on to a Fubo Sports subs...
29/09/2026
Asian News International (ANI), a wire agency and video news provider based in India, has deployed Grass Valley's AMPP Media Operating System and Framelight...
29/09/2026
South African Broadcasting Corporation (SABC) has deployed Ikegami UHK-X600 cameras as part of an upgrade to IP-based production infrastructure. The deployment ...
29/09/2026
REMI, REMCO models will drive the bulk of the broadcaster's NHL productions ...
29/09/2026
Three years in, the facility is supporting more centralized race production, com...
29/09/2026
NBC, Peacock, and NBSN are carrying all four Wild Card series with a production ...