
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...
29/09/2026
Oak View Group (OVG) has announced Cisco as an Official Technology Partner, with plans to standardize infrastructure across its venue network on Cisco solutions...
29/09/2026
SportsNet Pittsburgh (SNP) won three honors at the 2026 Mid-Atlantic Emmy Awards.
Program awards went to Bucs BP in the Sports Program Live category (produced ...
29/09/2026
The Professional Women's Hockey League has announced home openers for all 12 teams for the 2026-27 season, along with a broadcast partnership with CBC under...
29/09/2026
Manifold technologies has been recognized as a contributor to the Media eXchange...
29/09/2026
FuboTV has announced My Local Sports, allowing subscribers in select markets to add their local regional sports network (RSN) as an add-on to a Fubo Sports subs...
29/09/2026
Asian News International (ANI), a wire agency and video news provider based in India, has deployed Grass Valley's AMPP Media Operating System and Framelight...
29/09/2026
South African Broadcasting Corporation (SABC) has deployed Ikegami UHK-X600 cameras as part of an upgrade to IP-based production infrastructure. The deployment ...
29/09/2026
REMI, REMCO models will drive the bulk of the broadcaster's NHL productions ...
29/09/2026
Three years in, the facility is supporting more centralized race production, com...
29/09/2026
NBC, Peacock, and NBSN are carrying all four Wild Card series with a production ...
29/09/2026
19 Nonfiction Projects Across All Stages of Production to Receive More Than $1 million in Support as Documentary Film Program Approaches 25th Anniversary
LOS ...
29/09/2026
Two new plug-ins launch alongside updated bundles
Zynaptiq have just announced the launch of two new plug-ins, alongside new and improved versions of two of...
29/09/2026
All-in-one bus processor revealed
Wes Audio's ng product range has come a long way since it was first introduced, and now includes a tasty selection of ...
29/09/2026
eds3_5_jq(document).ready(function($) { $(#eds_sliderM519).chameleonSlider_2_1({ content_source:......
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Ikegami announces that the South African Broadcasting Corporation, SABC, has chosen Ikegami UHK-X600 camera systems as part of an advance to IP-based operation ...
29/09/2026
Blendkit Offers 20% Discount to Celebrate Crossing 150K Asset Milestone
Brie Clayton September 29, 2026
0 Comments
Blendkit, the largest 3D asset libr...
29/09/2026
Interactive streaming specialist Ease Live supported more than 76.5 million fan sessions across three major European media operators during this summers FIFA Wo...
29/09/2026
Ease Live has added support for VAST (Video Ad Serving Template) to its graphical overlay technology, opening up new ways for broadcasters, streamers and rights...
29/09/2026
Rise AV has announced the launch of the inaugural Rise AV Awards, a new global awards programme celebrating the women, advocates and organisations across the AV...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
29/09/2026
Clear-Com announced that First Baptist Nashville has upgraded its production communications with a Clear-Com intercom solution as part of a comprehensive sanct...
29/09/2026
Blackmagic Cinema Camera 6K Captured Action Shots for Sketch
Brie Clayton September 28, 2026
0 Comments
Camera's portable design and dynamic range...
29/09/2026
Kean Production Services Deploys AJA ColorBox to Deliver Consistent, Accurate Co...
29/09/2026
Berklee Alumni and Faculty Nominated for the 2026 Latin Grammy Awards A total of 28 Berklee alumni and faculty earned nominations across 20 categories this ye...
29/09/2026
Berklee's K-Pop & Beyond Explores Connections Between K-Pop and Hip-Hop Now in its fifth year, the series brings together artists, industry leaders, and s...
29/09/2026
We tend to think we live in a digital world, with hopes and fears around artificial intelligence (AI), quantum computing, data centres and the next big technolo...
29/09/2026
Today, in partnership with the American Academy of Pediatrics (AAP), Apple relea...
29/09/2026
Final Cut Camera, the professional filming app for iPhone, receives a major upda...
29/09/2026
RT lyric fm is proud to announce the annual Choirs for Christmas competition callout. Warm up those vocal chords and join us on RT lyric fm for a celebration ...
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...