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

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

25/04/2026

WNBA Offers Free Streaming of all Preseason Games

Share Copy link Facebook X Linkedin Bluesky Email...

24/04/2026

Churchill Downs Inc. Acquires Preakness Stakes for $85 Million

Churchill Downs Inc. (CDI) has announced a definitive agreement to acquire the intellectual property of the Preakness Stakes and Black-Eyed Susan Stakes from 1/...

24/04/2026

Inter Miami CF Opens Miami Freedom Park with 26 LED Displays From Daktronics, DCL

Daktronics has partnered with DCL (Design Communications, Ltd.) to design, manuf...

24/04/2026

NAB 2026: Chyron Launches PRIME Translate for Multi-Language Live Production

Chyron has announced PRIME Translate, a workflow solution that produces live content simultaneously in multiple languages within the PRIME platform. The system ...

24/04/2026

Eutelsat Supports Co-op Cable in Launching Expanded DTH Offering Across the Caribbean

Eutelsat has announced a new partnership with Co-op Cable, introducing an expand...

24/04/2026

Pitch Dublin Deploys Panasonic Laser LCD Projectors for Indoor Golf and Hospitality Venue

Pitch Dublin, an indoor golf simulation and hospitality venue on Dawson Street i...

24/04/2026

G&D and VuWall Appoint Mirko Aubel as EVP Sales EMEA/APAC, Eric Hnique as Chief Revenue Officer

G&D and VuWall have announced two senior leadership appointments, effective Apri...

24/04/2026

Victory+ Becomes Exclusive Local Streaming Home for Minnesota Lynx

Victory , the free sports streaming service from A Parent Media Co. Inc. (APMC), has announced a multi-year agreement to become the exclusive local streaming ho...

24/04/2026

SVG Students To Watch: Jason Weitz, University of South Florida

The former business major from Massachusetts has found his home in graphics and bug operation while contributing to live ESPN productions In the live-sports-vi...

24/04/2026

MASN and Spectrum Announce Multiyear Carriage Agreement

The Mid-Atlantic Sports Network (MASN) and Spectrum have announced a multiyear carriage agreement making MASN available to Spectrum customers in areas of southe...

24/04/2026

Case Study: 4Wall Entertainment Powers 2026 NFL Draft on NETGEAR AV Line Network

The NFL Draft is rebuilt from the ground up in a new city every year. The three-day fan festival is expected to draw 500,000 or more attendees, with millions fo...

24/04/2026

Diversified Continues Live Sports Expansion, Supports Mobile TV Group Ops Center Buildout

Diversified has continued expansion of its sports and media capabilities to supp...

24/04/2026

NAB Show 2026 Is In The Books! Our Coverage Continues at SVG's SportsTech@NABShow Blog

NAB reports that the 2026 NAB Show wrapped with more than 58,000 registered atte...

24/04/2026

NAB 2026: Clear-Com Announces Updates to Arcadia Central Station and Eclipse HX with New ARC Architecture

Clear-Com has announced significant updates to its Arcadia Central Station and E...

24/04/2026

NAB Reports 58,000+ Registered Attendees at 2026 NAB Show, Up From 2025 but Down From 2024

NAB reports that the 2026 NAB Show wrapped with more than 58,000 registered atte...

24/04/2026

Ratings Roundup: NHL Sees Best Regular Season Average Since 2013; CBS Sports Secures Most Watched Final Round Masters

Ratings Roundup is a rundown of recent rating news and is derived from press rel...

24/04/2026

Bleacher Reports Live NFL Draft Stream Builds on Record-Breaking Audience With Player-Driven, Interactive Production

B/R NFL Draft Live' refines the digital giant's productions around footb...

24/04/2026

Sportradar Report: The Viewing Experience Is the Product' as Sports Media Enters New Era of Personalization, Data-Driven Storytelling

Study highlights five pillars shaping modern fan engagement as broadcasters reth...

24/04/2026

ESPN/ABC, NFL Network Prepare for Record-Setting NFL Draft Presentation From Pittsburgh

The 2026 event, the first Draft with NFL Network under the ESPN umbrella, will b...

24/04/2026

SVG GameDay, Ep. 12: Detroit Lions' Jessica Shlemon - Motor City Football at Ford Field

In-venue and creative video staffers at the professional and collegiate level ha...

24/04/2026

Van Wagner Brings Warhol-Inspired Pop Art Vision to NFL Draft Videoboard Production

Integral to the Draft production for three almost decades, the company tells the...

24/04/2026

Film Festival Watch: 17 Sundance Institute-Supported Films to Screen at the 2026 Hot Docs Festival

Championing documentaries that illuminate and expand the artform is at the core ...

24/04/2026

Audiobooks About Climate, Conservation, and the Stories They Inspire

Earth Day is a chance to reflect on our connection to the natural world. To mark the 57th Earth Day on April 22, Spotify's editors have pulled together a co...

24/04/2026

From Page to Stage: Spotify Celebrates Storytelling at the LA Times Festival of Books

This past weekend, Spotify was at the heart of the largest literary event in the...

24/04/2026

What 20 Years of Spotify Data Reveals About Our Listeners

All data tells a story, and in our case, that story is written by you. To celebrate 20 years of Spotify, we're sharing bite sized moments that capture how t...

24/04/2026

The Look Behind the Sound

Over the past 20 years, Spotify's look and feel has evolved with the way people use our platform, while ensuring we preserve an intuitive, personal, and fam...

24/04/2026

Spotify at 20: The Most Streamed Music, Podcasts, and Audiobooks of All Time

It's been 20 years since Spotify began, but the real story is what the world chose to play. For the first time, we're unveiling the most streamed artist...

24/04/2026

Spotify Brings Music and Podcast Recommendations to Claude

Whether you're relaxing at home or on the go, Spotify is there across more than 2,000 devices, ready with your favorites or something new to discover. Now, ...

24/04/2026

Nintendo and Spotify Bring Nostalgia with New Super Mario Galaxy' Playlists

Nintendo and Spotify are welcoming fans to the Super Mario Bros. 40th anniversary and the release of The Super Mario Galaxy Movie with new playlists and a speci...

24/04/2026

AES Show moves to Nashville

30 October - 1 November 2026 The Audio Engineering Society (AES) have announced that the AES Show 2026 will be held on Halloween weekend - Friday 30 October...

24/04/2026

Sennheiser introduce the HD 480 Pro

New closed-back design promises honest' low end Sennheiser have just announced the launch of a new pair of flagship closed-back headphones which they s...

24/04/2026

Cre8audio unveil the Programm

Powerful 12-channel hardware sequencer announced Cre8audio are renowned for their innovative, and often visually striking designs, and although their latest...

24/04/2026

IK Multimedia ARC X Immersive arrives

Room correction now supports full 9.1.6 Dolby Atmos setups The software element of IK Multimedia's room-correction system has just received an update th...

24/04/2026

VSL announce free Big Bang Orchestra expansions

New content for BBO Tutti & BBO Riffs VSL have recently introduced some new free content expansions for two of their most popular Big Bang Orchestra Packs: ...

24/04/2026

Rohde & Schwarz to highlight its R&S EVSD1000 UAV-based navigation analyzer at IFIS 2026

Rohde & Schwarz to highlight its R&S EVSD1000 UAV-based navigation analyzer at I...

24/04/2026

Call for NFVF funding applications to attend Film Festivals and Markets taking place from 01 30 June 2026

The National Film and Video Foundation (NFVF) is pleased to announce that the ca...

24/04/2026

Andrea Riseborough & Ashley Walters To Star In ITV Thriller First Woman' About Race To Find Missing Astronaut

ITV's Director of Drama Polly Hill has commissioned six part propulsive, lun...

24/04/2026

NASA Receives L3Harris' Modified Next-Generation Research Aircraft

The NASA 777 aircraft departs the L3Harris facility in Waco, Texas....

24/04/2026

L3Harris Closes $1B Investment from Department of War in Missile Solutions Business

WASHINGTON, April 23, 2026 - L3Harris Technologies (NYSE: LHX) has closed a $1 b...

24/04/2026

Autonomous Logistics is the Marine Corps' Next Combat Advantage

In partnership with Airbus U.S. Space & Defense, Inc., L3Harris Technologies is advancing autonomous aviation for the U.S. Marine Corps' Aerial Logistics Co...

24/04/2026

Open, Connected, Decisive: the L3Harris hC2 Software Suite

L3Harris' hC2 software, powered by Systematic SitaWare, strengthens battlefield decision-making by using open architectures to connect platforms, sensors an...

24/04/2026

AERIS X Airborne Early Warning & Control: The Right Choice for Allied Homeland Defense

Artist rendering of L3Harris' AERIS X next-generation airborne early warning...

24/04/2026

AgileTV showcases its TV solutions at NAB Show and wins Best of Show Award

AgileTV presents in Las Vegas its technological proposition to power safer, more scalable and efficient TV ecosystems for telecom operators, ISPs and entertainm...