
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...
13/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
13/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
YES Network and The Gotham Sports App will air seven Athletes Unlimited Softball...
12/06/2026
The United Football League will host its FAST Innovation Suite at the 2026 United Bowl presented by Credit One Bank on Saturday, June 13 at 3:00 p.m. ET at Audi...
12/06/2026
PTZOptics and LayerJot will present live demonstrations at InfoComm 2026 showing how natural-language AI prompting, robotic camera control, and on-device comput...
12/06/2026
MultiDyne Video and Fiber Optic Systems will exhibit at InfoComm 2026, featuring...
12/06/2026
Ateme has announced that Eurovision Services is using Ateme's software-based frame-rate conversion technology for international live event workflows. The de...
12/06/2026
Bitmovin and Simplestream have announced a partnership with Xperi to simplify the launch of OTT streaming services on TiVo OS smart TVs and devices. The collabo...
12/06/2026
Net Insight has announced that a multinational technology company is deploying a...
12/06/2026
MLB Players Inc., the business arm of the MLB Players Association, has announced a partnership with Athletes First to develop and sell brand partnerships across...
12/06/2026
Guntermann and Drunck (G&D) and VuWall have announced the CommandKeyboard-Advanc...
12/06/2026
Comcast Smart Solutions announces a new smart technology deployment with Major L...
12/06/2026
Elevation Worship completed the initial leg of its Elevation Nights 2026 tour ...
12/06/2026
AJA Video Systems has announced KONA IP25 support for Colorfront Transkoder and ...
12/06/2026
Audinate Group Limited (ASX: AD8) will exhibit at InfoComm 2026 (Booth C7321, Ce...
12/06/2026
Pac-12 Commissioner Teresa Gould has announced the appointment of Scott Adametz as Chief Technology Officer. The Pac-12 describes the hire as the first CTO appo...
12/06/2026
Grass Valley has announced AMPP Edge Live, a production system combining Grass Valley hardware, NVIDIA Blackwell GPU acceleration, and AMPP OS in a single platf...
12/06/2026
At one time a trailblazer with the launch of the Longhorn Network, the Universit...
12/06/2026
Ratings Roundup is a rundown of recent rating news and is derived from press rel...
12/06/2026
Chyron has announced PAINT 10.4, an update to its illustrated replay and sports ...
12/06/2026
SVP, Production Mark Gross: With the new schedule, with not having every Sunday night, it's given us an opportunity to take a step back and reimagine what ...
12/06/2026
For Televisa Technical Engineering Manager Roberto N nez Ibarra and the small team of 12 technicians and two production personnel at the IBC things are already ...
12/06/2026
Simple Steps to Better Acoustics - Taming The Small Room
Most of us mix in spare rooms and small spaces, where the acoustics fight us at every turn. At Gear...
12/06/2026
Latest addition expands vintage-inspired effects palette
Meris' Ottobit pedal range draws its inspiration from vintage gaming consoles, and the latest a...
12/06/2026
Soundbox-based chamber strings series expanded
Sonora Cinematic have just announced the launch of the second instalment in their Soundbox-based chamber stri...
12/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
AJA Announces KONA IP25 Integration with Colorfront Software
Brie Clayton June 12, 2026
0 Comments
Collaboration enables uncompressed SMPTE ST 2110 I/O ...
12/06/2026
URSA Cine 12K LF Used to Create Visuals for STUTS' K-Arena Concert
Brie Clayton June 12, 2026
0 Comments
Organic visuals projected on a giant scre...
12/06/2026
MTI FILM Acquires Mango New Edit, Expanding its Global Post-Production Services ...
12/06/2026
AI Point Tracking Speeds Up Complex VFX Tracks in Mocha Pro
Jessie Electa Petrov June 12, 2026
0 Comments
The 2026.5 release adds automatic point trac...
12/06/2026
Bitmovin, a provider of video streaming solutions, has partnered with Simplestream, a provider of OTT and broadcast solutions, and technology provider Xperi, to...
12/06/2026
Leostream Corporation, creator of the world-leading Leostream Remote Desktop Access Platform, today announced Jigsaw24, a leading B2B IT solutions provider wit...
12/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
12/06/2026
How Aussie indie games and screen are levelling up with IP 11 June 2026
Ari Harrison, Pro Jank Footy
Head of Games Joey Egger and Ari Harrison of Umbrella sha...
12/06/2026
AgentPerf from Artificial Analysis, the industry's first agentic AI benchmark, gives developers, enterprises and infrastructure providers a clear way to com...
12/06/2026
Back to All News
Netflix Unveils First-Look Images from Villaflor, Santiago Mitre's New Film
Entertainment
12 June 2026
GlobalArgentina
Link copied to ...
12/06/2026
Back to All News
Cross the Boundaries of the Real World into the Spirit Realm i...
12/06/2026
With John Daro, DI Colourist at Warner Bros. Water Tower Color Tuesday 23 June, 10am-1pm or 3-6pm
Restar Corporation
Tokyo
Register here
John Daro is the ...
12/06/2026
Meet The Grumpy Onion Ireland's newest online sensation, all he wants is to ...
12/06/2026
RT stays Up All Night with brand new daily 2026 FIFA World Cup Vodcast
Adding to the fun around 2026 FIFA World Cup tournament, RT has launched a brand new d...