
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...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
22/09/2026
RT , Creative Ireland and Shared Island Initiative ask young artists
to respon...
22/09/2026
To build and deploy sophisticated robotics applications that can perceive, reason and act in dynamic environments, developers need new physical AI models and to...
21/09/2026
Manifold Technologies, developer of software-defined, FPGA-accelerated infrastructure for live production, has named Ryhaan Williams as Chief Commercial Officer...
21/09/2026
Studio Network Solutions (SNS) has won Best Journal Article at the 2026 IAMT Impact Awards for What Video Editors Need When Everything Is Changing Around Them,...
21/09/2026
Major League Wrestling (MLW) has announced a streaming distribution agreement with Tubi for its weekly series MLW FUSION. Beginning September 17, new episodes w...
21/09/2026
Disney Entertainment has announced that Adam Smith has been named Chairman, Direct-to-Consumer, with responsibility for Disney and Hulu including product, engi...
21/09/2026
United Airlines and DISH have announced an agreement to bring live professional ...
21/09/2026
SES and JioStar have announced a multi-year agreement under which SES will provide satellite distribution services for JioStar's television channel portfoli...
21/09/2026
The Detroit Red Wings have announced details for their inaugural season on Detro...
21/09/2026
Manifold Technologies has appointed Ryhaan Williams as Chief Commercial Officer for North America, effective October 1, 2026. Based in Jacksonville, Florida, Wi...
21/09/2026
Angels Broadcast Television (ABTV), the local television home of the Los Angeles...
21/09/2026
The 2026 US Open Tennis Championships marked a year of change with respect to TV...
21/09/2026
Behind The Mic provides a roundup of recent news regarding on-air talent, includ...
21/09/2026
Drum-tuning app now available on Android
RT60 describe their iDrumTune app as the world's most advanced, accurate and intelligent system for assisting ...
21/09/2026
Innovative multiband auto-panner introduced
SoundGhost's latest plug-in takes an innovative approach to auto-panning, and divides incoming signals into ...
21/09/2026
We check out the M5 Max-equipped model The same, but different. The new Mac Studio models feature M5 Max and M5 Ultra silicon, dramatically improving the perf...
21/09/2026
From Graphic Novel to 30-Minute Animated Film: What I Learned Building an AI-Ass...
21/09/2026
Liam Hopkins Builds Recording Studio with Blackmagic Design
Brie Clayton September 20, 2026
0 Comments
Video complements audio production with music v...
21/09/2026
Indigenous screen organisations from Canada, Aotearoa New Zealand and Australia ...
21/09/2026
Physical AI is moving rapidly from research to large-scale deployment. By 2035, ABI Research projects an installed base of 49 million level 3-5 autonomous vehic...
21/09/2026
Today, Egypt's AI builders gathered in the Grand Egyptian Museum for a reception that highlighted the nation's rapidly growing AI ecosystem - spanning A...
21/09/2026
Every AI factory needs power and cooling that fit its computing architecture. As AI infrastructure expands, power, cooling, water, site and grid constraints are...
21/09/2026
RT celebrates Irish Sign Language Awareness Week 2026
Special programmes across RT television, radio and online, plus special initiatives
#ISL #IDSL #IWDP26...
21/09/2026
AI security is an engineering problem. That means defined security requirements,...
21/09/2026
Clean energy isn't hard to come by, but the pace of large-scale adoption has historically been slow due to bottlenecks - including out-of-date infrastructur...
20/09/2026
Piano-playing singer-songwriter competition returns for fourth year
Casio have officially revealed the list of 16 finalists who have earned their place in t...
20/09/2026
COW Jobs: Video Editor, Motion Designer - Remote, PT, 6 Months
Brie Clayton September 20, 2026
0 Comments
Video Editor + Motion Designer (Remote | PT ...
19/09/2026
Three new rackmount power conditioners introduced
Yorkville Sound have announce the upcoming launch of three new RPC rackmount power conditioners from ART P...
19/09/2026
September 15, 2026
AMSTERDAM, SEPTEMBER 2026 - Colorfront (colorfront.com), the Academy and Emmy Award-winning developer of high-performance cinema mastering, ...
19/09/2026
Two High-Profile Professional Sports Franchises Renew creative.space Contracts with DigitalGlue
NFL team and Major League Soccer Club cite ease of use, secure ...
19/09/2026
Limited Edition Audio releases VoxSplit Pro for overlapping dialogue separation ...
18/09/2026
IBC 2026 Tech Moves Beyond the Gloss and Into the Rack If you spent any time in the halls of the RAI this year, you noticed a clear shift in conversation. The c...
18/09/2026
In-venue and creative video staffers at the professional and collegiate level ha...
18/09/2026
Qvest has appointed Jens Miedek as Senior Vice President Sales, Media and Entertainment. Before joining Qvest, Miedek spent 16 years at Riedel Communications an...
18/09/2026
Fonn Group has acquired full ownership of everviz, a cloud-native platform for interactive charts, maps, and data-driven graphics, and will rebrand it as Teikna...
18/09/2026
Other World Computing (OWC) has announced the acquisition of OpenDrives, a provider of software-defined video and rich media storage management solutions. The a...
18/09/2026
Kaltura and Verimatrix have announced a partnership integrating Verimatrix's Digital Rights Management and security capabilities into Kaltura's Cloud TV...