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

01/07/2026

Broadcast Management Group Appoints Kathy Samuels as Director of Creative Services

Broadcast Management Group (BMG) has announced the appointment of Kathy Samuels ...

01/07/2026

Shade Launches Custom Objects and Automations

Shade has announced Custom Objects and Automations, a platform expansion releasing June 29, 2026, that adds database and workflow automation capabilities direct...

01/07/2026

FOR-A America Adds Two Regional Sales Leaders

FOR-A America has announced the addition of Jaz Wray and Fernando Cruz to its U.S. sales team. Both report to Ernie Leon, Senior VP and Head of Sales and Strate...

01/07/2026

NBC Sports To Present All 15 MLB Games Nationally on July 4 Weekend Star-Spangled Sunday'

NBC Sports will air all 15 MLB games nationally on Sunday, July 5, across NBC, P...

01/07/2026

Clear-Com Upgrades Wireless Communications for Jeopardy! and Wheel of Fortune

Clear-Com has announced a wireless communications upgrade for Jeopardy! and Wheel of Fortune, deploying FreeSpeak II and FreeSpeak Icon systems across both prod...

01/07/2026

England Deploys Sony STATSports Live GPS Tracking at FIFA World Cup 2026

England's performance team will use Sony's STATSports APEX GPS tracking system to monitor player physical data in real time during FIFA World Cup 2026 m...

01/07/2026

Adder Technology Appoints Neil Hillier as CEO

Adder Technology has announced the appointment of Neil Hillier as Chief Executive Officer, effective July 1, 2026. Hillier succeeds Adrian Dickens, who transiti...

01/07/2026

Bitcentral Splits Into Two Companies: Bitcentral and ViewNexa

Bitcentral, Inc. has announced a strategic transaction creating two separate companies. The Production and Playout business will continue as Bitcentral, now own...

01/07/2026

DAZN48 Creator Initiative Draws Global Participation for FIFA World Cup 2026

DAZN has announced results from DAZN48, its creator initiative for the FIFA World Cup 2026. Launched in April 2026, the program received thousands of applicatio...

01/07/2026

IDEA To Induct Daktronics Sarah Rose Into Hall of Fame

Sarah Rose, VP, global services, Daktronics (NASDAQ: DAKT), will be inducted into the Information Display and Entertainment Association (IDEA) Hall of Fame at t...

01/07/2026

Gravity Media Delivers Distribution and Streaming Services for World Economic Forum in Dalian

Gravity Media and the World Economic Forum's production team provided broadc...

01/07/2026

Insight Productions Launches Insight Storm, a 53-Foot Esports Broadcast Truck

Insight Productions has announced the launch of Insight Storm, a 53-foot mobile broadcast unit built for esports production. The truck is built around a Ross Vi...

01/07/2026

ESPN Announces America 250 Content Initiatives Across Platforms

ESPN has announced several content initiatives marking America's 250th anniversary, as part of The Walt Disney Company's Disney Celebrates America pro...

01/07/2026

At Cosm, FIFA World Cup 2026 Is a Coming-of-Age Moment as Shared Reality Becomes Bucket-List Entertainment

Eleven production kits, REMI workflows, and cloud distribution bring 40 World Cu...

01/07/2026

SVG Regional Sports Production Summit Draws Industry Leaders to Denver for Deep Dive on Evolving RSN Landscape

The conference also discussed the opportunities offered an industry that is endu...

01/07/2026

Mountain West Launches MW+ Streaming Platform Powered by Kiswe

The Mountain West Conference has announced the launch of MW , a direct-to-consumer streaming platform powered by Kiswe. The platform will carry live Mountain We...

01/07/2026

Tracktion unleash Waveform 14 DAW

New AI Assistant, Multi-channel Audio, ARA2 improvements & more Tracktion's DAW software has just received its latest major update, gaining a selection ...

01/07/2026

The Crow Hill Company release Brackish Pads

Stammering, stuttering, strangulated tones The Crow Hill Company's latest creation promises to be the most original sound set they've produced to d...

01/07/2026

Sweetwater & Andertons launch Darkglass Anagram Limited Edition Guitar Essentials

Exclusive run of limited-edition modelling pedals Sweetwater and Andertons M...

01/07/2026

Call for NFVF funding applications to attend Film Festivals and Markets taking place from 01 August 2026 - 31 October 2026

The National Film and Video Foundation (NFVF) is pleased to announce that the ca...

01/07/2026

FCC Plans to Auction 160 MHZ of Midband Spectrum

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

CBS Miami Launches Hope 4 Venezuela' Relief Effort

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

Riedel, SKAARHOJ Expand Collaboration With SimplyLive Integration

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

Gray Media to Buy American Spirit Media's TV Stations

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

Cascade PBS Launches App Solution Provider 'Local Public

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

Manfrotto Introduces UNCOVER, the new premium camerabag collection for modern hybrid creators

Manfrotto Introduces UNCOVER, the new premium camera bag collection for modern h...

01/07/2026

Blackmagic Design Powers Houston Tamil Sangam Literacy Competition

Blackmagic Design Powers Houston Tamil Sangam Literacy Competition Brie Clayton July 1, 2026 0 Comments Volunteers use ATEM Mini Pro, Blackmagic Desig...

01/07/2026

Riedel, SKAARHOJ Expand Collaboration WithSimplyLive Integration

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

PlayBox Technology Publishes State of Broadcast Infrastru...

PlayBox Technology has published State of Broadcast Infrastructure 2026, an in-depth industry research report examining the technologies, operational challenges...

01/07/2026

Jigsaw24 Appoints Alan Henry as Head of Sales for Media a...

LONDON, UK, 1 JULY Jigsaw24 has appointed Alan Henry as Head of Sales for Media and Entertainment, reinforcing its continued investment in helping broadcaster...

01/07/2026

Content Vault Partner with XMA to Distribute Universal Fi...

Content Vault, the patent-pending secure content distribution platform protecting high-value media from disclosures, theft and unauthorised access, today announ...

01/07/2026

Bitcentral Announces Strategic Evolution to Create Two F...

Bitcentral, Inc. a leading provider of enterprise software and digital media solutions for news, sports and entertainment broadcasters, as well as streaming pla...

01/07/2026

Adder Technology Names Neil Hillier as CEO

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

IBCAP Opens New Anti-Piracy Lab in Denver

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

FCC Plans to Auction 160 MHZ of Mid-Band Spectrum

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

CBS Miami Launches 'Hope 4 Venezuela' Relief Effort

Share Copy link Facebook X Linkedin Bluesky Email...

01/07/2026

Groundbreaking First Nations Screen Business Accelerator launched through national partnership

Groundbreaking First Nations Screen Business Accelerator launched through nation...

01/07/2026

Chyron Launches the All-New Chyron Academy: A Reimagined, Hands-On Learning Experience for Live Broadcast Production

Chyron Launches the All-New Chyron Academy: A Reimagined, Hands-On Learning Expe...

01/07/2026

Amplium Captures Kawasaki Brave Thunders Game with Blackmagic URSA Cine Immersive

Amplium Captures Kawasaki Brave Thunders Game with Blackmagic URSA Cine Immersiv...

01/07/2026

Boris FX Optics Expands Plugin Support to Apple Photos, Capture One, and Affinity Photo

Boris FX Optics Expands Plugin Support to Apple Photos, Capture One, and Affinit...

01/07/2026

UKTV appoints Matt Berry as General Manager to lead brand and marketing strategy

UKTV has today announced the appointment of Matt Berry to the newly created role of General Manager - Marketing, effective 1 July. Matt will take on this senio...

01/07/2026

Fussy asks Britain one simple question: Are you a Tosser?

Sky Zero Footprint Fund-backed TV campaign featuring Deborah Meaden challenges consumers to rethink everyday bathroom wasteWednesday 1 July 2026 Fussy asks Bri...

01/07/2026

New Sky research reveals postcode lottery leaving girls behind in sport

Constituency-level analysis reveals where girls miss out most on sport - and where targeted action could unlock more than £640 million in economic and health be...

01/07/2026

Riedel and SKAARHOJ Expand Collaboration With SimplyLive Integration

Wuppertal July 1, 2026 Riedel and SKAARHOJ Expand Collaboration With SimplyLive IntegrationRiedel Communications today announced an expanded collaboration wit...

01/07/2026

Apple Creator Studio gets smarter, faster, and more connected - UPDATE - Posted on 30 June 2026

Apple today introduced power-packed updates to Apple Creator Studio, a groundbre...