
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...
25/06/2026
Launching a Career in Broadcast Engineering: Academic Paths and Essential Certif...
25/06/2026
This superstar shooter/storyteller from Central Indiana hopes to make his mark in the blossoming sports-documentary and -features space
In the live-sports-vid...
25/06/2026
Presidio and the National Hockey League have announced a multiyear renewal of their North American partnership. Presidio will remain an Official Technology Inno...
25/06/2026
Strike Fighter League (SFL) is the world's first professional air combat digital sport that combines elite human performance and physical immersion with cut...
25/06/2026
Rise, the award-winning advocacy group for gender diversity in the broadcast and media technology sector, is pleased to announce the global mentoring cohort for...
25/06/2026
The 2026 American Association of Professional Baseball (AAPB) All-Star Game will...
25/06/2026
Mediaproxy has named Heartland Video Systems (HVS) as its exclusive partner for US television broadcasting. The Wisconsin-based systems integrator will represen...
25/06/2026
Backblaze has formed an agreement with CoreWeave to create The Essential Cloud for AI.
Under the multi-exabyte, $335 million agreement, Backblaze will provide...
25/06/2026
Clear-Com has announced the successful deployment and testing of FreeSpeak Cell by RTL Deutschland during a live event production at the N rburgring race circui...
25/06/2026
Mobile TV Group (MTVG) has announced the launch of the MTVG Production Platform,...
25/06/2026
Sony Pictures Entertainment (SPE) has announced a $100 million strategic investment in Cosm as lead investor in the company's Series C financing round, acqu...
25/06/2026
FOX Sports and Concacaf have announced a multi-year media rights agreement making FOX Sports the U.S. English-language home of the Concacaf Gold Cup and Concaca...
25/06/2026
Daktronics and Grass Valley have received the rAVe Pubs Best Solution for Large ...
25/06/2026
Six free workshops across two days
Global music education platform Music Production for Women (MPW), have just announced a brand new and highly anticipated ...
25/06/2026
Popular pedalboard PSU gets an upgrade
The DC7 v2 is a new and improved version of CIOKS' renowned effects pedal PSU, and is said to be the thinnest, mo...
25/06/2026
Optimised for lush, enveloping sounds
Described as an instantly rewarding reverb , the latest addition to Arturia's range of creative effects plug-ins ...
25/06/2026
27 June 2026, Westminster University Harrow Campus
GearExpo UK is now upon us, with just two days to go until 150 of the worlds top pro-audio brands and ind...
25/06/2026
The Name You Know, The Lineup You'll Love - SBS2 Returns
25 June, 2026
Media releases
SBS Viceland rebrands as SBS2 on Friday 21 August, bringing the c...
25/06/2026
Cable Gains Share for Second Consecutive Month in Six-Month-High Finish, Boosted...
25/06/2026
alt= data-nectar-img-srcset=https://www.antonbauer.com/wp-content/uploads/2026/0...
25/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/06/2026
The Eurovision Song Contest 2026 in Vienna was a significant success for the Austrian public broadcaster ORF. In Austria, more than 1.5 million viewers tuned in...
25/06/2026
Wisycom has further strengthened its ecosystem of professional wireless solutions with the MPR60 Wideband IEM/IFB Receiver with expanded multichannel IFB mode, ...
25/06/2026
Ease Live, the interactivity expert, today announced that its graphics overlay platform is powering a new interactive experience on Rally.TV, the official video...
25/06/2026
VFX History: the origin of After Effects
Graham Quince June 25, 2026
0 Comments
Before it was Adobe, it was CoSA. This is the VFX history of Adobe Aft...
25/06/2026
Creative Remote, the provider of remote and hybrid offline editing infrastructure, today announced the opening of 41, its new offline edit facility located at 4...
25/06/2026
Rise, the award-winning advocacy group for gender diversity in the broadcast and media technology sector, is pleased to announce the global mentoring cohort for...
25/06/2026
Emergent, a pioneer in browser-based, AI-enhanced content production environments, today announced a strategic partnership with ROCKET, a premier media-centric ...
25/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/06/2026
Thursday 25 June 2026
Read all about it! The Paper will return for a second sea...
25/06/2026
Thursday 25 June 2026
How to watch the 2026/27 EFL season on Sky Sports
Which EFL matches are Sky Sports showing on the 2026/27 opening weekend?
Sky Sports w...
25/06/2026
Summer savings are heating up. From the Steam Summer Sale to GeForce NOW membership discounts, this week's GFN Thursday delivers double the deals and more w...
25/06/2026
Launching today (Thursday 25 June), new RT podcast Ramble with Joe McGucken is a series of curiosity-driven conversations where actor, writer and comedian Joe ...
25/06/2026
Immune molecule may drive excessive drinking in alcohol use disorder Scripps Research scientists showed that blocking an immune molecule tied to inflammation r...
24/06/2026
Plus: VoiceAssist Basic now available to UA LUNA users
NoiseWorks Audio have just released an update that adds a new Mouth De-Click module to the Advanced t...
24/06/2026
New heavy-duty mic stand joins range
The latest arrival to Gator's Frameworks family introduces a new heavy-duty boom stand that's been designed for...
24/06/2026
Latest major plug-in update goes live
Waves have just announced that the latest major update for their hugely popular plug-in range is now officially availa...
24/06/2026
When assessing cellular coverage, many people look at the signal bars displayed on a smartphone, router or modem. More bars are often assumed to mean better per...
24/06/2026
Rohde & Schwarz THORIS sets new standard for counter UAS defense At Eurosatory 2026, Rohde & Schwarz is unveiling THORIS, a German engineered, sovereign count...
24/06/2026
Rohde & Schwarz expands voice communications modernization program for Egyptian ...
24/06/2026
eds3_5_jq(document).ready(function($) { $(#eds_sliderM519).chameleonSlider_2_1({...
24/06/2026
Streaming sets record high of 46.6% of ad supported TV viewing, driven by Super Bowl and Winter Olympics; overall share of ad supported TV remains steady
NEW Y...
24/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...