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

18/05/2026

For PPI, New Patents and ProCrewz App Development Portend Positive Outlook for 2026

Despite a bumpy start to the year, the provider of event-production support and ...

18/05/2026

Daktronics to Install 11 LED Displays at UNCs Kenan Stadium in 2026

Daktronics has partnered with the University of North Carolina to manufacture and install 11 LED displays totaling more than 10,000 square feet and more than 14...

18/05/2026

CBS LA and Los Angeles Rams Announce Multi-Year Local Television Partnership

CBS LA has announced a multi-year partnership with the Los Angeles Rams, covering exclusive local broadcasts of Rams preseason games, weekly year-round programm...

18/05/2026

Skyline Communications Integrates DataMiner xOps with AWS Elemental MediaConnect Router

Skyline Communications has announced an integration between its DataMiner xOps p...

18/05/2026

eCLUTCH Expands International Distribution and Content Partnerships

eCLUTCH, the hybrid esports platform powered by iKOMG, has announced an expansion of its distribution across Europe, MENA, Africa, and Asia, along with new cont...

18/05/2026

Behind The Mic: Yankees Legends Reunite to Call Game Against Red Sox with Kevin Burkhardt

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

18/05/2026

NBC Sports Brings the WNBA Back Home After 23 Years Away

With 22 games this season, the production team looks forward to tweaking and enhancing the coverage After 8,660 days off the air, the WNBA returned to NBC yest...

18/05/2026

A Morbid Weight Loss Trick Triggers an Insatiable Ghost in Saccharine

(L-R) Midori Francis and Natalie Erika James attend the Saccharine premiere during the 2026 Sundance Film Festival at The Ray Theatre on January 22, 2026, in ...

18/05/2026

And the Winners of the 2026 Spotify Podcast Awards in Mexico Are. . .

Last night, the Spotify Podcast Awards in Mexico returned to the country's capital. Now in its second year, the evening honors creators whose voices are hel...

18/05/2026

Roland launch Zenology GX for iPad

ZEN-Core synth goes mobile Roland's powerful ZEN-Core software synthesizer has just been introduced to the iPad, offering a convenient entry point into ...

18/05/2026

leONE from fedDSP

Versatile new limiter plug-in announced Based in Sheffield, UK, fedDSP offer a range of plug-ins that span the music production, live sound and high-end med...

18/05/2026

Viiri Audio launch Aava

A new use for convolution? Viiri Audio's debut plug-in aims to do something a little different with convolution processing, allowing users to adjust all...

18/05/2026

Delta Goodrem shines for SBS as more than 3.27 million Australians tune in for Eurovision

Delta Goodrem shines for SBS as more than 3.27 million Australians tune in for E...

18/05/2026

L3Harris Delivers Life-Saving Robotic Systems to Keep Australian Defence Personnel Out of Harm's Way

The Australian Defence Force uses L3Harris T4 and T7 robots for explosive ordnan...

18/05/2026

CVP strengthens commitment to the DACH broadcast market w...

Continued investment across Europe and Germany is expanding local teams and improving access to stock, regional expertise, and specialist broadcast support. CV...

18/05/2026

VEON Announces Investor Meetings for a Potential Dual Tranche USD Notes Offering and Related Tender Offer for 2027 Notes

18 May 2026 Dubai and New York, May 18, 2026 - VEON Ltd. (NASDAQ: VEON), a glob...

18/05/2026

Sky News offers ad-free podcasts and bonus episodes for just 2.99 as listening surges 102%

Monday 18 May 2026 Sky News offers ad-free podcasts and bonus episodes for just...

18/05/2026

Comscore March 2026 Consumer AI Chatbot Usage Rankings Show Claude Gaining Share

Comscore March 2026 Consumer AI Chatbot Usage Rankings Show Claude Gaining Share OpenAI's ChatGPT maintains lead while Anthropic's Claude continues to c...

17/05/2026

Delta Goodrem's Eurovision Eclipse marks end of a stellar run

Delta Goodrem's Eurovision Eclipse marks end of a stellar run 17 May, 2026 Media releases Bulgaria wins Eurovision 2026 Relive every spellbinding mome...

17/05/2026

'Oasis' Premieres on Netflix June 19

Back to All News Oasis Premieres on Netflix June 19 Entertainment 17 May 2026 GlobalSpain Link copied to clipboard Summer, sunshine, the beach, parties. T...

16/05/2026

Eventide & Newfangled Audio release Fixate:Midrange

Helps to deliver a clean, balanced midrange Developed alongside Newfangled Audio, the latest plug-in in Eventide's software collection has been designed...

16/05/2026

Engine DJ 5.0 update now live

Brings onboard stem rendering to RANE System One Engine DJ have just released Engine DJ 5.0, a free update for their Engine DJ OS embedded hardware and Engi...

16/05/2026

Boris FX Continuum Pairs AI Precision and Advanced Creative Controls

Boris FX Continuum Pairs AI Precision and Advanced Creative Controls Jessie Electa Petrov May 16, 2026 0 Comments The 2026.5 release adds automatic de...

16/05/2026

Spectrum TV Adds Free Access to Discovery+

Share Copy link Facebook X Linkedin Bluesky Email...

16/05/2026

Tower Family Foundation Passes $3.5 Million Milestone

Share Copy link Facebook X Linkedin Bluesky Email...

16/05/2026

AIMS to Offer IPMX Education at InfoComm 2026

Share Copy link Facebook X Linkedin Bluesky Email...

16/05/2026

Rise AV Launches Second Year of UK Elevate Program

Share Copy link Facebook X Linkedin Bluesky Email...

15/05/2026

Seattle Sounders FC and Reign FC Announce Seattle Soccer Celebration at Waterfront Park

Seattle Sounders FC and Seattle Reign FC, in partnership with RAVE Foundation an...

15/05/2026

How Sound Designer Dan Brumm Built Blueys Audio World with Sennheiser and Neumann

Dan Brumm has served as sound designer on Bluey, the Australian children's t...

15/05/2026

Applications Close May 31 for Mark Brunner Professional Audio Scholarship

The Professional Audio Manufacturers Alliance (PAMA) and Shure Incorporated are accepting applications for the 6th annual Mark Brunner Professional Audio Schola...

15/05/2026

Netflix Expands NFL Coverage With Additional Games Starting in 2026

Netflix has announced an expanded NFL schedule for 2026 and beyond under a four-year partnership extension with the NFL through the 2029-30 season. Each season,...

15/05/2026

Ateme Supports TVRIs SRT-Based Live Sports Contribution and Distribution Workflow

Ateme is supporting TVRI (Televisi Republik Indonesia) with a contribution and d...

15/05/2026

Concacaf Launches New Website and Mobile App Powered by Deltatre

Concacaf has announced the launch of a new website and mobile app built on Deltatre's FORGE platform. Concacaf.com and the mobile app, available on iOS and ...

15/05/2026

Qatar Media Corporation Launches QBC Business Channel in 4K via Eutelsat

Eutelsat has announced the launch of QBC Business Economic Channel by Qatar Media Corporation, broadcasting in 4K/UHD via Eutelsat's 7/8 West video neighbo...

15/05/2026

Amazon to Serve as Exclusive Launch Home of MLS Original Series Cup Dreams on May 14

Major League Soccer has announced four original content series timed to the 2026...

15/05/2026

AIMS to Focus on IPMX Education at InfoComm 2026

The Alliance for IP Media Solutions (AIMS) has announced it will exhibit and present at InfoComm 2026, taking place June 13-19 at the Las Vegas Convention Cente...

15/05/2026

InfoComm 2026To Feature Sports, Broadcast, and Live Event Technologies

InfoComm 2026 will take place June 13-19 (exhibits June 17-19) at the Las Vegas Convention Center. The show will include sessions and exhibits covering broadcas...

15/05/2026

Tracy McGradys Ones Basketball League Signs First Streaming Agreement with Fubo Sports Network

Tracy McGrady's Ones Basketball League (OBL) and FuboTV Inc. have announced ...

15/05/2026

Disguise and Creative Technology Return for Eighth Year at Eurovision Song Contest 2026

Disguise has partnered with Creative Technology (CT) to deliver visual playback ...

15/05/2026

Sony Announces Alpha 7R VI Camera and FE 100-400mm F4.5 GM OSS Lens

Sony Electronics has announced two new products for professional imaging: the Alpha 7R VI full-frame mirrorless camera and the FE 100-400mm F4.5 GM OSS super-te...

15/05/2026

SVG GameDay, Ep. 15: New Jersey Devils Joe Kuchie - Growing the Game in the Garden State

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

15/05/2026

Ratings Roundup: ESPN Secures Top Viewed Second Round Game 4 of Stanley Cup on Cable; NBA Draft Lottery Viewership Up 23%

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

15/05/2026

The Future of Sports Analytics: Building Trust and Intelligence With SmerSports and Cisco

For sports organizations, the most valuable assets are often the most sensitive:...

15/05/2026

NFL Broadcast Schedule Roundup: Breaking Down CBS, ESPN, FOX, NBC, Netflix, and Prime Lineups

The NFL's broadcast partners released their 2026 regular season schedules ye...

15/05/2026

Netflix Steps Into the Cage for First MMA Production With Rousey-Carano Showdown at Intuit Dome

Besides drawing on experience with boxing, the production integrates specialty c...