
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...
17/09/2026
LA JOLLA, CA-While the brain orchestrates metabolic processes in the body, it al...
16/09/2026
Grass Valley has been recognized with a 2026 Technology & Engineering Emmy Award...
16/09/2026
Sports-media leaders explore how cloud, AI, and virtualization are transforming ...
16/09/2026
With a full crew on site in Springfield, deep access to players, and a growing d...
16/09/2026
John Wilson attends The History of Concrete premiere during the 2026 Sundance Film Festival at The Yarrow Theatre on January 22, 2026, in Park City, Utah. (Ph...
16/09/2026
Powerful soft synth receives free update
Wavea have just launched a new and improved version of their feature-packed soft synth, kitting it out with over 20...
16/09/2026
Physical modelling experts launch pipe-based instrument
Modartt are well known for their impressive Pianoteq and Organteq offerings, and now, they've pu...
16/09/2026
Popular DAW gains free pitch-correction tool
Image-Line have teamed up with Antares to kit their popular DAW software out with a built-in pitch-correction p...
16/09/2026
Microwave Factory and Rohde & Schwarz enable automated SAR measurements with CMX...
16/09/2026
Rohde & Schwarz launches new security scanner for large events at Security Expo ...
16/09/2026
The National Film and Video Foundation (NFVF) invites eligible South African pro...
16/09/2026
Grass Valley honored alongside industry leaders for the development of web-based, frame-accurate remote monitoring systems for distributed broadcast production ...
16/09/2026
Blackmagic Design Cameras Capture Harvard Law School Alumni Event
Brie Clayton September 16, 2026
0 Comments
URSA Broadcast G2 and Pocket Cinema Camer...
16/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/09/2026
Screen Australia funds games projects in every state and territory as Screen Cur...
16/09/2026
September 16th, 2026 (Participant Head Shots Here & Video Here and YouTube HERE...
16/09/2026
Original article publish in Broadcast Magazine NL
Over the past few years, our relationship with Grass Valley has continued to develop, and our move to AMPP in...
16/09/2026
Red Seat Ventures Announces Exclusive Partnership with Caleb Hammer's Financ...
16/09/2026
System performance, efficient infrastructure scaling and continuous software opt...
16/09/2026
Garda whistleblowers come forward to
RT Investigates from inside the
Garda Pr...
16/09/2026
AI factories are the infrastructure of the intelligence era. Scaling them respon...
15/09/2026
At IBC2026, Pixitmedia by DataCore will showcase its latest capabilities designe...
15/09/2026
Quantum Corp. today announced the release of Quantum Autonomous Data Management ...
15/09/2026
Former Wyndham Hotels & Resorts technology executive will focus on fan engagemen...
15/09/2026
Creator Sports Network (CSN) and FAN.live have announced a partnership giving CSN's network of more than 2,000 vetted creators access to live 3D NFL broadca...
15/09/2026
SVG and SVG Europewere all over the IBC 2026 show floor out in Amsterdam, bringi...
15/09/2026
Rise WIB has announced the shortlist for the Rise Awards 2026, returning to Troxy in London on Tuesday, November 17. The awards recognize outstanding women, adv...
15/09/2026
Major League Table Tennis (MLTT) has announced its media distribution lineup for the 2026-27 season, beginning September 11. Every match will stream live on the...
15/09/2026
Willow Sports has announced it will serve as the exclusive U.S. and Canadian hom...
15/09/2026
Gravity Media has announced it will provide outside broadcast production and technical services for the MXGP of Australia, the finale of the 2026 FIM World Moto...
15/09/2026
Co-founders Scott Coker and Peter Y. Levin have unveiled Ki MMA, a new global mixed martial arts promotion launching in the first quarter of 2027. The announcem...
15/09/2026
Sony Electronics has announced two new G Master super-telephoto prime lenses for...
15/09/2026
GlobeCast provides facility for AI-power automated production core...
15/09/2026
Gravity Media, a leading global provider of production and content, and media services and facilities, is empowering Tourism and Events Northern Territory (NT) ...
15/09/2026
New Thunderbolt audio interfaces aimed at pro studios
Audient's latest announcement sees the company introduce three new high-end audio interfaces desig...
15/09/2026
Completes core wireless system line-up
The latest addition to Sennheiser's Spectera range is now shipping, completing the core elements of the company...
15/09/2026
High-frequency dynamics plug-in upgraded
Schwabe Digital have just released a major free update for their acclaimed high-frequency dynamics processing plug-...
15/09/2026
DAW update launched alongside all-in-one subscription bundle
The latest version of Universal Audio's DAW software has just arrived, and has been release...
15/09/2026
Three popular hardware units go virtual
Rupert Neve Designs are entering the software market in style, with not one, but three of their sought-after hardwar...
15/09/2026
When longstanding OB specialist Cloudbass made the decision to expand its fleet to accommodate remote production facilities for a leading UK sports broadcaster&...
15/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
15/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
15/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
15/09/2026
Six Berklee Alumni Win at 2026 Emmy Awards The recipients were recognized for their contributions to Widow's Bay, Beef, South Park, and Bad Bunny's Su...
15/09/2026
OWC Announces Acquisition of OpenDrives, Expanding Software-Defined Video and Ri...