
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...
31/07/2026
With an emphasis on local, the league is looking beyond the initial four teams t...
31/07/2026
The 2026 Sundance Institute Directors Lab fellows in Estes Park, Colorado (Photo by Gabe Rovick)
Dear Friends,
This has been an extraordinary year for our ar...
31/07/2026
Offers 360-degree sound placement in any DAW
Audiocube have just announced the launch of a new plug-in that embeds a complete 3D acoustic environment inside...
31/07/2026
10 new Chinese C-Pop voices introduced
While Sonarworks are best known to many for their room-correction software, their product range also includes an inno...
31/07/2026
Reimagines the vintage BBD sound character
PSPaudioware have now officially launched the new delay plug-in that they were previewing at GearExpo UK. Said to...
31/07/2026
The Savannah Bananas has built its reputation on refusing to play baseball by traditional rules, and the team's production arm Banana Ball TV (BTV) has draf...
31/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
31/07/2026
SMPTE, the home for media professionals, technologists and engineers, today opened early registration for the 2026 Media Technology Summit (MTS) and announced i...
31/07/2026
Clear-Com announced that Central Christian Church has transformed communication across its live production operations by implementing Clear-Com's LQ Seri...
31/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
31/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
31/07/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
31/07/2026
IBC has unveiled the finalists for the IBC2026 Innovation Awards, recognising collaborative projects from around the world that solve real-world challenges and ...
31/07/2026
From focus puller to colourist
Caroline Shawley July 30, 2026
0 Comments
Ana Mar a Ormaza shares her story of instinct, storytelling and finding a cre...
31/07/2026
Amazon Prime Documentary Andata e Ritorno Relies on Blackmagic Design
Brie Clayton July 30, 2026
0 Comments
DaVinci Resolve Studio and Blackmagic Clou...
31/07/2026
Krotos Launches Video to Sound Plugin for DaVinci Resolve
Brie Clayton July 30, 2026
0 Comments
AI-assisted workflow helps editors add synchronized, p...
31/07/2026
Luxembourg, July 31, 2026 - Pursuant to the liquidity contract entered into by SES with BNP Paribas as of 7 April 2026, please see the below update on the progr...
31/07/2026
Luxembourg, July 31, 2026 - SES today published a restatement of its FY2025 EU Taxonomy (Article 8) disclosure. The restatement updates the FY2025 EU Taxonomy d...
31/07/2026
RT Commercial has today announced Mercedes-Benz Ireland will return as the offi...
31/07/2026
RT Supporting the Arts is delighted to spotlight a diverse range of arts, culture and heritage events taking place across Ireland this August. From major festi...
30/07/2026
CP Communications provided RF audio, RF video, communications, RF coordination, ...
30/07/2026
OpenDrives has been included in CRN's 2026 Storage 100 list in the Software-Defined Storage category. The annual list, selected by the CRN editorial team, r...
30/07/2026
LATAM Airlines has selected SES to provide multi-orbit inflight connectivity to its fleet of Airbus and Embraer aircraft. More than 60 aircraft - including Airb...
30/07/2026
Tagboard has launched the Producer API, an open interface that allows key commands in Tagboard's live production environment to be triggered from external d...
30/07/2026
FOX Sports and the New York Racing Association (NYRA) have announced a multi-year agreement with Del Mar Thoroughbred Club that will make FOX Sports the exclusi...
30/07/2026
ABC Commercial has launched four free ad-supported streaming television (FAST) channels on LG Smart TVs across North America, Great Britain, and select countrie...
30/07/2026
The Six Kings Slam exhibition tennis tournament will return to Riyadh on October 21, 22, and 24, streaming live on Netflix at no additional cost to subscribers....
30/07/2026
Central Christian Church in Mt. Vernon, Illinois has deployed Clear-Com's LQ...
30/07/2026
Blackmagic Design has released the UltraStudio Express 3G family, a pair of USB4 capture and playback devices compatible with Mac, Windows, and Linux computers ...
30/07/2026
ESPN has reached a media rights agreement with the Women's Pro Baseball League (WPBL), making ESPN the national streaming home of the league's 2026 seas...
30/07/2026
Most Valuable Promotions (MVP) and the Professional Fighters League (PFL) have announced a merger that will operate under the MVP banner. PFL CEO John Martin wi...
30/07/2026
The Columbus Blue Jackets will simulcast all game broadcasts across television and radio beginning with the 2026-27 NHL season. Under the new format, the televi...
30/07/2026
TMRW Sports has selected Populous as architect for a purpose-built stadium for its professional flag football league, being developed in partnership with the NF...
30/07/2026
SiriusXM has announced SiriusXM Sports Pass, a new subscription plan launching September 1 that bundles the company's sports audio programming into a single...
30/07/2026
Leagues, broadcasters, and technologists gather to tackle cloud economics, distr...
30/07/2026
A major player in the cloud-based solutions, Amazon Web Services (AWS) has conti...
30/07/2026
The NBA will provide production for all local game broadcasts, including pregame and postgame coverage...
30/07/2026
Cosm will open its fourth immersive sports and entertainment venue in downtown Detroit on September 10. Located at 25 Cadillac Square, adjacent to Campus Martiu...
30/07/2026
NFL Network will be available on the ESPN App beginning July 30 for Unlimited plan subscribers. The addition brings NFL Network's live games, studio program...
30/07/2026
NEP Group has added Riedel's SimplyLive Production Suite to NEP Platform, giving customers access to the live production software through NEP's orchestr...
30/07/2026
LOS ANGELES, CA, July 30, 2026 - The nonprofit Sundance Institute today announce...
30/07/2026
A new take on classic algorithmic reverbs
Waves have just introduced a new flagship algorithmic reverb plug-in that offers the company's take on the ico...
30/07/2026
Save up to 30% on virtual instruments & plug-ins
Arturia have recently launched their annual Summer Sale, which sees discounts of up to 30% applied across a...
30/07/2026
ActiveAnalogue technology powers new flagship modular console
A year on from the launch of the Oracle, SSL have revealed a new flagship console which they s...
30/07/2026
Up to 22dBA of passive attenuation
The latest arrival to the beyerdynamic range introduces a new compact monitoring headphone that's been designed to ta...
30/07/2026
As part of its traditional graduation ceremony, SGL Carbon honored the achievements of a total of twelve young professionals who successfully completed their ap...