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

28/07/2026

Nielsen Launches Ad Intel AI: the Only Product of its Kind that Transforms Fragmented Ad Data into Actionable Intelligence

Ad Intel AI is Nielsen's first in a new generation of AI products built to t...

28/07/2026

aconnic is ramping up supply for the new ACCEED 1444 fiber migration

Contribution to Europe's technological autonomy in the key industry telecommunications aconnic AG (ISIN: DE000A0LBKW6), Munich, starts commercial shipments...

28/07/2026

The Tow Foundation Awards PMVP $400,000 Grant

Share Copy link Facebook X Linkedin Bluesky Email...

28/07/2026

LiveU's World Cup Support Breaks Company Records

Share Copy link Facebook X Linkedin Bluesky Email...

28/07/2026

Encompass Selected by Channel 4 to Deliver Managed Linear...

Encompass Digital Media has been selected by Channel 4, one of the UK's public service broadcasters, to deliver managed linear playout services as part of a...

28/07/2026

Cinegy partners with SAMA Digital Media Solutions to sati...

Cinegy GmbH, the premier provider of software-defined television technology, has confirmed a new partnership with leading Korean systems integrator and distribu...

28/07/2026

Limecraft Adds Multicam Player and Audio Fingerprint-Base...

Limecraft today announces version 2026.5 of its AI-powered production platform. Limecraft 2026.5 https://(www.limecraft.com/limecraft-2026-5-multicam-quad-view-...

28/07/2026

Appear powers first large-scale 4k FIFA World Cup viewing...

X Platform technology enabled a premium UHD viewing experience through a hybrid ground-to-cloud architecture developed with Chilevisi n, ClaroVTR and Pixop App...

28/07/2026

LiveU Delivers Record-Breaking LIQ and Cloud Service Depl...

LiveU, the pioneer in IP-video transmission and cloud-based remote production, today announced it has set historic performance records during the 2026 World Foo...

28/07/2026

DHD Releases New Firmware and Options for its Audio Produ...

dhd.audio announces that its latest generation firmware, Version 10.4, is now available to DHD customers. Version 10.4 introduces expanded configuration capabil...

28/07/2026

Study: TV Operating Systems Gain Influence Over Viewing

Share Copy link Facebook X Linkedin Bluesky Email...

28/07/2026

Maryland Public Television Promotes Ling Ling Sun to CTO

Share Copy link Facebook X Linkedin Bluesky Email...

28/07/2026

NUGEN Audio Helps Mix Technician Blake Bunzel Deliver Rel...

Brand's Intuitive Metering and Dialogue Tools Improve Efficiency and Maintain Clarity Across Projects Ranging from Sitcoms to Effects Heavy Fantasy Series ...

28/07/2026

TAG Video Systems Accelerates the Move to Cloud and Virtu...

TAG Video Systems, a leader in 100% software-based realtime media monitoring, multiviewing and quality control (QC), today announced the latest innovations to i...

28/07/2026

Harvard Athletics Transforms Collegiate Sports Storytelling with AJA Gear

Harvard Athletics Transforms Collegiate Sports Storytelling with AJA Gear Brie Clayton July 27, 2026 0 Comments Between the maturation of IP and remot...

28/07/2026

New Live Action Projection Mapping Film Captured with URSA Cine 12K LF

New Live Action Projection Mapping Film Captured with URSA Cine 12K LF Brie Clayton July 27, 2026 0 Comments Large format sensor allows Texas Legacy ...

28/07/2026

NVIDIA Agent Toolkit Expands With New Omniverse Libraries, Putting AI Agents to Work Building Simulation-Ready Worlds

NVIDIA Agent Toolkit Expands With New Omniverse Libraries, Putting AI Agents to ...

28/07/2026

AI Agents Expand Creative Tools to Millions

AI Agents Expand Creative Tools to Millions Brie Clayton July 27, 2026 0 Comments Hero image courtesy of Epic Games Leading creative applications are...

28/07/2026

How Rick Aggeler Built a Music Community for Boston Teens

How Rick Aggeler Built a Music Community for Boston Teens When he was a Berklee student, Aggeler volunteered at the Boys & Girls Clubs of Boston, where he hel...

28/07/2026

Powerful Compute So Compact, It's Clutch - Build AI in Your Hand With NVIDIA Jetson

Anyone can make a robot move; NVIDIA Jetson makes it think. As a discerning AI i...

28/07/2026

Are you coming to the Fleadh? RT will be there

RT Raidi na Gaeltachta, RT Radio 1, RT One and RT Player to showcase the best of the reels, rhymes and rambles from Comhaltas Fleadh Cheoil na h ireann 202...

28/07/2026

RT to broadcast The Irish Question

Through a wide range of perspectives, this documentary looks at how Ireland might navigate one of the defining political questions of the future Wednesday, Jul...

27/07/2026

AES Educational Foundation Announces 2026/2027 Scholarship and Grant Recipients

The Audio Engineering Society Educational Foundation has named its scholarship and grant recipients for the 2026/2027 academic year. The awards support students...

27/07/2026

ESPN and MEAC Reach Multi-Year Media Rights Agreement Through 2030-31

ESPN and the Mid-Eastern Athletic Conference (MEAC) have signed a multi-year media rights agreement covering basketball championships and select football and ba...

27/07/2026

Yahoo Sports and Cameo Integrate Celebrity Video Bookings into Yahoo Fantasy

Yahoo Sports and Cameo have partnered to allow fantasy football users to book personalized celebrity videos directly within the Yahoo Fantasy app and website. T...

27/07/2026

Eutelsat to Receive $504 Million in FCC Upper C-Band Transition Payments

Eutelsat has welcomed the FCC's order establishing the regulatory framework for the transition of Upper C-band spectrum in the United States. Under the orde...

27/07/2026

ESPN Acquires U.S. and International Rights to International Dance League

ESPN and the International Dance League (IDL) have signed a global rights agreement for the 2026 season. Events will air bi-weekly on ESPN2 at 7 p.m. ET beginni...

27/07/2026

NBCUniversal and YouTube Announce Multi-Year Global Partnership

NBCUniversal and YouTube have signed a multi-year global partnership that includes bundling Peacock with YouTube Premium, extending NBCUniversal's distribut...

27/07/2026

Two Weeks Away: 2026 SVG Venues & Teams Summit at Miamis Kaseya Center To Reunite In-Stadium Production Community

Agenda includes presentations from the Miami Heat, Inter Miami, Florida Panthers...

27/07/2026

Behind The Mic: CBS Sports Bolsters College Football Analyst Team

Behind The Mic provides a roundup of recent news regarding on-air talent, including new deals, departures, and assignments compiled from press releases and repo...

27/07/2026

PBR Goes Animated With BS: Bull Stories, Giving Its Bucking Bulls a Voice

Ten one-minute shorts will roll out across CBS, The CW, Paramount+ during the 2026 PBR Teams season PBR is officially moving into scripted animation. The Profe...

27/07/2026

Vochlea announce DubBox

New app turns vocal percussion into polished loops Vochlea, the company behind the voice-to-MIDI instrument Dubler 2, have just announced the launch of a ne...

27/07/2026

Sonora Cinematic launch Pure 12-String for Soundbox

Latest MPE-capable instrument completes Pure Trilogy line-up Sonora Cinematic have just released the third and final instalment in their series of acoustic ...

27/07/2026

fedDSP introduce Opto compressor plug-in

Emulates four varieties of optical compression The latest addition to the fedDSP line-up has just been announced, and packs four distinct optical compressor...

27/07/2026

Drawmer reveal the OC1 & FC1

Optical & FET compressors join 500-series line-up At our recent GearExpo UK show, we heard from Drawmer that they would soon be launching a pair of new 500-...

27/07/2026

T-Mobile Tops Ookla's Mobile Network Rankings

Share Copy link Facebook X Linkedin Bluesky Email...

27/07/2026

Pebble to Feature Virtualization, Cloud-Based Playout Tech at IBC

Share Copy link Facebook X Linkedin Bluesky Email...

27/07/2026

NBCU Telemundo Turns To Chyron PRIME 5 For World Cup Graphics

Share Copy link Facebook X Linkedin Bluesky Email...

27/07/2026

Lightware Adds SNMPv3 Monitoring to Taurus Devices

Lightware announces SNMPv3-based monitoring support for selected Taurus devices, available from firmware v1.20.0. The update enables IT administrators and AV in...

27/07/2026

Mediagenix Showcases the Real-Time Media Enterprise at IB...

Mediagenix, a global leader in smart content solutions to profitably connect the right content to the right audience, will showcase its vision for the Real-Time...

27/07/2026

Official trailer: Gugu Mbatha-Raw stars in Sky Original supernatural thriller Possession

All episodes available Thursday 6 August on Sky and streaming service NOWMonday ...

27/07/2026

Seven paradoxes shaping the next era of media production - Episode 4

Why Confidence MattersIn this series, we explore the technologies, architectures and operational realities shaping modern media operations. Along the way, we ex...

27/07/2026

Apple brings AppleCare One to the UK, streamlining coverage - UPDATE - Posted on 27 July 2026

Apple today announced AppleCare One - a new way for customers to protect multipl...

27/07/2026

944,000 VIEWERS WATCH RT'S COVERAGE OF MAYO'S HISTORIC WIN, AFTER A 75 YEAR WAIT TO LIFT THE SAM MAGUIRE

Yesterday witnessed truly memorable scenes in Croke Park, bringing the curtain d...

27/07/2026

SES Statement On FCC Upper C-band Auction Decision

Luxembourg, July 27, 2026 - SES, a leading space solutions company, issued the following statement following the U.S. Federal Communications Commission approval...