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

09/11/2026

Sonys Shotgun Mic Deployed in Drifter' Shoot

Share Copy link Facebook X Linkedin Bluesky Email...

09/11/2026

Fox Closes Roku Acquisition

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

09/11/2026

Indianapolis TV Stations Return to DirecTV After Lengthy Absence

Share Copy link Facebook X Linkedin Bluesky Email...

09/11/2026

Vizrt Completes Proof-of-Concept Integration With Story Object Model

Share Copy link Facebook X Linkedin Bluesky Email...

09/11/2026

Broadcast Dominated Midterms Coverage

Share Copy link Facebook X Linkedin Bluesky Email...

09/11/2026

Berklee's Singers Showcase Celebrates Whitney Houston's Music and Her Gospel Roots

Berklee's Singers Showcase Celebrates Whitney Houston's Music and Her Go...

09/11/2026

NVIDIA Announces New Planned Investments in Korean Startups at the MSIT-NVIDIA AI Startup Partnership Forum

Korea's Ministry of Science and ICT and NVIDIA hosted the MSIT-NVIDIA AI Sta...

09/11/2026

Practice Makes Precise: At CoRL, NVIDIA and Partners Reveal How Robots Rehearse Delicate Work in Simulation

Simulation, which has long been the proving ground for robots learning to walk, ...

08/11/2026

Acon Digital release Restoration Suite 3

Updated modules & new Analyze function Acon Digital's all-in-one restoration plug-in has just been updated, and now boasts an Analyze button that allows...

08/11/2026

AnalogX launch Genesis

Run analogue gear emulations on your GPU AnalogX have released a new GPU-powered mixing ecosystem that's been designed to change how users handle analog...

08/11/2026

COW Jobs: Set and Production Design Expert - Remote

COW Jobs: Set and Production Design Expert - Remote Brie Clayton November 8, 2026 0 Comments Set and Production Design Expert (Remote, worldwide) No...

08/11/2026

NVIDIA Dynamo Recipes Bring Korea's Leading Open Models to Production

NVIDIA is releasing Dynamo-optimized deployment recipes for Korea's leading open models: A.X K2 from SK Telecom, K-EXAONE 2.0 from LG AI Research, Solar Ope...

08/11/2026

From Chips to Skills, NVIDIA and Korea Expand Sovereign AI Collaboration

NVIDIA and Korea's Ministry of Science and ICT (MSIT) are expanding their collaboration across the country's sovereign AI ecosystem, from AI semiconduct...

08/11/2026

Korea's AI Ecosystem Advances and Secures Agentic AI With NVIDIA

As AI agents take on more work, they need capable open models and security that advances alongside them. Hyundai Motor Group is exploring NVIDIA NemoClaw bluep...

08/11/2026

Korea Advances Physical AI Across Industries With NVIDIA

Tapping into the country's strengths in manufacturing and engineering, NVIDIA is helping advance Korea's physical AI ecosystem. The country's indu...

07/11/2026

Tracktion Waveform Free 14.1 now available

Mix Analysis, improved Render window & new bundled instrument The free version of Tracktion's DAW software has recently received an update that introduc...

07/11/2026

NFVF CALL FOR MARKET READINESS PROGRAMME FOR SOUTH AFRICAN GAMING STUDIOS

The National Film and Video Foundation (NFVF) is a statutory body established to promote and develop the South African film and video industry, including animat...

07/11/2026

Nielsen: 31.2 Million Viewers Watch 2026 U.S. Midterm Election Coverage

NEW YORK - November 5, 2026 - An estimated 31.2 million people watched primetime coverage of the 2026 U.S. midterm elections on Tuesday, November 3, according t...

07/11/2026

RCI Custom Selects Neutrik as Primary Source for Connectors

Share Copy link Facebook X Linkedin Bluesky Email...

07/11/2026

Audio Engineer Rachel Saldivar Deploys Sony Shotgun Mic for Drifter' Shoot

Share Copy link Facebook X Linkedin Bluesky Email...

07/11/2026

COW Jobs: Production Manager - Las Cruces, NM

COW Jobs: Production Manager - Las Cruces, NM Brie Clayton November 6, 2026 0 Comments Production Manager November 5, 2026COW Jobs: Faith-Based UGC ...

06/11/2026

Gravity Medias JockeyCam at Center of Melbourne Cup Carnival Busy Week of Horse Racing

It's been a big week in Australia horse racing as the Victoria Racing Club (...

06/11/2026

PBR Expands Production of Teams Championship With Third Mobile Unit, More Cameras

Additional gear includes a second, outside drone; a second slo-mo unit; and a wi...

06/11/2026

University of Alabama Installs Daktronics Displays at Coleman Coliseum

The University of Alabama has installed a new Daktronics display system at Coleman Coliseum in Tuscaloosa. It includes a 360-degree centerhung with four underbe...

06/11/2026

NEP Adds IP-Based Flypack Production Kits in the U.S.

NEP Americas, part of NEP Group, has expanded its remote production offering with new IP-based flypack production kits deployed from the U.S. and available to c...

06/11/2026

Telestream Appoints Joseph Hopkins Chief Revenue Officer

Telestream has appointed Joseph Hopkins Chief Revenue Officer. He has more than two decades of executive experience in media technology. In the role, he will fo...

06/11/2026

SVG GameDay, Ep. 38: Texas Rangers Chris DeRuyscher - Livin the Life at Globe Life Field

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

06/11/2026

Soaring in Stamford: Major League Soccer's Seth Bacon Details the Growth of MLS Productions

It's been nearly two years since MLS Productions made the move to WWE's ...

06/11/2026

With Decision Day on Deck, MLS Productions' Stamford Hub Prepares for 15 Matches in Five Hours

All 30 clubs take the field Saturday, and every camera, graphic, and feed runs t...

06/11/2026

GForce launch Oberheim Matrix-12

Latest official Oberheim collaboration arrives Following on from the launch of their new and improved website, GForce Software have released their latest of...

06/11/2026

Avid introduce Pro Tools 2026.11

Pro Tools Extensions, MPE support & more Avid have just released Pro Tools 2026.11, which introduces built-in stem separation, a new Extensions format that ...

06/11/2026

Heritage Audio's i73 Pro gains NAM A2 support

Interface range can now run captures on internal DSP Heritage Audio have just launched a firmware update that makes it possible for their i73 Pro audio inte...

06/11/2026

SMALL TOWN. BIG DREAMS. ABSOLUTE MAYHEM. The crown is up for grabs in bold new SBS Original, Miss Sultanah

SMALL TOWN. BIG DREAMS. ABSOLUTE MAYHEM. The crown is up for grabs in bold new S...

06/11/2026

FCC Releases More Details on Nationwide EAS Test

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

Pro Tools Adds New AI-Powered Extension for Separating Audio Into Individual Elements

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

Sage Issues Mandatory Security Update for ENDECS

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

CNN Reports Record Setting Viewership Numbers for Midterms Coverage

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

Democratic Senator Sends Warning to FCC Chairman Carr

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

Maxon Expands Creative Possibilities with New Touch and S...

Maxon Expands Creative Possibilities with New Touch and Spatial Experiences in Cinema 4D and ZBrush for Apple Products New capabilities let artists interact wi...

06/11/2026

Big Daddy Kane to Be Inducted Into Berklee's Hip-Hop Hall of Fame

Big Daddy Kane to Be Inducted Into Berklee's Hip-Hop Hall of Fame The Grammy-winning emcee joins an iconic roster of inductees in an event that features s...

06/11/2026

NBC News Wins Midterm Elections Ratings Race

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

LG Ad Solutions Names Abhijit Pol SVP, Product and Engineering

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

Gravity Media's OB Rethink Delivers for Gravel Cycling Championship

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

VITEC to Retire Datapath Brand

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

NEP Americas Adds IP-Based Flypack Kits to Production Lineup

Share Copy link Facebook X Linkedin Bluesky Email...

06/11/2026

Black Friday Deals from Flanders Scientific, Inc - An Atomos Company

Black Friday Deals from Flanders Scientific, Inc - An Atomos Company Brie Clayton November 5, 2026 0 Comments Purchase any FSI monitor between now and...

06/11/2026

COW Jobs: Faith-Based UGC Video Creator - Remote

COW Jobs: Faith-Based UGC Video Creator - Remote Brie Clayton November 5, 2026 0 Comments Faith-Based UGC Video Creator (Remote, Part-Time) November...

06/11/2026

Thats Christmas Sorted: Sky brings entertainment icons to life in all dancing festive campaign

Friday 6 November 2026 That's Christmas Sorted: Sky brings entertainment ic...

06/11/2026

Fox Corporation Completes Acquisition of Roku

Fox Corporation Completes Acquisition of Roku FOX Is Now One of the Leading Streaming Businesses in the U.S., Inclusive of Roku, Tubi and FOX One Roku's...