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 ...

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...

01/06/2026

Dolby Sets the New Standard for Premium Entertainment at CES 2026

January 6 2026, 05:30 (PST) Dolby Sets the New Standard for Premium Entertainment at CES 2026 Throughout the week, Dolby brings to life the latest innovatio...

02/05/2026

Dalet Flex LTS Delivers Smarter Search, Faster Editing, and an AI-Ready Foundation for Modern Media

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

01/05/2026

NBCUniversal's Peacock to Be First Streamer to Integrate Dolby's Full Suite of Premium Picture and Sound Innovations

January 5 2026, 18:30 (PST) NBCUniversal's Peacock to Be First Streamer to ...

08/04/2026

April 07, 2026

Scripps Research scientists uncover new mechanism cancer cells use to survive DNA damage Discovery reshapes understanding of how tumor cells repair broken DNA, ...

07/04/2026

NAB 2026: Ikegami USA To Launch Two New Viewfinders, Refine UHD Cameras

Ikegami USA will launch a refinement to the UHK-X700 and UHK-X750 3-CMOS -in. UHD cameras in the UNICAM XE series plus two new 7-in. viewfinders at NAB 2026 in...

07/04/2026

NAB 2026: NAB Leadership Foundation to Host Technology Students Career Mixer

The NAB Leadership Foundation and NAB PILOT will host a career mixer for technology students at NAB Show 2026 on April 18, 5-6:30 p.m., North Hall, Room N225/22...

07/04/2026

Survey: AVoIP Adoption Accelerating, With Interoperability and Security as Key Drivers

Audinate Group Limited and Futuresource Consulting have published results from a...

07/04/2026

NAB 2026: Eluvio Announces Commercial Availability of Content Fabric Bucharest Release

Eluvio has announced the commercial availability of its Content Fabric Bucharest...

07/04/2026

NAB 2026: Eluvio Introduces Inline AI Video Intelligence and Updated EVIE

Eluvio has unveiled a new architecture for video AI and an updated Eluvio Video Intelligence Editor (EVIE) ahead of NAB Show 2026. Eluvio AI runs analysis and i...

07/04/2026

Professional Fighters League Partners With Sky New Zealand for Exclusive Broadcast Rights

The Professional Fighters League (PFL) has announced a deal with Sky New Zealand...

07/04/2026

NBA, Enjoy Basketball' To Produce Live Game Altcast, Enjoy the NBA Trivia Show as Part of New Multi-Platform Collab

The NBA and Enjoy Basketball, the digital media company co-founded by YouTube cr...

07/04/2026

Beyond Golf: PGA of America, Ko-Mar Productions Offer Clients a Customizable Production Studio

The 4,000-sq.-ft. space in Frisco, TX, has produced live and packaged programmin...

07/04/2026

A New POV: RefCam's Rise in the Bundesliga Signals a Potential New Era for Soccer Broadcasts

What began as a referee training tool is evolving into a powerful production ass...

07/04/2026

NAB 2026: Manifold Technologies to Join NEP Platform as Deployable Application

Manifold Technologies will announce at NAB Show 2026 (Booth C.1808) that its manifold CLOUD platform will be available as a deployable application within NEP Pl...

07/04/2026

Shaquille O'Neal and TNT Sports to Launch DUNKMAN Professional Dunk League in Summer 2026

Shaquille O'Neal, Authentic Brands Group, and TNT Sports, in partnership wit...

07/04/2026

NAB 2026: Telos Alliance Unveils Omnia XII Audio Processor

Telos Alliance will debut the Omnia XII, a new FM/HD/DAB audio processor, at NAB Show 2026 in Las Vegas. Built on a 2RU hardware platform, Omnia XII features a...

07/04/2026

NAB 2026: AWS to Showcase AI and Cloud Media Technologies

Amazon Web Services (AWS) will exhibit at NAB Show 2026 (April 18-22, Las Vegas Convention Center, Booth W1701), with demonstrations, speaking sessions, and int...

07/04/2026

NAB 2026: Synamedia to Demonstrate AI by Quortex

Synamedia will demonstrate AI by Quortex at NAB Show 2026, a framework that applies AI capabilities to video workflows on demand rather than continuously. The s...

07/04/2026

NAB 2026: TVNewsCheck Announces 2026 Women in Technology Award Honorees

TVNewsCheck will present its 15th annual Women in Technology Awards on Tuesday, April 21, at 5 p.m. PT at NAB Show, in the Media and Entertainment Theater (W146...

07/04/2026

NAB 2026: Akta to Showcase AI Video Platform

Akta will demonstrate its AI video platform at NAB Show 2026, highlighting new capabilities in media processing and vertical video formatting alongside its exis...

07/04/2026

ESPN Expands to Disney+ in Europe and Select Asia-Pacific Markets

ESPN and Disney have announced the launch of ESPN on Disney in Europe and select Asia-Pacific markets, bringing the offering to 53 countries and territories a...

07/04/2026

Announcing the 2026 Sundance Institute Native Lab Fellows

LOS ANGELES, CA, April 7, 2026 - The nonprofit Sundance Institute announced today the fellows selected for the 2026 Native Lab, the signature initiative of the ...

07/04/2026

Prompted Playlist Levels Up to Include Podcasts, Helping You Explore More Interests and Curiosities

Starting today, Prompted Playlist is expanding beyond music to now include podca...

07/04/2026

VSL release Synchron Harpsichord (Blanchet)

Launched alongside piano promotion The latest instalment in VSL's Synchron Series line-up captures the sound of a faithful copy of a Fran ois tienne Bl...

07/04/2026

Roland announce SPD-SX Pro Version 2.0

Flagship sampling pad gets an update Roland's flagship sampling pad has just received a major update that kits it out with an array of new features and ...

07/04/2026

Sound Devices unveil the Astral Mini Plus

Popular compact wireless system upgraded Sound Devices have recently introduced a new and improved version of their compact wireless transmitter bodypacks, ...

07/04/2026

YEP November 2025 Newsletter

The November 2025 YEP Newsletter highlights a recent YEP Coffee Chat, offering members the chance to connect with industry professionals in an informal setting ...

07/04/2026

YEP December 2025 Newsletter

The December 2025 YEP Newsletter includes a Spotlight on Emily Vail, showcasing her career journey and work in the industry, alongside Mentorship Reflections by...

07/04/2026

US Space Force Selects L3Harris to Strengthen America's Defense with Advanced Space Surveillance

Ground-Based Electro-Optical Deep Space Surveillance (GEODSS) telescope operated...

07/04/2026

Haivision Unveils Makito ONE Live Video Contribution Platform

Share Copy link Facebook X Linkedin Bluesky Email...

07/04/2026

Neutrik To Unveil TRUE1 Data Connector Series At 2026 NAB Show

Share Copy link Facebook X Linkedin Bluesky Email...

07/04/2026

Chris Welcker Deployed Full DPA Arsenal to Record Live Mu...

Catgut Sound Owner and Production Sound Mixer Chris Welcker, CAS, has built a career at the intersection of music and film. A former musician and composer, Welc...

07/04/2026

SDVI Launches Next Generation Rally Platform to Give Medi...

SDVI Corporation today announced the next generation of its Rally media supply chain management platform, introducing a redesigned orchestration engine that rep...

07/04/2026

Avid to Debut Avid Content Core on AWS at 2026 NAB Show

Share Copy link Facebook X Linkedin Bluesky Email...

07/04/2026

Frequency Launches Smarter Ways to Operate Streaming Chan...

Frequency, the engine behind many of the world's leading streaming television channels, at NAB 2026 will be launching new Studio services to help content ow...

07/04/2026

Ikegami to Introduce Expanded Range of Broadcast Producti...

Ikegami USA has chosen NAB 2026 in Las Vegas as the launch platform for new additions to its range of broadcast-quality television production equipment. These w...

07/04/2026

Kiloview Advancing Broadcast IP Workflows with a Smarter...

April 19, 2026, Las Vegas Kiloview, an innovative provider of AV-over-IP technologies, will showcase its latest broadcast IP solutions at NAB 2026, presenting...

07/04/2026

Bitmovin Adds Support for SGAI in its Playback Products t...

Bitmovin has announced support for Server-Guided Ad Insertion (SGAI) across its playback products using HLS interstitials, enabling more advanced ad-supported s...

07/04/2026

Synamedia unveils AI by Quortex - a just-in-time AI-plugi...

Synamedia is unveiling AI by Quortex at The NAB show, a just-in-time AI plugin framework that applies intelligence only when needed across video processing, dis...

07/04/2026

Cuez Brings Four New Innovations to NAB 2026 From Story-C...

Cuez will showcase four additions to its cloud-based newsroom, rundown and automation platform at NAB Show 2026 (April 18 22, Las Vegas, Booth N1867): Cuez ...

07/04/2026

Barix Extends Transport Options for Multi-Engine IP Encoder

Barix Extends Transport Options for Multi-Engine IP Encoder Brie Clayton April 7, 2026 0 Comments New for NAB, Barix adds SRT and RIST support to Mult...

07/04/2026

Elite Media Technologies Selects Interra Systems' BATON File-Based QC Solution

Elite Media Technologies Selects Interra Systems' BATON File-Based QC Soluti...

07/04/2026

Tightrope Media Systems to Debut Cablecast LiveBridge for Simultaneous Streaming at NAB 2026

Tightrope Media Systems to Debut Cablecast LiveBridge for Simultaneous Streaming...

07/04/2026

Cuez Brings Four New Innovations to NAB 2026: From Story-Centric Newsroom to Open AI Agent Framework

Cuez Brings Four New Innovations to NAB 2026: From Story-Centric Newsroom to Ope...

07/04/2026

ASG Names Andrea Cummis VP of Systems Engineering

Share Copy link Facebook X Linkedin Bluesky Email...

07/04/2026

KTVJ Completes Major Signal Upgrade

Share Copy link Facebook X Linkedin Bluesky Email...

07/04/2026

Hearst's WDSU to Air Million Dollar Rodeo Competition

Share Copy link Facebook X Linkedin Bluesky Email...