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

17/11/2026

Fabric Insights and Fonn Group Partner to Connect Newsroom Planning and Media Operations

Fabric Insights and Fonn Group have announced a partnership to connect editorial...

17/11/2026

NABJ Online Seminar Highlights Black Sports Production Legends on Nov. 25

The National Association of Black Journalists is offering up a Thanksgiving Eve treat on Wednesday, Nov. 25, in the form of a live streaming event featuring for...

17/11/2026

Bridge Technologies Adds Apple ProRes Support to VB440 Production Probe

Bridge Technologies has announced that its VB440 production probe now supports both monitoring and signal generation for Apple ProRes video streams. The additio...

17/11/2026

Canon U.S.A. Hosts Jericho High School Journalism Students at Melville Headquarters

Canon U.S.A., Inc. recently welcomed 21 Jericho High School students to its Melv...

17/11/2026

Amagi to Power Live Newscasts for Spectrum News

Spectrum News has deployed the Amagi platform to support its live news operations. Amagi says the platform lets Spectrum News streamline newsroom workflows, red...

17/11/2026

Microsoft Expands Haivision Video Contribution Deployment, Adds Makito ONE for Global Live Events

Microsoft has expanded its use of Haivision's live video contribution ecosys...

17/11/2026

Setanta Sports Deploys Ateme TITAN Live for OTT Sports Streaming

Setanta Sports has deployed Ateme's TITAN Live platform to support its OTT video delivery operations. Ateme's transcoding technology is integrated into ...

17/11/2026

Media Links Joins Panasonic's KAIROS Alliance Partner Program

Media Links has joined the KAIROS Alliance Partner program for Panasonic's KAIROS IT/IP live video production platform. The company completed interoperabili...

17/11/2026

Behind The Mic: Dan Hicks, Iconic NBC Sports Broadcaster, Passes Away at 64

Behind The Mic provides a roundup of recent news regarding on-air talent, including new deals, departures, and assignments compiled from press releases and repo...

17/11/2026

2026 Sports Broadcasting Hall of Fame: Jim Dove, an Innovator Offering Second Looks at the Greatest Plays in Sports

In live sports and in life, things go by in the blink of an eye. Savoring the mo...

17/11/2026

SVG Sit-Down: Eutelsat's Gonzalez, Carroccia on C-Band Clearing, LEO Contribution, the Future of Satellite in Sports

Satellite operators are adding a new generation of low-Earth-orbit (LEO) network...

17/11/2026

Clear-Com Delivers Portable Wireless Systems for Aircraft Communications Security Testing

Clear-Com has delivered five customized test systems for electromagnetic securit...

17/11/2026

Stephen Arnold Music Creates Sonic Identity for WTGL

Stephen Arnold Music (SAM) has created the sonic identity for WTGL, the women's team golf league from TMRW Sports, created in partnership with the LPGA and ...

17/11/2026

PAMA Introduces Give Sound a Voice Initiative to Promote the Value of Sound

The Professional Audio Manufacturers Alliance (PAMA) has introduced Give Sound a Voice, an initiative aimed at raising awareness of the value of sound among the...

17/11/2026

Fanatics Studios Names Jamal Henderson First President of Film & TV

Fanatics Studios, the sports entertainment joint venture between Fanatics and OBB, has named Jamal Henderson its first President of Film & TV, announced Michael...

17/11/2026

NFL Thanksgiving Week Halftime Shows to Feature U2, Wu-Tang Clan, Miranda Lambert and Goo Goo Dolls

The NFL's Thanksgiving Week games will feature halftime performances by U2, ...

17/11/2026

FanSided Launches Redesigned App with Live Scores and Personalized Feeds

FanSided, a Minute brand with more than 250 fan communities, has launched a redesigned mobile app that combines team news, analysis, live game coverage, stats a...

17/11/2026

Major League Volleyball Announces 2027 Media Lineup with NBC Sports, ESPN, ION and CBS Sports

Major League Volleyball (MLV), the longest-running indoor professional volleybal...

17/11/2026

Prime Video to Present Black Friday Sports Lineup in 200+ Countries, No Subscription Required

Prime Video will present a 15-hour slate of live sports on Black Friday, Nov. 27...

17/11/2026

DIOR X SUNDANCE INSTITUTE PARTNERSHIP ANNOUNCED AHEAD OF 2027 SUNDANCE FILM FESTIVAL

Catherine Dior was more than a muse. A Resistance fighter, a survivor of deporta...

17/11/2026

Freqport introduce FreqLift plug-in

Multiband dynamics plug-in boasts FT1 integration Freqport's latest plug-in combines multiband upward and downward dynamics with the company's renow...

17/11/2026

Studio 5X: Debut monitors from Teufel Audio

Hi-fi experts launch two pro-audio models Berlin-based hi-fi experts Teufel Audio have recently branched out into the pro-audio world with their first pairs...

17/11/2026

EastWest Black Friday 2026

A year of ComposerCloud+ for $99 EastWest's annual Black Friday Sale is already live, and new users are being offered one year of the all-encompassing C...

17/11/2026

SOS Awards: Make Your Vote Count!

Pick your favourite gear from 2026 The annual SOS Awards are now underway, and as always, we're asking readers to help us choose the best pro-audio rele...

17/11/2026

Production capacity expanded at SGL Carbons Ried im Innkreis site

As part of an ongoing series production program for a German automaker, production capacity has been increased at SGL Carbon's Austrian site in Ried im Innk...

17/11/2026

Clear-Com Delivers Portable Wireless Systems for Secure Aircraft Communications Testing

eds3_5_jq(document).ready(function($) { $(#eds_sliderM519).chameleonSlider_2_1({...

17/11/2026

Signiant Acquires Media Intelligence Technology

Signiant has acquired the media intelligence technology, Ceivo, developed by Burnlab with founder Aaron Sloman joining the company as Vice President, Product Ma...

17/11/2026

Broadcasters to Conduct EAS Test Today

Share {alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...

17/11/2026

Microsoft Taps Haivision Contribution, Video Transport Solutions for Live Events

Share {alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...

17/11/2026

NAB Promotes Broadcast Positioning System Amid Tech Outages

Share {alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...

17/11/2026

Colorfront's Color Management Added to RED Camera Feeds

Share {alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...

17/11/2026

Berklees 2027 Alumni Grammy Nominees: See the Full List

Berklees 2027 Alumni Grammy Nominees: See the Full List From pop and R&B to jazz, musical theater, and video game scores, Berklee talent is represented across...

17/11/2026

Sinclair's Bill Fanshawe Sets Retirement

Share {alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...

17/11/2026

WCVB Boston Names Michael Murgia Director of Engineering

Share {alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...

17/11/2026

Two Scripps Research faculty named inaugural recipients of the Schultz Innovative Investigator Award

LA JOLLA, CA-Two Scripps Research faculty, Assistant Professor Christian Diercks...

17/11/2026

Synthogy Black Friday Savings - 33% on ALL Ivory 3 products

Our Biggest Sale of the Year on Ivory 3! From November 17th through November 30th, enjoy our best savings of the year on Ivory 3 Products! Whether it's ou...

17/11/2026

Sky announces major free upgrade to the Sky Glass and Sky Stream experience with the launch of the new Sky OS

Tuesday 17 November 2026 Sky announces major free upgrade to the Sky Glass and ...

17/11/2026

Passion, Betrayal and Scandal: Sky Arts Reveals the Man Behind the Music in Dangerous Debussy, Premiering 1 December

Tuesday 17 November 2026 Passion, Betrayal and Scandal: Sky Arts Reveals the Ma...

17/11/2026

Exact 3D Video launches AI service that turns product documents and CAD files into narrated 3D explainer videos

Exact 3D Video, a web service based in Japan, has launched its English version, ...

17/11/2026

Apple Podcasts names Baby, this is Keke\u00A0Palmer the 2026 Show of the Year - UPDATE - Posted on 17 November 2026

Today, Apple Podcasts named Baby, this is Keke Palmer its Show of the Year, hono...

17/11/2026

Ian Buck Kicks Off NVIDIA's Week at SC26 as Science Enters the Age of Agents

NVIDIA's Ian Buck kicked off the company's week at SC26 in Chicago on Monday with new tools for AI agents, software that can plan experiments, run code ...

16/11/2026

ESPN Edge Partners Chart a Future Built on Data, AI and a New Generation of Fans

The ESPN Edge Innovation Conference once again gave key ESPN technology partners as a chance to take to the stage and discuss the future of sports fan experienc...

16/11/2026

IMGs Ashley Shaner: How Micro-Dramas Can Build Sports Media Audiences and Why Content Creators Matter

As rights holders rethink who tells their stories and where, IMG is preparing th...

16/11/2026

Heard' at SVG Live!: Audio Needs To Make More Noise

From the sidelines, sonic savants advocate for greater emphasis on sound as sports and entertainment increasingly merge SVG Live!, a one-day event on Nov. 10 i...

16/11/2026

Yamaha To Acquire Disguise, Expanding Into Live Sports, Venue Production, and Immersive Entertainment

Deal combines Yamaha's audio technology with Disguise's visual-productio...

16/11/2026

New plug-in suite from Berry Effects

Creative effects designed to encourage experimentation Berry Effects is the brainchild of Abe and Ralph, a pair of multi-instrumentalists and audio engineer...

16/11/2026

Anukari 1.1 now available

Physics-based synth gets first major update Anukari have just released a new version of their innovative physics-based software synth, marking the instrumen...

16/11/2026

Hit'n'Mix RipX DAW 9 arrives

Both versions kitted out with new tools & improvements Hit'n'Mix have just launched the latest major version of their innovative DAW software, with ...

16/11/2026

Eventide to launch SplitEQ 2

Dynamic bands, unmasking features & new stereo tools Launched in 2021, Eventide's SplitEQ plug-in introduced an interesting new approach to EQ, with the...