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

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

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

15/07/2026

Inside DAZNs Multi-Market World Cup Effort With CTO Sandeep Tiku

The 2026 FIFA World Cup is a big deal for DAZN, which has distribution rights in three markets: Italy, Spain, and Japan. Each requires a different editorial app...

15/07/2026

SVG New Sponsor Spotlight: Qumulo's Chris Horn on Powering Global Media Workflows Across Edge, Core, and Cloud

As sports-media organizations manage rapidly growing content libraries and incre...

15/07/2026

FIFA World Cup 2026: Inside the HBS Non-Live London Production Hub

HBS director of digital Johannes Franken talks SVG Europe through the operation built to serve FIFA World Cup 2026 rights holders remotely from Stratford, east ...

15/07/2026

IBC2026 to Spotlight AI, Live Sports Production, Creator Economy, and Trust in Media

IBC has unveiled the conference program for IBC2026, with this year's event ...

15/07/2026

Vanessa Paradis Tour Adopts Sennheiser Spectera Wireless Ecosystem for 2026 Production

Software-defined wideband RF platform supports 96-kHz monitoring, streamlined fr...

15/07/2026

Telos Alliance Integrates AudioShake Source Separation Into Minnetonka AudioTools Server

New AI-powered module enables broadcasters and content owners to extract dialogu...

15/07/2026

AIMS Schedules Second IPMX Product Certification Event for August

Weeklong gathering at EBU headquarters will test new IPMX capabilities and expand certified product ecosystem...

15/07/2026

Force Tech Appoints Bryan Adams as Vice President of Integration

Force Tech has announced the appointment of Bryan Adams, CTS, as Vice President of Integration. Adams will oversee AV and broadcast integration project delivery...

15/07/2026

USA Sports and Bundesliga Announce Exclusive Multi-Year U.S. Media Rights Agreement

USA Sports has announced an exclusive English-language agreement with the Bundes...

15/07/2026

Inside ITV Sport's Stunning FIFA World Cup Studio in New York City With Paul McNamara

ITV Sport's FIFA World Cup 2026 coverage has been produced from one of the m...

15/07/2026

CatchLight, Sony Launch Equipment Initiative for Local Visual Journalists

Program will provide professional camera kits, training, and technical support to participating local newsrooms...

15/07/2026

CornerstoneSF Installs FOR-A HVS-Q12 Switcher in New UHD Production Facility

San Francisco church becomes first U.S. deployment of the 2 M/E production switcher...

15/07/2026

Steve Bornstein Joins Advisory Board of Scott Cokers New Global MMA Promotion

Former ESPN and NFL Network executive to advise startup league on media, distribution, technology, and fan engagement...

15/07/2026

Space City Home Network Executive Producer John Valek on Leaning Into Innovation, Access, and Opportunity

The Houston-based RSN is the live-game home of the Astros and Rockets...

15/07/2026

Freqport unveil the Dual FreqInOut FO1-2RK

Launched alongside new FreqSoft installer Designed to bridge the gap between hardware and software, Freqport's FreqInOut FO1 unit provides a simple way ...

15/07/2026

Expressive E's Summer Offers

Save up to 55% on software until 23 July 2026 Expressive E have just launched their Summer Offer sale, with discounts of up to 55% now applied across their ...

15/07/2026

Peel Stems 2 from zplane

Real-time stem-separation tool updated zplane have recently released a new and improved version of their real-time stem-separation plug-in which they say ma...

15/07/2026

Baby Audio SubCulture

A new benchmark in bass enhancement Described as a new benchmark in bass enhancement , Baby Audio's latest release has been designed to augment the lo...

15/07/2026

DMC Production Reimagines Live OB with Calrec

DMC Production's AR 1 and AR 2 units reverse the conventional OB workflow, keeping all production-critical processing at the venue while operators work remo...

15/07/2026

FCC to Vote on Replacing National Broadcast Ownership Cap

Share Copy link Facebook X Linkedin Bluesky Email...

15/07/2026

ATSC Updates Industry Audio Loudness Guidance

Share Copy link Facebook X Linkedin Bluesky Email...

15/07/2026

GigaCloud and Cubbit partner to deliver sovereign and res...

GigaCloud, a leading Ukrainian cloud service provider, and Cubbit, the first geo-distributed cloud storage enabler, today announced a new Business Alliance Part...

15/07/2026

SMPTE Launches 110th Anniversary Campaign to Advance Its...

SMPTE, the global society for media professionals, technologists, and engineers, has announced the launch of the SMPTE 110th Anniversary Campaign, a fundraising...

15/07/2026

STUDIO TECHNOLOGIES UNVEILS MODEL 762 STEREO LEVEL CONTRO...

Studio Technologies, a leading manufacturer of high-quality audio, video, and fiber-optic solutions, unveils the new StudioComm Model 762 Stereo Level Control, ...

15/07/2026

COW Jobs: Producer, Virtual Events - Hybrid, Full Time, Salaried

COW Jobs: Producer, Virtual Events - Hybrid, Full Time, Salaried Brie Clayton July 15, 2026 0 Comments Producer, Virtual Events (Hybrid | Full-time | ...

15/07/2026

SIMBA powers new streaming delivery network with Broadpea...

Brazilian media organization builds nationwide CDN with Broadpeak's high-performance software for low-latency streaming and new content distribution service...

15/07/2026

DHD Introduces Discovery Utility for Network-Connected Au...

DHD announces a new utility designed to increase the efficiency of its audio mixing systems during initial installation and subsequent configuration. Anyone w...

15/07/2026

BCNEXXT Brings Next-Generation Vipe to IBC2026 Breaking t...

BCNEXXT Brings Next-Generation Vipe to IBC2026, Breaking the 1:1 Channel-to-Server Ratio New innovations liberate broadcasters from legacy playout infrastructur...

15/07/2026

S&P Analysis: Three Quarters of Americans Watch Live Sports

Share Copy link Facebook X Linkedin Bluesky Email...

15/07/2026

Scripps Sports, Ion Score Women's Volleyball Rights

Share Copy link Facebook X Linkedin Bluesky Email...

15/07/2026

Screeners and press pack now available: Gomorrah: The Origins premieres on Sky and NOW on 28 July

Wednesday 15 July 2026 Screeners and press pack now available: Gomorrah: The Or...

15/07/2026

Audiences to get behind-the-scenes access to Trinity College Dublin's Old Library in new RT series

Trinity's Treasures features Ruth Negga, Eleanor McEvoy, and David Norris, a...

15/07/2026

Building Ireland explores the River Shannon region from Leitrim to Limerick in a new series

Join geographer Dr Susan Hegarty, Engineer Tim Joyce and Architect Orla Murphy a...

15/07/2026

NVIDIA and Japan Bring Full-Stack AI and Robotics to Every Industry

Home to leading manufacturers, robotics pioneers, infrastructure builders and gaming, of course, Japan is one of the world's centers of AI - building across...

14/07/2026

Bowling Green State Upgrades Doyt Perry Stadium With New Daktronics LED Display

South end zone videoboard, cloud-based control system will be ready for 2026 football season...

14/07/2026

Mizzou Athletics Launches Connected Digital Platform

Redesigned website, enhanced mobile app unify content, ticketing, and personalized fan engagement...

14/07/2026

DePaul Athletics, Playfly Sports Agree to Multimedia Rights Partnership

Agreement spans sponsorship sales, digital monetization, radio production, and new practice facility naming rights...

14/07/2026

American Association Expands Broadcast Reach Through FanDuel Sports Network Partnership

Independent league adds 14 regional sports network affiliates, growing distribut...

14/07/2026

Euroleague Basketball Introduces Euroleague Basketball+ Digital Ecosystem Initiative

New strategy aims to unify competitions, content, fan engagement, and commercial...

14/07/2026

Professional Fighters League, ESPN Reach Multi-Year Media Rights Deal for Brazil

ESPN and Disney+ become exclusive home of PFL events in key international MMA market...

14/07/2026

TEGNA Names Scott Gill VP of Technology and Operations

Gill will oversee engineering, technology, and sports operations across the company's 64 local television stations...

14/07/2026

Guest Post: Dynamic Media Facilities Could Reshape the Future of Broadcast Workflows

Submitted by North American Broadcasters Association (NABA) As broadcasters con...

14/07/2026

Bayerischer Rundfunk Debuts Fully Software-Defined SMPTE ST 2110 Radio OB Van Built Around Lawo Technology

Modernized mobile unit combines HOME Apps, mc 56 console, and IP infrastructure ...

14/07/2026

Scripps Sports, ION Secure U.S. Rights to 2027 FIVB Womens Volleyball World Cup

Every match of the 32-team tournament will air across ION and Scripps Sports platforms in English and Spanish...

14/07/2026

FloSports Lands Exclusive U.S. Rights to IIHF Mens World Championship Beginning in 2027

FloHockey to stream every game of the annual international tournament under four...