
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...
28/09/2026
The NHL has announced Adobe as an Official Creative, Marketing and AI Partner beginning with the 2026-27 season. The partnership will provide the league and its...
28/09/2026
MultiDyne will exhibit at CABSAT 2026 (October 5-7, Dubai Exhibition Centre), showcasing an expanded technology portfolio following its June 2026 acquisition of...
28/09/2026
ARRI and HONOR have announced the HONOR Magic9 Pro Max, a flagship smartphone carrying ARRI branding on the device and packaging as the first product-level expr...
28/09/2026
Net Insight has added the Nimbra 1020G to its pan-Asian live media trial network, giving customers and partners in the region a way to evaluate ST 2110 and JPEG...
28/09/2026
Vindral has been named a recipient of a 2026 Technology and Engineering Emmy Award by the National Academy of Television Arts and Sciences in the category of We...
28/09/2026
Interra Systems will exhibit at CABSAT 2026 (Stand B2-37, Dubai Exhibition Centre, October 5-7), demonstrating its BATON QC platform, ORION monitoring solutions...
28/09/2026
Two years into its new production facility, the TOUR is expanding centralized wo...
28/09/2026
In addition to rolling out a new mobile unit for ESPN's Monday Night Countd...
28/09/2026
Bleacher Report and WWE have announced a multi-year content partnership giving Bleacher Report global highlight rights across WWE's programming slate, inclu...
28/09/2026
Behind The Mic provides a roundup of recent news regarding on-air talent, includ...
28/09/2026
FuboTV has announced a multi-year distribution agreement with the NHL to carry four regional sports networks covering the Carolina Hurricanes, Columbus Blue Jac...
28/09/2026
Program Productions (PPI) has announced the appointment of Alan Ostfield as President and Chief Executive Officer, effective September 28, 2026. Ostfield succee...
28/09/2026
Director Josef Kubota Wladyka attends the premiere of Ha-Chan, Shake Your Booty! with the film's cast and crew at Eccles Theatre on January 22, 2026, in P...
28/09/2026
EQ plug-in can now be played via MIDI
Scaler Music have recently released a new and improved version of their patented musical EQ plug-in, kitting it out wi...
28/09/2026
New synth developed in collaboration with philterSoup
Boutique effects pedal and Eurorack manufacturer Animal Factory Amps have announced that the new compa...
28/09/2026
Rohde & Schwarz adds an integrated multi-channel pulse analysis option to its FS...
28/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
28/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
28/09/2026
Autoscript, the leading global provider of professional teleprompting solutions, today announced Voice Controller for WinPlus-IP, a new voice-controlled prompti...
28/09/2026
IBC 2026 Technical Conference Highlights
David Kirk September 28, 2026
0 Comments
Hero image courtesy Deposit Photos
David Kirk reports from the 11-1...
28/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
28/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
28/09/2026
Nakadi, a global streaming technology innovator dedicated to engineering a new era of digital media delivery, today announced its Live to Theater service based ...
28/09/2026
Monday 28 September 2026
Sky launches Full Fibre 1.6 Gbps for millions of homes
Sky has launched a new Full Fibre 1.6 Gbps product, rolling out from today, gi...
28/09/2026
Arvato Systems Highlights It's Role for Automotive Manufacturers and Suppliers
TISAX
Arvato Systems has successfully completed the TISAX Level 3 assess...
28/09/2026
Crimecall, presented by Carla O'Brien, returns tonight for a brand new series at 9.35pm on RT One and RT Player.
In tonight's episode, alongside appe...
28/09/2026
CELEBRATING 40 YEARS AT THE HEART OF NEW IRISH WRITING
LIVE FROM POETRY IRELAND, DUBLIN AND ON RT RADIO 1 FROM 7PM
DETAILS: www.rte.ie/writing | FOLLOW: #r...
27/09/2026
New compact pedal packs in 120 effects
The latest multi-effects pedal from Boss is a compact unit that promises to give any pedalboard a massive boost in s...
26/09/2026
With short turnaround between game selections, ESPN's operations team is pla...
26/09/2026
Prime Video will use GCV's Bird and Magic mobile units for its inaugural WNB...
26/09/2026
Studio show moves on-site as network models playoff coverage on its NBA flagship...
26/09/2026
Ratings Roundup is a rundown of recent ratings news and is derived from press re...
26/09/2026
Douglas Keeve attends the 2025 Sundance Film Festival screening of Unzipped at the Egyptian Theatre. (Photo by Andrew H. Walker/Shutterstock for Sundance Film...
26/09/2026
Launched alongside three new expansion packs
In celebration of their 30th anniversary, Native Instruments have released a major update for their Maschine 3 ...
26/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
26/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/09/2026
In-venue and creative video staffers at the professional and collegiate level ha...
25/09/2026
Infront has named Ronald den Hollander as CEO of its Host Broadcast Services (HBS) subsidiary, effective 1 October 2026. The appointment follows the previously ...
25/09/2026
The North American Broadcasters Association (NABA) will hold Cyber University 2.0, a full-day cybersecurity summit for the broadcast and media industries, on Tu...
25/09/2026
Alpha Networks and Ateme have delivered a joint video platform for the digital d...
25/09/2026
Encompass Digital Media has announced the migration of multiple Viaplay free-to-air channels - TV3, TV6, TV8, and TV10 - to its Altitude Scheduling platform. Al...
25/09/2026
NAB Show New York 2026 will take place October 21-22 at the Jacob K. Javits Convention Center in New York City. Registration is open at nabshow.com/newyork.
Th...
25/09/2026
NHL Network has announced its studio programming lineup for the 2026-27 regular ...
25/09/2026
Clear-Com has announced that First Baptist Nashville has upgraded its production communications with a Clear-Com intercom system as part of a sanctuary technolo...
25/09/2026
Broadcast Management Group (BMG) has deployed EVS XT-VIA live video production s...
25/09/2026
BBright, a Hexaglobe Group company, has announced that dotCentral has joined as a sales and support partner in the United States.
BBright's portfolio cover...
25/09/2026
MeyerPro delivered audio, video, broadcast, and LED production for the Acumatica Summit 2026 at the Seattle Convention Center's Summit Building, January 25-...