
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 ...
23/11/2026
The ESPN Edge Innovation Conference is a yearly touchstone for next-generation and one of the most interesting and challenging continues to be the consumer adop...
23/11/2026
It started as a favor to a friend. And, if Troy Aikman was being completely honest, the prospect of a two-week paid European vacation didn't sound half bad,...
23/11/2026
From the ESPY Awards and NFL Honors to college volleyball and the Met Gala, stor...
23/11/2026
Cinematic sound gives the upstart tech-heavy league - both the men's and the women's version - a powerful underscore
It's like doing Foley for a m...
23/11/2026
A match-play engine rebuilt for the Skins format will drive on-screen graphics and drone AR overlays on Black Friday
Prime Video will continue to push the boun...
23/11/2026
Panasonic announced the AU-SHX1, the first compact cinema camera in LUMIX histor...
23/11/2026
ATSC, The Broadcast Standards Association, has congratulated former Vice President of Standards Development Jerry Whitaker and board member Zandra Clarke on rec...
23/11/2026
Bringing Wonka's The Golden Ticket and its chocolate factory to life for Net...
23/11/2026
Diversified, an audiovisual, broadcast and digital experience integrator, has joined the Disguise Channel Partner Program, combining its integration work with D...
23/11/2026
TGL presented by SoFi and Full Swing have announced that all custom-designed competition holes from the 2026 TGL season are now available on Full Swing simulato...
23/11/2026
Two plug-ins inspired by iconic sampler
With a collection of 1990's home-studio hardware emulations already under their belt, Shy Audio have rolled the ...
23/11/2026
Sucessful event welcomed over 700 attendees
The MONO Music Conference 2026 has just taken place at The Midway, San Francisco, attracting an audience of over...
23/11/2026
November 23, 2026
Warsaw, Poland, November 23, 2026: Krakow Cooperative Bank ( ...
23/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
23/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
23/11/2026
Version 1.10 deepens NMOS integration and adds direct AI links.
With the release of version 1.10 of Buttons, users across broadcast, AV, corporate and house o...
23/11/2026
RE:Vision Effects - RE:FLEXOR is here
Brie Clayton November 23, 2026
0 Comments
RE:Vision Effects, Inc (revisionfx.com) introduces RE:Flexor . RE:Fle...
23/11/2026
Hackathon Teams Explore Storytelling with URSA Cine Immersive
Brie Clayton November 23, 2026
0 Comments
Creators learn professional immersive producti...
23/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
23/11/2026
New broadcast-grade presentation facility brings election-night production values to town halls, investor presentations and product launches, combining an in-pe...
23/11/2026
Bitmovin, a leading provider of video streaming solutions, has announced an integration between Bitmovins AI Scene Analysis and publisher provided signals (PPS)...
23/11/2026
Firewalls, encryption and other technical defenses are all important tools to protect an organization from cyber attacks. But what if its most powerful safeguar...
23/11/2026
23dB Productions expands remote audiobook production services with Focusrite Sca...
23/11/2026
The Great House Revival Celebrating Hugh Wallace starts Sunday at 7.30pm
The G...
23/11/2026
The elves don't have to be the only ones busy in the workshop this holiday s...
23/11/2026
Special three-hour live anniversary programme Other Voices 25 Live A Celebration airs Saturday, 28 November on RT 2 and RT Player
Live broadcasts, exclusive p...
23/11/2026
RT One and RT Player, Tuesday 24 November
Tarrac na Farraige returns for a se...
22/11/2026
Try out modular synthesis for free
If you're looking for a way to explore modular synthesis without having to spend any money, then it's worth takin...
21/11/2026
Billie Jean King and Ilana Kloss attend the premiere of Give Me the Ball! by Liz Garbus and Elizabeth Wolff, an official selection of the 2026 Sundance Film Fes...
21/11/2026
Compressor plug-in free for first two weeks
The latest plug-in to join fedDSP's Amps & Pedals line-up has just arrived, and the company are kindly offer...
21/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
21/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
21/11/2026
A larger studio puts more distance between the lights and the people who need to look good under them. Brightline Lighting, a manufacturer of energy-efficient l...
21/11/2026
LA JOLLA, CA-Despite its enormous impact on individuals, families and communities, addiction remains an area of significant unmet medical need.
A $7 million gi...
21/11/2026
27 FANGORIA Chainsaw Awards Nominees Created with Blackmagic Design
Brie Clayton November 20, 2026
0 Comments
Blackmagic Design hardware and software ...
21/11/2026
Qube Cinema Named Technical Partner for 57th International Film Festival of Indi...
20/11/2026
The sports broadcaster's chairman sees the upcoming game as an opportunity t...
20/11/2026
In-venue and creative video staffers at the professional and collegiate level have one major thing in common: the intensity and attention to detail ramps up dur...
20/11/2026
A variety of LED displays, integrated broadcast infrastructure covers every angl...
20/11/2026
Real American Freestyle (RAF) has announced a distribution partnership with Migu Video, a Chinese digital sports platform, to carry the RAF15 main event between...
20/11/2026
Apple and F1 Academy have announced that the all-female racing series will stream on Apple TV in the U.S. beginning in 2027. Fans will be able to watch every qu...
20/11/2026
Regional broadcaster m nchen.tv has modernized its production infrastructure at a new location in northern Munich. Riedel MediorNet provides decentralized signa...
20/11/2026
Eutelsat has announced three appointments to its Executive Committee, effective November 2026, under CEO Jean-Fran ois Fallacher.
Jean-Hubert Lenotte is appoin...
20/11/2026
After more than two decades at Harbour Esplanade in Docklands, the Seven Network has relocated its Melbourne headquarters to a new, custom-built ST 2110 facilit...
20/11/2026
Brazil is among the first markets deploying Versatile Video Coding (VVC) as part...
20/11/2026
The Soccer Tournament (TST), the $1 million winner-take-all 7v7 world championsh...
20/11/2026
Enhancements include a larger compound, an elevated camera count, and a whole lo...
20/11/2026
Leaders from ESPN, iHeartMedia, and Just Women's Sports explore creating new...
20/11/2026
New EQ plug-in aimed at mastering duties
Lemur Audio's latest plug-in has just arrived, delivering a characterful EQ that's aimed primarily at maste...