
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...
08/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
08/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
08/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
08/10/2026
Marshall Electronics, a globally recognized provider of high-performance video solutions for broadcast, streaming, AV and professional production, will exhibit ...
07/10/2026
New all-in-one scoring package incoming
EastWest's latest release brings together an eclectic mix of sampled instruments in an attempt to provide compos...
07/10/2026
Granular process features graph-based sequencer
The latest addition to Baby Audio's ever-expanding collection of plug-ins is a new time-bending effect b...
07/10/2026
Iconic inventor & designer passes away
Mike Beigel, the inventor and designer who co-founded Musitronics, has sadly passed away aged 79. Mike was responsibl...
07/10/2026
Combines filtering & wavefolding
Kreuzberg Audio have recently introduced a plug-in that combines filtering and wavefolding in a way that allows the two pro...
07/10/2026
Recreates the ultra-rare Gleeman Pentaphonic
Cherry Audio's latest soft synth faithfully recreates the Gleeman Pentaphonic, a vintage synth that was kno...
07/10/2026
Statement on the passing of Richard Morecroft
7 October, 2026
Media releases
Statement by SBS Managing Director, Jane Palfreyman
SBS is deeply saddened...
07/10/2026
The National Film and Video Foundation (NFVF) is pleased to announce the extensi...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Sacramento Production Services has completed a major wireless audio overhaul at Sutter Health Park, current home of the Athletics (A's) professional basebal...
07/10/2026
Cobalt Digital to Bring End-to-End ST 2110/IPMX Solutions and Practical Tools to...
07/10/2026
Sanbila Lets Video Editors Import Rushes From a WeTransfer Link and Edit Them Fr...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
UK-based broadcast engineer Andrew Kemp has chosen a dhd.audio SX2 and XS3 as the basis of a transportable media-training resource. With a quarter-century of ex...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
07/10/2026
Cobalt Digital to Bring End-to-End ST 2110/IPMX Solutions and Practical Tools to NAB Show New York
Highlights include complete path from SDI to IP, C-band tran...
07/10/2026
Deerstalker Pictures The Exorcism of Nixie Shot With Blackmagic Cameras
Brie Clayton October 6, 2026
0 Comments
Fantasy series relied on Blackmagic ca...
07/10/2026
Nevion announces Providius NVRT integration with eMerge switches for expanded br...
07/10/2026
DriveShelf - A Filmmaker's Mac App for Finding Footage on Unplugged Drives
Brie Clayton October 6, 2026
0 Comments
DriveShelf for Mac catalogs eve...
07/10/2026
COW Jobs: Cinematographer, Video Editor - Baltimore, MD
Brie Clayton October 7, 2026
0 Comments
Cinematographer / Video Editor
September 23, 2026 ...
07/10/2026
Behind the Scenes at Berklee Homecoming 2026 Follow Marley Striem BM '25 behind the scenes as she manages a team of students and liaises with artists duri...
07/10/2026
Berklee College of Music and Berklee Valencia Named to Billboards 2026 List of T...
07/10/2026
At a Microsoft event in San Francisco on Wednesday, Jensen Huang and Satya Nadel...
07/10/2026
The six-part series will launch on free-streaming service U in 2027.
A set of first look images have been released for The Cadburys (6x60'), the upcoming s...
07/10/2026
Wednesday 7 October 2026
Sky Sports to broadcast England's ODI tri-series a...
07/10/2026
When the EBU and AMWA launched the Joint Task Force on the Dynamic Media Facility (JT-DMF) at IBC2025, the DMF was largely a concept. Twelve months on, the conv...
07/10/2026
Even the Digital Government Needs a Plan B
AFCEA study National Security Ecosystem 2030 presented at the Bonn IT Dialogue. Arvato Systems / AFCEA Bonn e. ...
07/10/2026
This development extends certification beyond individual Retail Media Networks a...
07/10/2026
RT has been informed that, as stated in Budget 2027, the Government has made the decision to cut the agreed public funding of RT by 20 million for 2027.
In ...
07/10/2026
Undercover filming shows add-on treatments with potential safety concerns on sal...
07/10/2026
Join Emma Doran, Justine Stafford, Killian Sundermann, Se n Burke and Michael Fry on RT 2 and RT Player tomorrow at 10.30pm
A host of guest stars include Siob...
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/10/2026
A response to Mark Turner and the SVG AI Innovation Lab
SVG AI Innovation Lab Program Director Mark Turner's How Broadcast Sports Can Apply the Newsroom S...
06/10/2026
Cobalt Digital will exhibit at NAB Show New York 2026 (Booth 226, Javits Center, October 21-22), demonstrating its ST 2110/IPMX product line alongside solutions...