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

23/11/2026

How Meta, Cosm and ESPN are Leading a New Era of Immersive Sports Experiences

The ESPN Edge Innovation Conference is a yearly touchstone for next-generation and one of the most interesting and challenging continues to be the consumer adop...

23/11/2026

2026 Sports Broadcasting Hall of Fame: Troy Aikman, an Unexpected Second Calling

It started as a favor to a friend. And, if Troy Aikman was being completely honest, the prospect of a two-week paid European vacation didn't sound half bad,...

23/11/2026

Full Day Productions President Dave Chamberlin on the Opportunities in Bringing Sports and Live Entertainment Together

From the ESPY Awards and NFL Honors to college volleyball and the Met Gala, stor...

23/11/2026

TGL, WTGL Are Sounding as Interesting as They Look

Cinematic sound gives the upstart tech-heavy league - both the men's and the women's version - a powerful underscore It's like doing Foley for a m...

23/11/2026

AWS AI To Power Real-Time Win Probabilities During The Skins Game on Prime Video

A match-play engine rebuilt for the Skins format will drive on-screen graphics and drone AR overlays on Black Friday Prime Video will continue to push the boun...

23/11/2026

Panasonic Announces AU-SHX1 Compact Cinema Camera for Broadcast and Live Production

Panasonic announced the AU-SHX1, the first compact cinema camera in LUMIX histor...

23/11/2026

ATSC Celebrates Jerry Whitaker and Zandra Clarke on SMPTE Honors

ATSC, The Broadcast Standards Association, has congratulated former Vice President of Standards Development Jerry Whitaker and board member Zandra Clarke on rec...

23/11/2026

DoP Peter Vidulich Shoots Netflixs Wonkas The Golden Ticket with More Than 100 Sony Cameras

Bringing Wonka's The Golden Ticket and its chocolate factory to life for Net...

23/11/2026

Diversified Joins Disguise Channel Partner Program

Diversified, an audiovisual, broadcast and digital experience integrator, has joined the Disguise Channel Partner Program, combining its integration work with D...

23/11/2026

TGLs Custom Holes Launch on Full Swing Simulators and KIT Launch Monitors

TGL presented by SoFi and Full Swing have announced that all custom-designed competition holes from the 2026 TGL season are now available on Full Swing simulato...

23/11/2026

Shy Audio launch 80s Samplez & Mini bundle

Two plug-ins inspired by iconic sampler With a collection of 1990's home-studio hardware emulations already under their belt, Shy Audio have rolled the ...

23/11/2026

MONO Music Conference Round-up

Sucessful event welcomed over 700 attendees The MONO Music Conference 2026 has just taken place at The Midway, San Francisco, attracting an audience of over...

23/11/2026

Krakow Cooperative Bank to implement Hitachi's AI-powered credit scoring solution

November 23, 2026 Warsaw, Poland, November 23, 2026: Krakow Cooperative Bank ( ...

23/11/2026

Vizrt CEO Discusses Road Map for Chyrons Future

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

23/11/2026

Panasonic Launches First Compact LUMIX Cinema Camera

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

23/11/2026

Even more boosts for efficiency, reliability and security...

Version 1.10 deepens NMOS integration and adds direct AI links. With the release of version 1.10 of Buttons, users across broadcast, AV, corporate and house o...

23/11/2026

RE:Vision Effects - RE:FLEXOR is here

RE:Vision Effects - RE:FLEXOR is here Brie Clayton November 23, 2026 0 Comments RE:Vision Effects, Inc (revisionfx.com) introduces RE:Flexor . RE:Fle...

23/11/2026

Hackathon Teams Explore Storytelling with URSA Cine Immersive

Hackathon Teams Explore Storytelling with URSA Cine Immersive Brie Clayton November 23, 2026 0 Comments Creators learn professional immersive producti...

23/11/2026

Vizrt CEO Discusses Roadmap for Chyrons Future

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

23/11/2026

Mo-Sys inaugurates Xtend Stage with TEDx University of Gr...

New broadcast-grade presentation facility brings election-night production values to town halls, investor presentations and product launches, combining an in-pe...

23/11/2026

Bitmovin Brings Scene Level Ad Signals to Google Ad Manag...

Bitmovin, a leading provider of video streaming solutions, has announced an integration between Bitmovins AI Scene Analysis and publisher provided signals (PPS)...

23/11/2026

Why cybersecurity starts with people

Firewalls, encryption and other technical defenses are all important tools to protect an organization from cyber attacks. But what if its most powerful safeguar...

23/11/2026

23dB Productions expands remote audiobook production services with Focusrite Scarlett 4th Gen

23dB Productions expands remote audiobook production services with Focusrite Sca...

23/11/2026

Tributes are paid to the legacy of architect Hugh Wallace in his final episodes of The Great House Revival

The Great House Revival Celebrating Hugh Wallace starts Sunday at 7.30pm The G...

23/11/2026

Merry Making: Play, Build and Create With NVIDIA Technologies This Holiday Season

The elves don't have to be the only ones busy in the workshop this holiday s...

23/11/2026

RT celebrates 25 years of Other Voices with live broadcast from Daingean U Chis

Special three-hour live anniversary programme Other Voices 25 Live A Celebration airs Saturday, 28 November on RT 2 and RT Player Live broadcasts, exclusive p...

23/11/2026

New series of Tarrac na Farraige highlights next generation's fight for the future of Ireland's fishing communities

RT One and RT Player, Tuesday 24 November Tarrac na Farraige returns for a se...

22/11/2026

Synthoid: Browser-based modular synth

Try out modular synthesis for free If you're looking for a way to explore modular synthesis without having to spend any money, then it's worth takin...

21/11/2026

Give Me the Ball! Serves a Powerful Portrait of Billie Jean King

Billie Jean King and Ilana Kloss attend the premiere of Give Me the Ball! by Liz Garbus and Elizabeth Wolff, an official selection of the 2026 Sundance Film Fes...

21/11/2026

fedDSP introduce Kami

Compressor plug-in free for first two weeks The latest plug-in to join fedDSP's Amps & Pedals line-up has just arrived, and the company are kindly offer...

21/11/2026

Can a Democratic Congress Revive Public Media Funding?

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

21/11/2026

ATSC's Jerry Whitaker, Zandra Clarke Receive SMPTE Honors

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

21/11/2026

Brightline Lighting Introduces the MOD2 Increasing the Re...

A larger studio puts more distance between the lights and the people who need to look good under them. Brightline Lighting, a manufacturer of energy-efficient l...

21/11/2026

Scripps Research awarded $7M to catalyze pain and addiction initiative

LA JOLLA, CA-Despite its enormous impact on individuals, families and communities, addiction remains an area of significant unmet medical need. A $7 million gi...

21/11/2026

27 FANGORIA Chainsaw Awards Nominees Created with Blackmagic Design

27 FANGORIA Chainsaw Awards Nominees Created with Blackmagic Design Brie Clayton November 20, 2026 0 Comments Blackmagic Design hardware and software ...

21/11/2026

Qube Cinema Named Technical Partner for 57th International Film Festival of India

Qube Cinema Named Technical Partner for 57th International Film Festival of Indi...

20/11/2026

ESPN's Jimmy Pitaro on Super Bowl LXI: A Yearlong Story That Features a Game'

The sports broadcaster's chairman sees the upcoming game as an opportunity t...

20/11/2026

SVG GameDay, Ep. 40: New York Mets Brendan McKeon - Firing Up Fans in Flushing

In-venue and creative video staffers at the professional and collegiate level have one major thing in common: the intensity and attention to detail ramps up dur...

20/11/2026

Back at Belmont Park, Part 1: Historic Venue's Renovation Puts a Premium on the Fan Experience

A variety of LED displays, integrated broadcast infrastructure covers every angl...

20/11/2026

RAF Partners with Migu Video to Bring RAF15 Main Event to China

Real American Freestyle (RAF) has announced a distribution partnership with Migu Video, a Chinese digital sports platform, to carry the RAF15 main event between...

20/11/2026

Apple TV Becomes U.S. Home of F1 Academy Beginning in 2027

Apple and F1 Academy have announced that the all-female racing series will stream on Apple TV in the U.S. beginning in 2027. Fans will be able to watch every qu...

20/11/2026

mnchen.tv Relies on Riedel Technology for New Production Center

Regional broadcaster m nchen.tv has modernized its production infrastructure at a new location in northern Munich. Riedel MediorNet provides decentralized signa...

20/11/2026

Eutelsat Announces Three Executive Committee Appointments

Eutelsat has announced three appointments to its Executive Committee, effective November 2026, under CEO Jean-Fran ois Fallacher. Jean-Hubert Lenotte is appoin...

20/11/2026

Seven Melbourne Selects RTS and Magna Systems for Comms Upgrade at New Facility

After more than two decades at Harbour Esplanade in Docklands, the Seven Network has relocated its Melbourne headquarters to a new, custom-built ST 2110 facilit...

20/11/2026

Brazil's TV 3.0 Rollout Shows VVC Moving from Standards Work to Commercial Deployment

Brazil is among the first markets deploying Versatile Video Coding (VVC) as part...

20/11/2026

NBC Sports and The Soccer Tournament Agree to Two-Year Extension for TST 2027 and 2028

The Soccer Tournament (TST), the $1 million winner-take-all 7v7 world championsh...

20/11/2026

Back at Belmont Park, Part 2: NYRA Reaps Benefits of Reimagined Track With Expanded Broadcast Capabilities

Enhancements include a larger compound, an elevated camera count, and a whole lo...

20/11/2026

With Women's Sports Programming Skyrocketing, Content and Production Strategy Are Evolving

Leaders from ESPN, iHeartMedia, and Just Women's Sports explore creating new...

20/11/2026

Lemur Audio release Dorothe

New EQ plug-in aimed at mastering duties Lemur Audio's latest plug-in has just arrived, delivering a characterful EQ that's aimed primarily at maste...