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/10/2026

Dolby Expands Dolby OptiView Platform with New Capabilities at IBC 2026

September 10 2026, 06:00 (PDT) Dolby Expands Dolby OptiView Platform with New Capabilities at IBC 2026 New Sports Intelligence helps providers better unders...

07/10/2026

Dalet Flex LTS Delivers Smarter Media Operations from Ingest to Distribution

Dalet, a leading technology and service provider for media-rich organizations, today announced the latest Long-Term Supported (LTS) release of Dalet Flex. Build...

30/09/2026

SVG Students To Watch: Jacquelynn Dupree, Clark Atlanta University

Drawn to the many moving pieces of a live broadcast, this Los Angeles native is building a path in production management and technical operations...

30/09/2026

NHL on TNT Opens New Season in 1080p HDR With Stanley Cup Final on the Horizon

TNT Sports goes big for its season opener in Philadelphia, and REMI workflows at Techwood will again anchor much of regular-season production...

30/09/2026

Katlyn Alexander Named CEO of Qvest North America

Qvest has appointed Katlyn Alexander as CEO of Qvest in North America, effective August 16, 2026. Alexander, who previously served as COO of Qvest US, succeeds ...

30/09/2026

AAPB Wraps 2026 Season with Record Viewership and Expanded Broadcast Footprint

The American Association of Professional Baseball (AAPB) has wrapped its 2026 season, with leaguewide attendance surpassing 1.4 million for the fifth consecutiv...

30/09/2026

Veritone Partners with ATP Media to License Tennis Archive in North America

Veritone has announced a multi-year content licensing agreement with ATP Media, the broadcast production and distribution arm of the ATP Tour, making ATP's ...

30/09/2026

Netflix To Stream WWE Exclusively in Japan Beginning October 1

Netflix has announced it will become the exclusive home for WWE programming in Japan beginning October 1, 2026. The lineup includes Raw, SmackDown, NXT, Premium...

30/09/2026

SES and Sky Extend Satellite Capacity Agreement for UK and Ireland

SES and Sky have announced a new multi-year agreement for direct-to-home satellite services across the United Kingdom and Republic of Ireland, running into the ...

30/09/2026

Big Blue Marble Adds Live Multiview Channels to Cloud Video Kit via AWS Elemental Dynamic Multiview

Big Blue Marble has announced the addition of live multiview channels to its Clo...

30/09/2026

NHRA Announces Multi-Year Media Rights Deals With FOX Sports, The CW, and FloSports

The NHRA has announced multi-year media rights agreements with FOX Sports, The C...

30/09/2026

FOX 5 Atlanta to Broadcast Nashville Predators Games in 2026-27 Season

FOX 5 Atlanta (WAGA-TV) will carry Nashville Predators games during the 2026-27 season as part of Scripps Sports' regional broadcast network for the team. G...

30/09/2026

SVG Sit-Down: Brahma AIs Patrio Cummins on the Possibilities of AI (and the Misconceptions)

AI was a big buzz on the IBC show floor but there weren't a ton of companies...

30/09/2026

PGA TOUR Names Ryan Holcomb Senior Vice President and Head of Original Content

The PGA TOUR has announced the appointment ofRyan Holcomb as Senior Vice President and Head of Original Content, according to The Hollywood Reporter. Holcomb wi...

30/09/2026

ESPN Drops the Puck on Enhanced Audio for the New NHL Season

The sound will be more immersive, with improved design and more mikes on the ice and the players The National Hockey League's season opener on Tuesday nigh...

30/09/2026

TNT Sports' Chris Brown, Lee Mabry on Beginning 2026-27 NHL Season With an Onsite Effort in Philly

TNT Sports is dropping the puck on the 2026-27 NHL season in a big way in Philad...

30/09/2026

International Swimming League Names Gravity Media as Production Partner

The International Swimming League ( ISL ) today announced the appointment of Gravity Media, global leader in live production and content and media services and ...

30/09/2026

Give Me the Backstory: Get to Know Amir Bar-Lev, the Director of The Last First: Winter K2

By Ramona Flume One of the most exciting things about the Sundance Film Festiva...

30/09/2026

Sync Audio release MegaMorph

Add an envelope generator to any plug-in Sync Audio's latest creation is a handy utility plug-in that can be used to combine and modulate other effects ...

30/09/2026

Strymon launch the La Brea

All-analogue tape-style drive joins Series A Strymon's reputation was built on their digital knowhow, so many were surprised (and intrigued) when they a...

30/09/2026

Sonuscore The Pulse: Synth Wave & Epic Atmospheres

Two new expansion packs released Sonuscore have just introduced two new expansion packs for The Pulse, its production engine instrument for modern cinematic...

30/09/2026

Clear-Com's Arcadia Central Station Brings Professional Production Communications to...

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

30/09/2026

AWARN Alliance Urges FCC to Let Broadcasters Tap Full 3.0 Capabilities

Share Copy link Facebook X Linkedin Bluesky Email...

30/09/2026

Senator Asks If All-GOP FCC Would Violate Federal Law

Share Copy link Facebook X Linkedin Bluesky Email...

30/09/2026

Marshall PTZ Cameras Bring Legendary Progressive Rock Exp...

The An Evening with Emerson, Lake and Palmer tour brings one of rock's most iconic bands back to the stage. These performances seamlessly blend live foota...

30/09/2026

Schibsted Media Chooses DHD RX2 and TX2 Mixers for Remote...

Schibsted Media, one of Norways largest and most influential digital media publishers and content producers, has invested in mixers and digital signal processor...

30/09/2026

Big Blue Marble adds live multiview channels to its video...

Big Blue Marble announces the addition of live multiview channels to Cloud Video Kit, its broadcast-grade video processing platform. The feature is powered by A...

30/09/2026

Telekom Slovenije brings local advertising to internation...

Leading video software provider Synamedia today announced that Telekom Slovenije, Slovenia's largest provider of telecommunications and TV services, is open...

30/09/2026

PODCAST EXPO 2026 Recorded Using Blackmagic Design Workflow

PODCAST EXPO 2026 Recorded Using Blackmagic Design Workflow Brie Clayton September 29, 2026 0 Comments Conference featuring 24 sessions over two days ...

30/09/2026

IBC2026 Show Report

IBC2026 Show Report David Kirk September 29, 2026 0 Comments The International Broadcasting Convention has long been Europe's equivalent of the US...

30/09/2026

SGO Unveils Workflows Slate To Enable Automated Burn-ins, Slates

Share Copy link Facebook X Linkedin Bluesky Email...

30/09/2026

Public Advocacy Group Urges Broadcasters to Stop Airing Trump Taxpayer Funded Ad

Share Copy link Facebook X Linkedin Bluesky Email...

30/09/2026

Qvest Promotes Katlyn Alexander to CEO, North America

Share Copy link Facebook X Linkedin Bluesky Email...

30/09/2026

Mavis Camera 8-2 adds iPhone 18 Pro Support with Variable...

Mavis has launched Mavis Camera 8.2, the latest release of its professional camera app for the iPhone and iPad. This update brings support for iPhone 18 Pro and...

30/09/2026

Tribeca Festival Announces 2027 Dates And Calls For Submissions

September 30th, 2026 TRIBECA FESTIVAL ANNOUNCES 2027 DATES AND CALLS FOR SUBMISSIONS Following a Record Box Office Year, the 26th Edition, Presented by OKX,...

30/09/2026

Harmonic Launches Recon Product Family Developed in Partnership with Comcast

New Solution Expands Harmonic's Network Intelligence Portfolio and Brings Comcast-Developed Fiber Monitoring Technology to Broadband Operators, Providing Re...

30/09/2026

A Look Back at (My) 524 Months with Broadcast Cameras

Thank you to Film-TV Video for the original article - you can view it here It was early 1983. I had just turned 21 when I joined Hitachi Denshi's European...

30/09/2026

Claire Brock and Sophie Morris discover how consumers can shop smarter in new RT documentary series

How to Shop Well Now starts Monday at 9.35pm on RT One and RT Player On the...

30/09/2026

From Training to Production, NVIDIA and CoreWeave Close the Loop on Agentic AI

Building on nearly a decade of co-engineering, CoreWeave has built NVIDIA compute, networking and software into a cloud purpose-built for AI that's still re...

29/09/2026

Oak View Group Names Cisco as Official Technology Partner

Oak View Group (OVG) has announced Cisco as an Official Technology Partner, with plans to standardize infrastructure across its venue network on Cisco solutions...

29/09/2026

SportsNet Pittsburgh Wins Three Mid-Atlantic Emmy Awards

SportsNet Pittsburgh (SNP) won three honors at the 2026 Mid-Atlantic Emmy Awards. Program awards went to Bucs BP in the Sports Program Live category (produced ...

29/09/2026

CBC, PWHL Revive Hockey Night in Canada' on Saturdays

The Professional Women's Hockey League has announced home openers for all 12 teams for the 2026-27 season, along with a broadcast partnership with CBC under...

29/09/2026

Manifold Technologies Recognized as MXL Contributor Following IBC Innovation Award

Manifold technologies has been recognized as a contributor to the Media eXchange...

29/09/2026

Fubo Launches My Local Sports RSN Add-On Package

FuboTV has announced My Local Sports, allowing subscribers in select markets to add their local regional sports network (RSN) as an add-on to a Fubo Sports subs...

29/09/2026

ANI Deploys Grass Valley AMPP and Framelight X for News Operations

Asian News International (ANI), a wire agency and video news provider based in India, has deployed Grass Valley's AMPP Media Operating System and Framelight...

29/09/2026

SABC Deploys Ikegami UHK-X600 Cameras for IP-Based Production

South African Broadcasting Corporation (SABC) has deployed Ikegami UHK-X600 cameras as part of an upgrade to IP-based production infrastructure. The deployment ...

29/09/2026

Busy in Bristol: ESPN Headquarters Come Alive With New Studio W, Remote-Production Workflows

REMI, REMCO models will drive the bulk of the broadcaster's NHL productions ...

29/09/2026

NASCAR Productions' Keith D'Alessandro on the Continued Evolution of Its Centralized Production Hub

Three years in, the facility is supporting more centralized race production, com...

29/09/2026

NBC Sports Brings Robust Sunday Night Baseball Production Playbook to MLB Wild Card Round

NBC, Peacock, and NBSN are carrying all four Wild Card series with a production ...