
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...
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
A fentanyl countermeasure that adapts to combat future black-market drugs Scripps Research scientists developed a vaccine that teaches the immune system to rapi...
11/06/2026
The immense size of the tourney and its Atlantic-spanning operation also disting...
11/06/2026
Nielsen has released a new soccer fandom consumer research report, The Fans Behind The Game: FIFA World Cup 2026 Edition, examining the soccer audience in the...
11/06/2026
Telemundo will launch its FIFA World Cup 2026 coverage on Thursday, June 11 with...
11/06/2026
FuboTV Inc. has announced a distribution agreement with NBCUniversal. Fubo customers can now stream Telemundo and Universo, with NBC Sports Network (NBCSN), NBC...
11/06/2026
DAZN has announced its in-app features for FIFA World Cup 2026 coverage in Spain...
11/06/2026
Roblox has released the 2026 Roblox Digital Expression Report: Wave 4 - Sports D...
11/06/2026
FIFA has unveiled DNA, the Official FIFA World Cup 2026 Anthem, performed by A...
11/06/2026
ESPN will provide English- and Spanish-language news and information coverage of FIFA World Cup 2026 across its U.S. media platforms from June 11 through July 1...
11/06/2026
The latest product of the outstanding RIT Sports Network program, this recent grad from Long Island is carving out a promising path in broadcast engineering
In...
11/06/2026
DAZN has announced a multi-year agreement to make DSPORTS channels available to ...
11/06/2026
Laura Dern at the 1986 Sundance Institute Directors Lab (Photo by Eric Edwards)
By Lucy Spicer
It takes a village to bring together the Sundance Institute lab...
11/06/2026
As podcast formats evolve in the streaming era, podcasting needs updated, transp...
11/06/2026
As Spotify's global RADAR program enters its sixth year in Italy, a new class of artists is stepping into the spotlight. Today, we're announcing the six...
11/06/2026
Pride Month is a time for celebration, reflection, and amplifying the diverse stories and perspectives from the LGBTQIA+ community that enrich our world. To hel...
11/06/2026
First in new line of muted string libraries
VSL have just announced the launch of two new string libraries that represent the first two instalments in a new...
11/06/2026
New colour option for 61-key Launchkey MK4
At Superbooth 2025, Novation introduced the Launchkey Mini 37 White and Launchkey 49 White, bringing an additiona...
11/06/2026
Larger, but still compact!
Arturia's popular compact MIDI controller keyboard is now available in a, well, slightly less compact version! The new MiniLa...
11/06/2026
Eurosatory 2026: Rohde & Schwarz shapes the new-generation battlefield Rohde & Schwarz unveils next generation SIGINT/EW and CUAS solutions on uncrewed system...
11/06/2026
Rohde & Schwarz unveils NEMACS - Directional, ultra secure connectivity for the ...
11/06/2026
MTI FILM acquires Mango/New Edit Posted by MTI Film on June 10, 2026
LOS ANGELES, CA - June 2026 - MTI FILM, the multiple Emmy Award winning Hollywood post-p...
11/06/2026
Study underscores the need for authoritative content intelligence to build trust...
11/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
11/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
11/06/2026
Maxon Brings Real-Time Architectural Visualization to AIA26 With New Redshift fo...
11/06/2026
ABC Kid's Caper Crew Shoots Australian Adventure with Blackmagic Design
Brie Clayton June 11, 2026
0 Comments
DP Judd Overton and team bring Wes A...
11/06/2026
PTZOptics, and LayerJot today announced live demonstrations at InfoComm 2026 showing how prompt-based AI, robotic camera control, and high-performance computing...
11/06/2026
Lightware, an industry leader in signal management, announces the release of GPIO-Button-10S, a dedicated control interface enabling straightforward press-to-a...
11/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
11/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
11/06/2026
Kiloview, a leading innovator in AV-over-IP video solutions, will return to InfoComm 2026 (Booth# N8327) with broadcast-grade AV-over-IP solutions designed for ...
11/06/2026
Australian Games Industry Glossary of Terms 10 June 2026
From DAU and EULA to COT and QADE, here's a list of game industry terms, industry jargon and their...
11/06/2026
Berklee's Tonya Butler Named Music Business Educator of the Year The Music Business Association honored Butler at its annual Bizzy Awards.
June 10, 2026
...
11/06/2026
Ann Mincieli to Receive Honorary Doctorate at Berklee NYC Graduate Commencement The five-time Grammy-winning engineer and producer, known for her longstanding...
11/06/2026
Thursday 11 June 2026
Daisy May Cooper rallies the nation ahead of ICC Women's T20 World CupTurn on cookies to view this content. Go to Privacy options and...
11/06/2026
Back to All News
Hadewych Minis and Geert van Rampelberg to Star in New Netflix...
11/06/2026
Back to All News
Official Trailer for Anime Adaptation of Thunder 3' Unvei...
11/06/2026
Summer solstice shows from C il House and Late Date from 9pm on Saturday 20 Jun...
11/06/2026
The GeForce NOW summer sale kicked off today with limited-time savings of up to ...
10/06/2026
DAZN-owned digital-media company launches three fan-first series leaning into cr...