
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...
17/06/2026
The Immersive Supervisor Emerges as Hollywood's Next Production Role
Brie Clayton June 17, 2026
0 Comments
Above image: On set live immersive revi...
17/06/2026
Vertical Musical Playback Shot with Blackmagic PYXIS 6K
Brie Clayton June 17, 2026
0 Comments
Large format sensor and DaVinci Resolve workflow used fo...
17/06/2026
DAZ 3D Launches New Game-Ready Character Assets Built for Modern Engines and Pro...
17/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
17/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
17/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
17/06/2026
Montr al, Quebec, June 11, 2026 Kiloview, a leading provider of AV-over-IP and NDI -based video transmission solutions, today announced a distribution partner...
17/06/2026
Changsha, China, June 15, 2026 Kiloview officially announced the launch of U4 IP Video Dock, a compact IP video decoder and output dock designed to bring prof...
17/06/2026
The RT Concert Orchestra will bring the timeless music of The Beach Boys to aud...
17/06/2026
Calibr-Skaggs awarded $5.1M by NIH to develop long-acting hepatitis B virus therapy A new program aims to replace a daily HBV drug with once-monthly or even qua...
16/06/2026
Thomson's highly regarded expert-led online learning courses are now easier to access on the go via our new App.
Available now on Google Play Store, the J...
16/06/2026
Neumann.Berlin has released firmware version 2.0 for the MT 48 audio interface, adding plugin compatibility, expanded Dante networking options, broadcast encode...
16/06/2026
TVNewsCheck has announced that nominations are now open for its 2027 Women in Technology Awards, to be presented at NAB Show 2027 on Tuesday, April 6 in the Med...
16/06/2026
Clear-Com has announced Avalon, a 1RU IP intercom platform for broadcast, live events, and production environments. Designed for IP-only workflows, Avalon suppo...
16/06/2026
SNS has published a guide to remote video editing workflows using its EVO shared storage platform and companion tools, covering use cases ranging from home edit...
16/06/2026
Grass Valley has announced that the Richmond Flying Squirrels, a Minor League Baseball affiliate of the San Francisco Giants, have deployed five Grass Valley LD...
16/06/2026
The Alliance for IP Media Solutions (AIMS) has announced the launch of the Official IPMX Training Series, a free online program covering the design, configurati...
16/06/2026
Swerve TV has announced distribution agreements with Fubo, Plex, Amazon Fire TV,...
16/06/2026
ATP and TikTok have announced an expansion of their global content partnership, extending the ATP's TikTok hub powered by TikTok GamePlan to cover all nine ...
16/06/2026
Network's LA facility serves as the heart of a sprawling operation built to ...
16/06/2026
At Pico, the network's media-management team is supporting a flood of HBS fe...
16/06/2026
The NHL will no longer air on CBC after the pulic broadcasters and national rights-holder Rogers Sportsnet were unable to come to agreement.
After a successfu...
16/06/2026
As live sports broadcasters continue to seek new ways to make complex action mor...
16/06/2026
Built with the 2026 FIFA World Cup in mind, these small but mighty IP-based tran...
16/06/2026
Boasts individual synths for each band
UVI's latest synth takes an interesting approach to synthesis, offering a trio of synth engines that each operate...
16/06/2026
New intelligent auto-fader plug-in unveiled
PSPaudioware's latest release offers automatic level adjustment and provides more detailed control than many...
16/06/2026
New performance-focused library announced
Crystal Pads is the latest addition to The Crow Hill Company's ever-growing product range, and according to th...
16/06/2026
Developed in partnership with Sequential
In recent years, GForce Software have branched into official emulations of classic hardware synths, delivering a ha...
16/06/2026
Designed specifically for live performance monitoring
beyerdynamic's latest announcement sees the company introduce an affordable in-ear monitoring syst...
16/06/2026
Official emulation celebrates iconic synth's 40th anniversary
Cherry Audio have just introduced Ensoniq ESQ-1, an official recreation of the 1986 polyph...
16/06/2026
Australians place growing trust in SBS News
16 June, 2026
Media releases
SBS has been recognised as one of Australia's most trusted news providers, ran...
16/06/2026
Rohde & Schwarz achieves highest number of GCF validated 3GPP NR NTN test cases ...
16/06/2026
Bydgoszcz to Become a Local Centre of Excellence for Advanced Rail Technologies....
16/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/06/2026
87 Percent of Creators Who Use Creative AI Say It Is Growing Their Business and ...
16/06/2026
Historic Zhuque-3 Reusable Rocket Test Mission Captured with URSA Cine Immersive
Brie Clayton June 16, 2026
0 Comments
Apple Immersive Video puts view...
16/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/06/2026
Rise WIB, the award-winning advocacy group championing gender diversity and career progression across the broadcast and media technology industry, today announc...
16/06/2026
Limecraft today announced the availability of Limecraft 2026.4, the fourth of eight planned platform releases this year. The update introduces Team-Based Access...
16/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/06/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
16/06/2026
Free Program Supports IPMX Education from Foundational Concepts Through System and Network Design
The Alliance for IP Media Solutions (AIMS) today announced t...
16/06/2026
Share your views on Screen Australia and the future of the industry 15 June 2026
Your feedback matters.
Following the instrumental insights provided in 2025,...
16/06/2026
Enterprises are moving agentic AI from proof of concept to production - and the next generation of AI factories are built for the era of agents.
At HPE Discove...
16/06/2026
AI runs at the speed of light. More and more, that light is made in Texas.
Cohe...
16/06/2026
Techtel Supports T-Motion RCCP-2A Controller Upgrade for Major Australian Broadc...