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

13/06/2026

Spectrum Reach Taps Anoki AI for Contextual Intelligence

Share Copy link Facebook X Linkedin Bluesky Email...

13/06/2026

Google TV Launches Soccer Hub, New Voice Command Features

Share Copy link Facebook X Linkedin Bluesky Email...

12/06/2026

YES Network and Gotham Sports App to Air Seven Athletes Unlimited Softball League Games

YES Network and The Gotham Sports App will air seven Athletes Unlimited Softball...

12/06/2026

UFL to Feature FAST Innovation Suite at 2026 United Bowl

The United Football League will host its FAST Innovation Suite at the 2026 United Bowl presented by Credit One Bank on Saturday, June 13 at 3:00 p.m. ET at Audi...

12/06/2026

InfoComm 2026: PTZOptics and LayerJot to Demo AI-Driven Camera Control

PTZOptics and LayerJot will present live demonstrations at InfoComm 2026 showing how natural-language AI prompting, robotic camera control, and on-device comput...

12/06/2026

InfoComm 2026: MultiDyne to Debut VF-9100 Fiber Transport Platform and Crescendo Audio Monitor

MultiDyne Video and Fiber Optic Systems will exhibit at InfoComm 2026, featuring...

12/06/2026

Eurovision Services Deploys Ateme Software-Based Frame-Rate Conversion

Ateme has announced that Eurovision Services is using Ateme's software-based frame-rate conversion technology for international live event workflows. The de...

12/06/2026

Bitmovin, Simplestream, and Xperi Partner to Support OTT Services on TiVo OS

Bitmovin and Simplestream have announced a partnership with Xperi to simplify the launch of OTT streaming services on TiVo OS smart TVs and devices. The collabo...

12/06/2026

Net Insight Deploys Nimbra 520 and Nimbra Edge for Multinational Corporate Live Production Workflow

Net Insight has announced that a multinational technology company is deploying a...

12/06/2026

MLB Players Inc., Athletes First Announce Content Partnership

MLB Players Inc., the business arm of the MLB Players Association, has announced a partnership with Athletes First to develop and sell brand partnerships across...

12/06/2026

G&D and VuWall Announce CommandKeyboard-Advanced for Network-Independent Control Room Operations

Guntermann and Drunck (G&D) and VuWall have announced the CommandKeyboard-Advanc...

12/06/2026

Philadelphia Union and Comcast Deploy Smart Technology at Subaru Park and WSFS Bank Sportsplex

Comcast Smart Solutions announces a new smart technology deployment with Major L...

12/06/2026

Elevation Worship Completes First Leg of 2026 Tour Using SSL Live Consoles and New UMD192 Interface

Elevation Worship completed the initial leg of its Elevation Nights 2026 tour ...

12/06/2026

AJA Announces KONA IP25 Integration with Colorfront Transkoder and On-Set Dailies

AJA Video Systems has announced KONA IP25 support for Colorfront Transkoder and ...

12/06/2026

InfoComm 2026: Audinate To Exhibit With New AVIO Install Adapters and Iris Camera Control Platform

Audinate Group Limited (ASX: AD8) will exhibit at InfoComm 2026 (Booth C7321, Ce...

12/06/2026

Pac-12 Appoints Scott Adametz as Chief Technology Officer

Pac-12 Commissioner Teresa Gould has announced the appointment of Scott Adametz as Chief Technology Officer. The Pac-12 describes the hire as the first CTO appo...

12/06/2026

InfoComm 2026: Grass Valley Introduces AMPP Edge Live for Enterprise Production

Grass Valley has announced AMPP Edge Live, a production system combining Grass Valley hardware, NVIDIA Blackwell GPU acceleration, and AMPP OS in a single platf...

12/06/2026

University of Texas's Brandon Rudy on a New Era of Live Sports Production in Austin

At one time a trailblazer with the launch of the Longhorn Network, the Universit...

12/06/2026

Ratings Roundup: NBA Finals Game 3 Hits 28-Year High; Stanley Cup Final Is Best Since 2015 Through Four Games

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

12/06/2026

Chyron Releases PAINT 10.4 with Pro Football Data Integration and AI Player Cutout

Chyron has announced PAINT 10.4, an update to its illustrated replay and sports ...

12/06/2026

ESPN's MLB Productions Heat Up in June as Core Summer Schedule Gets Rolling

SVP, Production Mark Gross: With the new schedule, with not having every Sunday night, it's given us an opportunity to take a step back and reimagine what ...

12/06/2026

Televisas IBC Team Delivers for Opening Mexico Match

For Televisa Technical Engineering Manager Roberto N nez Ibarra and the small team of 12 technicians and two production personnel at the IBC things are already ...

12/06/2026

GearExpo UK: Home Studio Acoustics Talk

Simple Steps to Better Acoustics - Taming The Small Room Most of us mix in spare rooms and small spaces, where the acoustics fight us at every turn. At Gear...

12/06/2026

Meris introduce the Ottobit X

Latest addition expands vintage-inspired effects palette Meris' Ottobit pedal range draws its inspiration from vintage gaming consoles, and the latest a...

12/06/2026

Sonora Cinematic release Movimento Strings Inflections

Soundbox-based chamber strings series expanded Sonora Cinematic have just announced the launch of the second instalment in their Soundbox-based chamber stri...

12/06/2026

Research: Mixed Picture for FIFA World Cup Broadcast Revenues

Share Copy link Facebook X Linkedin Bluesky Email...

12/06/2026

Viant Launches Enhanced Publisher Solutions for CTV, Programmatic

Share Copy link Facebook X Linkedin Bluesky Email...

12/06/2026

AJA Announces KONA IP25 Integration with Colorfront Software

AJA Announces KONA IP25 Integration with Colorfront Software Brie Clayton June 12, 2026 0 Comments Collaboration enables uncompressed SMPTE ST 2110 I/O ...

12/06/2026

URSA Cine 12K LF Used to Create Visuals for STUTS' K-Arena Concert

URSA Cine 12K LF Used to Create Visuals for STUTS' K-Arena Concert Brie Clayton June 12, 2026 0 Comments Organic visuals projected on a giant scre...

12/06/2026

MTI FILM Acquires Mango New Edit, Expanding its Global Post-Production Services From Set to Screen

MTI FILM Acquires Mango New Edit, Expanding its Global Post-Production Services ...

12/06/2026

AI Point Tracking Speeds Up Complex VFX Tracks in Mocha Pro

AI Point Tracking Speeds Up Complex VFX Tracks in Mocha Pro Jessie Electa Petrov June 12, 2026 0 Comments The 2026.5 release adds automatic point trac...

12/06/2026

Bitmovin Partners with Simplestream and Xperi to Support...

Bitmovin, a provider of video streaming solutions, has partnered with Simplestream, a provider of OTT and broadcast solutions, and technology provider Xperi, to...

12/06/2026

Jigsaw24 Signs Deal to Resell Leostream Remote Desktop Ac...

Leostream Corporation, creator of the world-leading Leostream Remote Desktop Access Platform, today announced Jigsaw24, a leading B2B IT solutions provider wit...

12/06/2026

Study: 2026 Election Cycle to Hit Record $11.6 Billion Ad Spend

Share Copy link Facebook X Linkedin Bluesky Email...

12/06/2026

NAB Elects Leadership at June Board of Directors Meeting

Share Copy link Facebook X Linkedin Bluesky Email...

12/06/2026

FCC Believes World Cup Communication Will Score Highly

Share Copy link Facebook X Linkedin Bluesky Email...

12/06/2026

Broadcasters Back NO FAKES Act

Share Copy link Facebook X Linkedin Bluesky Email...

12/06/2026

Scripps Unveils Coverage Plans For America's 250th Anniversary

Share Copy link Facebook X Linkedin Bluesky Email...

12/06/2026

How Aussie indie games and screen are levelling up with IP

How Aussie indie games and screen are levelling up with IP 11 June 2026 Ari Harrison, Pro Jank Footy Head of Games Joey Egger and Ari Harrison of Umbrella sha...

12/06/2026

NVIDIA Blackwell Leads on First Agentic AI Infrastructure Benchmark

AgentPerf from Artificial Analysis, the industry's first agentic AI benchmark, gives developers, enterprises and infrastructure providers a clear way to com...

12/06/2026

Netflix Unveils First-Look Images from Villaflor, Santiago Mitre's New Film

Back to All News Netflix Unveils First-Look Images from Villaflor, Santiago Mitre's New Film Entertainment 12 June 2026 GlobalArgentina Link copied to ...

12/06/2026

Cross the Boundaries of the Real World into the Spirit Realm in The East Palace', Premiering July 17

Back to All News Cross the Boundaries of the Real World into the Spirit Realm i...

12/06/2026

The Future of Studio Grading. Tokyo. 23 June 2026

With John Daro, DI Colourist at Warner Bros. Water Tower Color Tuesday 23 June, 10am-1pm or 3-6pm Restar Corporation Tokyo Register here John Daro is the ...

12/06/2026

New animated series The Grumpy Onion available in English and as Gaeilge on RT KIDSjr, RT2 and RT

Meet The Grumpy Onion Ireland's newest online sensation, all he wants is to ...

12/06/2026

RT stays Up All Night with brand new daily 2026 FIFA World Cup Vodcast

RT stays Up All Night with brand new daily 2026 FIFA World Cup Vodcast Adding to the fun around 2026 FIFA World Cup tournament, RT has launched a brand new d...