
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...
25/09/2026
Digital Anarchy Releases Newest Version of its Real-Time Skin Retouching Tool fo...
25/09/2026
Blackmagic Design Used on More Than 50 Summer Films in 2026
Brie Clayton September 25, 2026
0 Comments
Hero image: Disclosure Day
Blackmagic Design p...
25/09/2026
How I Automated Social Media Resizing in After Effects - Free Script
Graham Quince September 25, 2026
0 Comments
If your text keeps getting cut off on...
25/09/2026
IBC has unveiled the winners of the prestigious IBC2026 Innovation Awards at an event held at the RAI Amsterdam on Sunday 13 September, honouring collaborative ...
25/09/2026
IBC2026 brought the global media, entertainment and technology community together for four days of business, innovation and collaboration at the RAI Amsterdam. ...
25/09/2026
Lightware testing has revealed that each USB-C port on Apple's new MacBook Neo consumes three of the seven USB tiers available under the USB specification, ...
25/09/2026
Lightware is supporting educational institutions in building modern learning environments by combining professional training with education-focused AV technolog...
25/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
25/09/2026
Long-Standing Customer Renews Multiyear Contract for VO's Secure Video Player, Content Security, and Device Monitoring Solutions
Viaccess-Orca (VO), a glob...
25/09/2026
Automate Video Progress Bars in After Effects - No Keyframes!
Graham Quince September 24, 2026
0 Comments
Learn how to create an automated video playb...
25/09/2026
Want to be part of this year's Late Late Toy Show?
Final call for applications in search for this year's stars
The most wonderful night of the year is...
24/09/2026
Broadcast Management Group (BMG) is supporting Virginia Public Media (VPM), the ...
24/09/2026
RED Digital Cinema's RED V-RAPTOR [X] and RED V-RAPTOR XL [X] cameras with the Phantom Track feature are the first cameras to receive GhostFrame Pro Certifi...
24/09/2026
Bringing together the full family of networks, FOX Sports is also adding Tubi, F...
24/09/2026
Virginia Polytechnic Institute and State University (Virginia Tech) has unveiled...
24/09/2026
The blog collects SVG's reporting on AI across U.S. and European sports broadcasting
Since SVG launched the AI Innovation Lab in April to advance the devel...
24/09/2026
SVG's annual TranSPORT conference, which will be held on Tuesday, Oct. 20 in...
24/09/2026
The self-built Master Control Room has cut streaming operations incident-respo...
24/09/2026
Ortana Media Group, the software systems integrator behind the Cubix workflow platform, has connected AudioShake's audio separation models to ScorePlay thro...
24/09/2026
AudioShake has released Multi-Speaker 2.0, the company's newest Multi-Speaker model, which removes 75% more noise and offers 32% better separation of overla...
24/09/2026
By Jon Morgan, Founder and Executive Producer, Ryval Studios
For Major League B...
24/09/2026
Spectrum SportsNet has revealed its comprehensive programming and live game broa...
24/09/2026
The Charlotte Hornets has unveiled new broadcast partnerships with Gray Media an...
24/09/2026
DAZN will be the exclusive direct-to-consumer streaming partner for the Detroit Pistons beginning with the 2026-27 season. Subscriptions are available at DAZN.c...
24/09/2026
The National Hockey League (NHL) has made an agreement with Spectrum that will allow Spectrum TV customers in the Minnesota Wild local broadcast territory to wa...
24/09/2026
The Carolina Hurricanes has reached a multi-year distribution agreement to provi...
24/09/2026
The St. Louis Blues has introduced Blue Note as the name of the new, exclusive ...
24/09/2026
Blue Jackets Hockey Network, the television home for Blue Jackets hockey, is coming to Spectrum TV under a new carriage agreement between the National Hockey Le...
24/09/2026
The next generation of multitrack recording for live sound
The latest version of Waves' dedicated live multitrack recording software delivers an array ...
24/09/2026
An idea machine for musicians
Described as an idea machine for musicians , the latest addition to Polyend's growing collection of guitar pedals combin...
24/09/2026
Alignment tool gains multitrack layout
Synchro Arts have just launched the latest version of their renowned time-alignment plug-in, and it's said to be ...
24/09/2026
Synth gains DAW Control & Ctrl-e integration
Expressive E have just released a major firmware update that brings some interesting new features to the Osmose...
24/09/2026
Rohde & Schwarz expands its system amplifier portfolio with the R&S SAM200 for a...
24/09/2026
September 24, 2026
The Hitachi Startup Challenge FY26 invites innovative startu...
24/09/2026
Download Now!
To receive a short case study showcasing NHK Technologies, Inc. (NT) s audio setup, please enter the following details:
--
First Name* Fir...
24/09/2026
Manifold Technologies Appoints Ryhaan Williams as CCO for North America
Brie Clayton September 24, 2026
0 Comments
Brings three decades of broadcast e...
24/09/2026
UNIFACHA Expands Educational Program with DaVinci Resolve Studio
Brie Clayton September 24, 2026
0 Comments
Brazilian university empowers next generat...
24/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/09/2026
Viewers watching videos from the Austrian Parliament online will soon find it easier to verify the authenticity of the content. Big Blue Marble, an internationa...
24/09/2026
nsign, the digital signage SaaS platform built around its Simplify Complexity principle, is now officially certified for BRAVIA Professional Displays from Son...
24/09/2026
Encompass Digital Media today announced the successful migration of multiple Viaplay free-to-air channels, including TV3, TV6, TV8 and TV10, to its Altitude Sch...
24/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...