
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...
01/10/2026
Big Blue Marble has announced the addition of live multiview channels to its Clo...
01/10/2026
The company CEO sees AI as a tool in speeding and enhancing product development
...
01/10/2026
Production, tech, crewing, and logistics teams draw on experience of a busy inau...
01/10/2026
The Partnership Will Support Filmmakers Worldwide Through Original Short Films I...
01/10/2026
Third collaboration with celebrated composer
Spitfire Audio have once again teamed up with Grammy-nominated composer, producer and technologist BT, creating...
01/10/2026
FL Studio gets dedicated grid controller
Novation have teamed up with FL Studio developers Image-Line to create another dedicated controller for the popular...
01/10/2026
Six new USB interfaces introduced
Universal Audio's USB audio interface line-up has just been refreshed, gaining six new models aimed at musicians, prod...
01/10/2026
Siretta's SNYPER-5G cellular network analyser has been shortlisted for the IoT Global Awards 2026.
The IoT Global Awards recognise products, services and o...
01/10/2026
Johannesburg, South Africa, 30 September 2026 - The National Film and Video Foun...
01/10/2026
Mesh Broadcast Services Fits Big-Truck Audio Power into Compact Eclipse Unit with Calrec Argo M Canadian OB company Mesh Broadcast Services has fitted its Eclip...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
For more than two decades, Disguise has powered some of the most ambitious live events and experiences in the world from Bad Bunny and Coachella to the Burj K...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
The Australian football team can turn match footage into tactical insights to improve performance and maximize fan engagement
Vizrt, the AI platform for visual...
01/10/2026
When Mesh Broadcast Services set out to fit the pro audio capability of a large TV truck into a small audio room for high-profile sports events, Calrecs Argo M ...
01/10/2026
Emergent, the browser-native broadcast graphics platform, today announced the appointment of Tom Shelburne as Head of Business Development, North America, effec...
01/10/2026
Melbourne, Australia 1 October 2026: Mediaproxy, the global standard for software-based IP compliance monitoring and multiviewing solutions, will showcase maj...
01/10/2026
Clear-Com is supporting the education and development of future audiovisual industry professionals in Poland through the deployment of its Arcadia Central Sta...
01/10/2026
Telef nica Servicios Audiovisuales (TSA), the audiovisual services arm of global telecommunications group Telef nica, has supplied and commissioned an LED wall ...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
01/10/2026
Eleven minutes between headliners. The sponsor loop needs to be on screen now, and the only operator on hand is the one running lights. With the Green Hippo Est...
01/10/2026
DigiBox has announced a new partnership with FOR-A to represent the innovative MixBoard product range in the UK market, further expanding its portfolio of broa...
01/10/2026
Screen Australia-funded documentaries bring Australian experiences and new persp...
01/10/2026
Mavis Camera 8.2 adds iPhone 18 Pro support with variable aperture control
Brie Clayton September 30, 2026
0 Comments
Latest release also introduces P...
01/10/2026
Ghosts of the Gold Rush Shot with PYXIS 6K
Brie Clayton September 30, 2026
0 Comments
Blackmagic Design cameras expertly capture documentary while del...
01/10/2026
RE:Vision Effects - RSMB V7 is here!
Lori Freitag September 30, 2026
0 Comments
ReelSmart Motion Blur 7 is here, the RSMB V7 cycle is open. ReelSmart ...
01/10/2026
VideoGen raises $3.3M seed as its AI video platform passes 5 million users
Brie Clayton September 30, 2026
0 Comments
VideoGen co-founders Anton Koeni...
01/10/2026
New taproom, restaurant, lounge and theater in the historic Power Plant add to ATC's growing social hub
Fullsteam Brewery and CBC Real Estate celebrate th...
01/10/2026
Berklee and APM Music Launch Global Catalog Bringing Student-Created Music to Fi...
01/10/2026
X-Rite Pantone Launches Spectura to Advance Connected Color Quality from Lab to ...
01/10/2026
ITVX AND WARNER BROS. DISCOVERY ANNOUNCE NEW BRANDED CONTENT PARTNERSHIP
QUEST
TLC
Under a new branded content partnership between Warner Bros. Disco...
01/10/2026
Save $50 on Ivory 3 American Concert D and German DThis fall, bring the sound and expressive character of two world-class concert grands into your studio with s...
01/10/2026
Thursday 1 October 2026
Nominees revealed for 2026 Sky Arts Awards
Current slide, 0 0, undefined1
0
Irish National Opera and Jennifer Walshe: MARS
Jacob Al...
01/10/2026
Vital TV antenna replaced at SudburyHelicopter and broadcast engineers work together to upgrade TV services for 1.5M in the East
--
Share to Linkedin
Octobe...
01/10/2026
Arqiva appoints Simon Duffy as ChairSimon Duffy joins as Chair effective 01 October 2026
--
Share to Linkedin
October 1, 2026
Press Office
01 October 2026...
01/10/2026
Season 4 of the multi-award-winning hit entertainment series The 2 Johnnies Late Night Lock In is back, serving up another round of unpredictable laughs, unforg...
01/10/2026
New season begins Sunday, 4 October at 6pm on RT lyric fm and RT Listen
RT lyric fm's arts and culture documentary series The Lyric Feature returns on S...
01/10/2026
RT is proud to continue its commitment to supporting and celebrating the arts across Ireland this October, highlighting a vibrant programme of theatre, music, ...
01/10/2026
AI factories are built by the megawatt, even by the gigawatt. Each megawatt fact...
01/10/2026
Spooky season is streaming in. Alongside falling leaves, pumpkin spice and everything nice, 25 new games are joining GeForce NOW throughout October, including s...