
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 ...
01/12/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
01/12/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , er...
01/12/2026
New integration connects Blue Lucys rights-aware content management platform with Moments Lab's AI platform, so teams can find, compile and publish archive ...
01/12/2026
LA JOLLA, CA-One cheap and reliable, albeit stinky tool has become an increasing...
01/12/2026
Beam Dynamics Introduces MCP for Faster, Smarter Technology Operations
Brie Clayton November 30, 2026
0 Comments
Beam Dynamics has introduced new Model ...
01/12/2026
Multi Platform Healthcare Campaign Captured on URSA Cine 12K LF
Brie Clayton November 30, 2026
0 Comments
Craftshow Digital completes Singing River He...
01/12/2026
Gravity Media acquires MOOV to expand broadcast graphics and virtual production ...
01/12/2026
OZ Racing's Rally Legend Shot on URSA Cine 12K LF and PYXIS 12K
Brie Clayton November 30, 2026
0 Comments
From rugged mountain trails to high spee...
30/11/2026
MASV, the global file transfer platform built for teams moving massive content a...
30/11/2026
Free registration for THE SVG SUMMIT closes on Dec. 1 at 5 p.m. ET, so don't miss out! After the deadline, tickets will cost $150 to attend the event. CLICK...
30/11/2026
ABY & Pro amp switcher models introduced
Guitar power supply and switching experts Voodoo Lab have just revealed two products that build on the foundations ...
30/11/2026
New eight-bit digital VCO announced
ALM/Busy Circuits' latest Eurorack module combines the immediacy of an analogue VCO with the flexibility of digital ...
30/11/2026
Audio inputs, backing playback, PDF support & more
In the April 2026 issue, we ran a review on StageBox, a handy macOS and Windows application designed to h...
30/11/2026
Combination creates a leading independent media intelligence platform across all workflows and channels.
New York, NY - November 30, 2026 - Nielsen Holdings ( ...
30/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , er...
30/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
30/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
30/11/2026
DPA Microphones is proud to announce that two of its innovative audio solutions have been named as finalists in the 2027 NAMM TEC Awards. This includes the 4097...
30/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
30/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
30/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
30/11/2026
For Lightware, 2026 has been a year of continued progress, marked by significant developments across its connectivity and control portfolio. Alongside advancing...
30/11/2026
Hiltron Communications reports a successful Space Tech Expo Europe 2026, held from Tuesday 17 through Thursday 19 November across five halls of the Messe Bremen...
30/11/2026
Calrec will be located at Stand 4P800.
Broadcast and Pro AV united
ISE 2027's theme, When Worlds Unite, reflects Calrecs own approach. Stadiums, univers...
30/11/2026
CGI (TSX: GIB.A) (NYSE: GIB), one of the largest independent IT and business consulting services firms in the world, today launched OpenMedia Evolve, the next g...
30/11/2026
Monday 30 November 2026
Dan Borrelli joins Sky as Head of YouTube
Sky has appointed Dan Borrelli as Head of YouTube for Sky Entertainment Group, in a newly cr...
30/11/2026
Monday 30 November 2026
Sky News launches Ask Sky News, a new way to search and explore the news
AI-powered feature lets audiences ask questions, get answers ...
30/11/2026
RedNet TNX delivers mission-critical redundancy for Chicago-based live sound eng...
30/11/2026
CUPERTINO, CALIFORNIA Apple today announced an all-new (RED) collection - includ...
30/11/2026
Apple Music today debuted Replay '26, a redesigned look back at the year in ...
30/11/2026
Today, Apple Podcasts unveiled the most popular podcasts of 2026, celebrating th...
30/11/2026
Launching the first of three Christmas content announcements this week, RT is s...
29/11/2026
Combines compression, saturation & EQ
Said to be the easiest way to turn your sound all the way to 11 , fedDSP's latest release brings together compres...
29/11/2026
New Life for the Original Symphony I/O: An Independent Software Project With Apogee's cooperation, an independent developer is helping bring the original Sy...
28/11/2026
Cubase & FL Studio integration improved
Melbourne Instruments have just released the latest update for their motorised MIDI controller, adding Cubase and FL...
28/11/2026
Apogee Holiday Sale 2026: Major Savings + Up to 20 Free Plugins
November 2 - December 31, 2026 Apogee's 2026 holiday sale brings special US pricing to s...
27/11/2026
First plug-ins in latest partnership range
KIT Plugins have just announced the launch of the first two plug-ins to be created in partnership with Detroit-ba...
27/11/2026
Three new plug-ins added to collection
Sound Radix's flagship plug-in bundle has just received its biggest update yet, with Powair 2, Mute matic Studio ...
27/11/2026
RT has announced the professional dancer line-up for the upcoming tenth season ...
27/11/2026
RT is today publishing the statistical summary of RT 's Register of External Activities for the first quarter of 2026. This includes external activities fo...
26/11/2026
Mic, shockmount & pop shield bundle announced
Aim Audio have just introduced a new hardware bundle that combines their cardioid condenser mic with a shockmo...
26/11/2026
Turn any audio input into shimmering clouds
Pine DSP have just introduced a new granular effect that can run as a standalone plug-in, or as a module withi...
26/11/2026
Now supports user-created Knob FX
Akai's portable MPC has just received a firmware update that introduces a range of user-requested features and tackles...
26/11/2026
Shop the best deals this weekend
Sale season is upon us and to help SOS readers cut through all the noise, weve done the legwork for you and rounded up some...
26/11/2026
Maxon Cyber Sale - Buy Any Annual Plan, Get Maxon Plus Starter Free For a Month
Brie Clayton November 25, 2026
0 Comments
Every annual plan, from Cine...
26/11/2026
Deals on Matthews Studio Equipment Select Gear for Black Friday - now thru 11/30
Brie Clayton November 25, 2026
0 Comments
Black Friday: Stands & Clam...
26/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
26/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
26/11/2026
There may be no consensus in the negotiating room. There is no ambiguity in the science, said UN Secretary-General Ant nio Guterres reacting to the lack of con...