Sony Pixel Power calrec Sony

ree Simple Meods to Invoke the Vidispine API From .NET Code

15/06/2016

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.
LINK: http://howto.vidispine.com/insight/three-simple-methods-to-invoke-the-...
See more stories from vidispine

Most recent headlines

05/01/2027

Worlds first 802.15.4ab-UWB chip verified by Calterah and Rohde & Schwarz to be demoed at CES 2026

Worlds first 802.15.4ab-UWB chip verified by Calterah and Rohde & Schwarz to be ...

06/09/2026

Dolby and MagentaTV Bring Fans Closer to the FIFA World Cup 2026 in Germany with Dolby Vision and Dolby Atmos

June 9 2026, 23:00 (PDT) Dolby and MagentaTV Bring Fans Closer to the FIFA Worl...

04/08/2026

Dalet Announces Commercial Availability of Dalia, Bringing Media-Aware Agentic AI to Enterprise Productions

Dalet, a leading technology and service provider for media-rich organizations, t...

04/07/2026

Detective Conan: Fallen Angel of the Highway Opens in Dolby Cinemas Across Japan, Presented in Dolby Atmos and Dolby ...

April 7 2026, 19:00 (PDT) Detective Conan: Fallen Angel of the Highway Opens in...

22/06/2026

Behind the Mic: SportsCenters Lisa Cohn to Retire This June From ESPN as Longest-Tenured Anchor

Behind The Mic provides a roundup of recent news regarding on-air talent, includ...

22/06/2026

Cosm Appoints David Ho as Chief Legal Officer

Cosm has announced the appointment of David Ho as Chief Legal Officer, a newly created executive role reporting to President and CEO Jeb Terry. Ho will oversee ...

22/06/2026

Warner Bros. Discovery and AWS Announce AI-Powered Advertising Technology Platform

Warner Bros. Discovery and Amazon Web Services (AWS) have announced the developm...

22/06/2026

Daktronics Completes Audio Control System Upgrade at Petco Park for San Diego Padres

Daktronics has completed an audio control system upgrade at Petco Park in San Di...

22/06/2026

Accelerate Media Names John Willi President, Launches Accelerate Sports Network

Accelerate Media has named John Willi as President and announced the launch of the Accelerate Sports Network (ASN), a prep sports media and streaming platform c...

22/06/2026

AWSN to Air 3XBA Womens Basketball Tournament Live June 26-27

All Women's Sports Network (AWSN) and 3XBA (3 3 Basketball Association) have announced live television coverage of the annual 3XBA tournament on Friday, Jun...

22/06/2026

OWL AI Appoints Jay Prasad as Chief Executive Officer

OWL AI has announced the appointment of Jay Prasad as Chief Executive Officer and member of the Board of Directors. Prasad succeeds Josh Gwyther, who has served...

22/06/2026

CP Communications Provides RF Support for Inside the NBA at 2026 NBA Finals

CP Communications delivered RF video and audio support for TNT's Inside the NBA at the 2026 NBA Finals, providing main show coverage in San Antonio and ea...

22/06/2026

Polymarket and GRID Partner to Integrate Esports Data and Streaming into Trading Platform

Polymarket has announced a partnership with GRID, an official esports data platf...

22/06/2026

SVG New Sponsor Spotlight: Metinteractive's Rachel Mele, Ken Cyr on Building Technology Backbones for Sports Venues

As sports venues continue to evolve into more video-centric, fan-engagement-driv...

22/06/2026

SVG All-Stars: Corbin Perkins, Chief Engineer, Victory+

As the regional sports production scene shifts toward streaming, this Texan helps lead the engineering behind Victory+'s growing live platform...

22/06/2026

Meet the 2026 Sundance Institute Documentary Edit Intensive Fellows

By Kristin Feeley, Director, Documentary Film & Artist Programs the memories of your elders [are] a scaffolding for you to build your identity on - and t...

22/06/2026

Blade joins CEDAR Audio Icons line-up

New hyper-resolution analyser EQ revealed CEDAR Audio's all-new Icons plug-in series has just gained its newest member, Blade. Described by the compan...

22/06/2026

Sampleson release Aeronaut

Turn any live input into a cinematic soundscape Designed for use in the studio and on stage, Sampleson's latest creation is capable of taking any audio ...

22/06/2026

ADDAC System's new Four Strings Series

Adds guitar strings to Eurorack rigs ADDAC System are renowned for their weird and wonderful synth designs, and their line-up includes plenty of gear that&#...

22/06/2026

FIFA World Cup 2026 fever grows, as more than one third of Australians tune in to SBS coverage

FIFA World Cup 2026 fever grows, as more than one third of Australians tune in ...

22/06/2026

NAGRA Venturi - Turning Piracy Intelligence into Measurable Business Impact

In our latest blog, Tim Pearson explores NAGRA Venturi, the new streaming security solution for the AI era from NAGRAVISION. Designed to aggregate and analyze ...

22/06/2026

Xumo Expands Contextual Targeting Capabilities Through Gracenote and IRIS.TV Integrations

Expanded integrations give advertisers access to distinct contextual signals acr...

22/06/2026

Greg Garmon Joins Imagine as Senior VP, Americas Video Sales

Share Copy link Facebook X Linkedin Bluesky Email...

22/06/2026

Kaleidescape Breaks the 8K and 4:4:4 Barriers

Share Copy link Facebook X Linkedin Bluesky Email...

22/06/2026

Xilica introduces Dynamic Voice Lift in new Designer

Xilica today announced the release of Dynamic Voice Lift, a new feature in Xilica Designer v4.12 that brings adaptive speech reinforcement to large meeting spac...

22/06/2026

Official trailer released for Katie Price: Nothing to Hide, coming to Sky and NOW on 8 July

Monday 22 June 2026 Official trailer released for Katie Price: Nothing to Hide,...

22/06/2026

Eco Wave Power Turns Waves Into Watts With NVIDIA AI Infrastructure and Digital Twins

The next era of AI will not be defined by compute alone. Its growth will be dete...

22/06/2026

NVIDIA Vera CPU Opens the Way for Agentic Scientific AI at Los Alamos National Laboratory

Mission, Vision and Veritas - new Los Alamos National Laboratory (LANL) supercom...

22/06/2026

From Materials Simulation to Experimental Astronomy, New NVIDIA AI Software Unlocks Scientific Discoveries

At the ISC conference running in Hamburg this week, NVIDIA is introducing new so...

22/06/2026

NAIRR Science Program Reshapes Scientific Research, Powered by NVIDIA AI Infrastructure

For the past two years, the U.S. National Science Foundation's National Arti...

22/06/2026

At ISC, JUPITER Shows What Exascale Science Looks Like

JUPITER, Europe's first exascale supercomputer at Germany's Forschungszentrum J lich, runs on NVIDIA Grace Hopper Superchips and NVIDIA Quantum-X800 Inf...

21/06/2026

FIFAs Oscar Sanchez on World Cup Effort: Were Feeling Good and Where We Want to Be

To call the 2026 FIFA World Cup a big undertaking would be a big understatement....

21/06/2026

John Walden's Cubase Video Tutorials

New series now live on Udemy Regular SOS contributor and Cubase workshop columnist John Walden has just released a new Cubase video course that is now avail...

21/06/2026

Hotter Than a Hot Tub: The 45C Breakthrough to Cool AI's Biggest Machines

Hot tubs sit at about 38 to 40 degrees Celsius, warm enough that most people can only soak for about 15 minutes. NVIDIA's newest AI servers can run their co...

21/06/2026

Sky announces immersive documentary series The Wargame

Sunday 21 June 2026 Sky announces immersive documentary series The Wargame The Wargame first looks ZIP (2MB) Sky today confirms the commission of The Wargam...

20/06/2026

IK Multimedia introduce ReSing Doubling

New add-on creates doubles & vocal stacks IK Multimedia's latest ReSing add-on kits the innovative software out with the ability to automatically genera...

20/06/2026

What's Next for Apogee? Start Here.

What exactly is Apogee Control V3? Control V3 is a new mixer application that controls Apogee interfaces. The new hit feature is that V3 finally allows for...

19/06/2026

NBC Sports U.S. Open Coverage Fires Up 92 Cameras, Bunker cams

Split compound eases operational challenges at Shinnecock Hills Golf Club...

19/06/2026

ESPN's Men's College World Series Production Adds Onsite Studio, POVORA CapCams, Expanded Drone Coverage for Finale in Omaha

North Carolina, Oklahoma meet in the best-of-three Finals as ESPN leans into spe...

19/06/2026

Ninja AB from The Him DSP

Company launch comprehensive mix-comparison tool The Him DSP are a plug-in company founded by The Him, an EDM DJ and producer who has amassed over half a bi...

19/06/2026

Bitwig Studio 6.1 enters beta testing

Major Sampler upgrades introduced The latest version of Bitwig's DAW software has just entered public beta testing, and is available now for all users w...

19/06/2026

Akai Pro's MPC One & MPC Key 37 get G2 upgrade

Four times the power of their predecessors Akai Pro have just introduced upgraded versions of two of their popular standalone MPC systems, kitting them out ...

19/06/2026

Eurovision secures top four position as content distributor rankings hold steady in Poland

Data from May shows seasonal outdoor trends triggers lower viewing Warsaw, Pola...

19/06/2026

Bitfocus Buttons wins another top industry award

Buttons is best control system in the rAVe Best of Infocomm Awards 2026...

19/06/2026

Mavis Studio Makes iPad Production More Powerful

Mavis Studio Makes iPad Production More Powerful Brie Clayton June 19, 2026 0 Comments InfoComm update brings new NDI Preview, PTZ control, USB audio ...

19/06/2026

Immersive Studio Metaverse Stage Tackles Post with Blackmagic Design

Immersive Studio Metaverse Stage Tackles Post with Blackmagic Design Brie Clayton June 19, 2026 0 Comments New narrative projects rely on DaVinci Reso...

19/06/2026

How to Run the Original 1993 After Effects

How to Run the Original 1993 After Effects Graham Quince June 19, 2026 0 Comments How to the original After Effects v1 in an emulator, and you don'...

19/06/2026

IBC Show to Increase Focus on Networking, Startups

Share Copy link Facebook X Linkedin Bluesky Email...

19/06/2026

Irdeto Taps Axel Gallant as CEO

Share Copy link Facebook X Linkedin Bluesky Email...

19/06/2026

SMPTE Makes Its Standards Freely Accessible - Opening St...

SMPTE , the home of media professionals, technologists and engineers, has announced that its entire Standards catalog is now freely available to the global medi...