
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...
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...
24/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
24/09/2026
Music Supervisor, Composer, and Mixing Engineer Santiago Uribe has built a career around producing music for film and television, contributing to more than 40 p...
24/09/2026
The North American Broadcasters Association (NABA) will hold a full-day cybersecurity summit focused on defending against growing cyber threats facing the broad...
24/09/2026
The home interiors retailer signs up for third year as sponsor
RT Commercial today announced that Harry Corry has signed up to a third year as sponsor of Live...
24/09/2026
When COVID-19 emerged, scientists had a crucial advantage: Decades of prior research on coronaviruses meant they understood the virus' key proteins well eno...
24/09/2026
RT Radio 1 Folk Awards Tickets on Sale
Dolores Keane to be inducted into the...
24/09/2026
A warped Manhattan is waiting in the cloud this week. Remedy Entertainment's CONTROL Resonant brings Dylan Faden's extraordinary abilities and a paranat...
23/09/2026
Four control rooms support B1G+ streams, videoboard shows, creative content, and...
23/09/2026
By Andrew Cohen, SVG Coorespondant
The Mountain West debuted its new Replay Operations Center at the start of this football season, bringing real-time collabor...
23/09/2026
The Taylorville, IL, native is pushing creative boundaries at Ball State, gaining reps across directing, technical directing, tape, and more than 100 ESPN+ broa...
23/09/2026
Alexander Heller, Nevada Jose, Will Brill, and Giselle Bonilla pose with cast members at The Musical premiere during the 2026 Sundance Film Festival at Eccles...
23/09/2026
Includes natural and processed patches
The Crow Hill Company's latest sample library captures a children's choir comprising a troupe of boys perform...
23/09/2026
Plug-in offers six bands of saturation
Kreuzberg Audio's product range includes a selection of plug-ins and virtual instruments aimed primarily at hard-...
23/09/2026
Latest DAW update now live
SoundBridge have announced that the latest update for the remote-collaboration-focused DAW is now available. The release of Sound...
23/09/2026
Koori Knockout returns home exclusively to NITV and SBS On Demand in 2026
11 September, 2026
Media releases
Fans can catch all the live action exclusively ...
23/09/2026
Rohde & Schwarz acquires NEOSAT and PHYTRONIC and strengthens its competencies i...
23/09/2026
1. ABOUT THE PROGRAMME
The National Film and Video Foundation (NFVF) invites applications from experienced producers who own or manage a South African product...
23/09/2026
The National Film and Video Foundation (NFVF) is pleased to announce the opening...
23/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...
23/09/2026
Nielsen CMI data reveals a changing fast-food landscape, with value, convenience...
23/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/09/2026
COW Jobs: Blender on Windows - Generalist - Remote
Brie Clayton September 23, 2026
0 Comments
Application Users - Blender on Windows - Generalist
Se...
23/09/2026
Version 1.8 recognised for new workflow tools, boosted control panel flexibility and ease of integration into IP networks...
23/09/2026
Hiltron Communications reports a successful 2026 International Broadcasting Convention, held at the RAI Amsterdam. Exhibiting on stand A37 in Hall 1, Hiltron ex...
23/09/2026
Reinforcing its long-term commitment to the Middle East and North Africa (MENA) broadcast market, LiveU is presenting the Q Era at CABSAT 2026, on Stand H1-D35 ...
23/09/2026
Agence France-Presse (AFP), a global news agency, and Dalet, a leading technology and service provider for media-rich organizations, today announced a partnersh...
23/09/2026
Berklee Connect Unlocks the Power of a Global Network Katie Vitolins BM '04 knows firsthand what Berklee's alumni community can make possible. Now she...
23/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
23/09/2026
Westminster Schools, a K through 12 school in Atlanta, Georgia with approximately 2,000 students, has transformed its student broadcast and digital storytelling...
23/09/2026
The 2026 edition of CABSAT and SATExpo may have a new home and dates in the diary, but it still retains a strong presence from UK companies in the GREAT Britain...
23/09/2026
Glensound will return to CABSAT with new developments in professional monitoring and Dante interfacing, alongside its established commentary, esports and parlia...
23/09/2026
September 23 2026, 17:00 (PDT) Dolby and Meta Expand Dolby Atmos and Dolby Vision Across Metas Ecosystem
Across Meta AI glasses, Instagram, and VR devices, ...