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

02/10/2026

NESN, SportsNet Pittsburgh Debut New-Look Scorebug, Graphics for NHL Season

Design reflects feedback on graphics introduced for MLB Red Sox and Pirates games Boston Bruins games on NESN and Pittsburgh Penguins games on SportsNet Pittsb...

02/10/2026

NBC Sports Leans Into Image Quality, Drones, Distinct Camera Positions, REMI as College-Football Slate Hits Big Stretch

NEP SS7/ST7 anchors Big Ten Saturday Night; nine Peacock games are produced from...

02/10/2026

SVG GameDay, Ep. 33: National Football Leagues Tim Tubito - Fan Entertainment at Home & Abroad

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

02/10/2026

GameTime Productions Delivers National Broadcast Production for AUSL Season

GameTime Productions provided national broadcast production services for the Athletes Unlimited Softball League (AUSL) 2026 season, with coverage distributed ac...

02/10/2026

Audio-Technica Introduces HP-HBM50x Replacement Headband for ATH-M50x

Audio-Technica has introduced the HP-HBM50x, a genuine replacement headband for the ATH-M50x professional studio monitor headphones. The HP-HBM50x is compatible...

02/10/2026

ASG Helps Black Lava Studios Build 9.1.6 Immersive Audio Facility

Advanced Systems Group (ASG) has helped audio professional Steve Schatz design and build Black Lava Studios, a 9.1.6 Dolby Atmos mixing and mastering facility i...

02/10/2026

Cobalt Digitals PACIFIC Line Wins Two IBC Best of Show Awards

Cobalt Digital has received Best of Show awards from TV Tech and TVB Europe at IBC2026 for solutions from its PACIFIC compression line. TV Tech recognized the ...

02/10/2026

ESPN and TMRW Sports Extend Multi-Year U.S. Media Rights Deal for TGL

ESPN and TMRW Sports have announced a multi-year extension of their U.S. media rights agreement for TGL presented by SoFi. The 2027 TGL season will open Sunday,...

02/10/2026

Devlin Design Group and Clickspring Design Announce Strategic Alliance

Devlin Design Group (DDG) and Clickspring Design (CSD) have announced a strategic alliance combining their design capabilities for broadcast, media, workplace, ...

02/10/2026

CSMG Named Exclusive Media Rights Representative for the NCHC

The National Collegiate Hockey Conference has announced a partnership with CSMG (Collegiate Sports Management Group) making the firm the exclusive representativ...

02/10/2026

NAB NY 2026: Mediaproxy To Showcase AI Monitoring and Browser-Based Multiviewer

Mediaproxy will exhibit at NAB Show New York (Booth 561, Javits Center, October 21-22), demonstrating new AI capabilities in its LogServer compliance platform a...

02/10/2026

Mesh Broadcast Services Installs Calrec Argo M in Eclipse Mobile Production Unit

Mesh Broadcast Services has installed a Calrec Argo M console in the production area of its Eclipse 40-foot mobile unit, recently moved onto a 2025 Freightliner...

02/10/2026

Richmond AFL Deploys Vizrts Viz Libero Teams for Coaching and Content

Vizrt has announced that Richmond AFL has signed on to use Viz Libero Teams for coaching analysis and content creation. The platform provides 3D match analysis ...

02/10/2026

Oak View Group Names Cisco as Official Technology Partner for Infrastructure Management Across OVGs Venue Network

Oak View Group (OVG) has announced Cisco as an Official Technology Partner. Thro...

02/10/2026

Clear-Com Arcadia Central Station Installed at Audiovisual Training Centre in d

Clear-Com has announced that the Audiovisual Training Centre in d , Poland, has installed an Arcadia Central Station as the communications hub for its broadca...

02/10/2026

Sportel Announces Awards Jury, Highlighted by Multiple Champions

A major figure in international football, three-time French champion and three-time Ligue 1 top scorer, Sonny Anderson will chair the SPORTEL Awards 2026 Jury. ...

02/10/2026

Bantaray Mobile Sports Production Relies on AJA FiDO Converters for Niche Sports Broadcasts

California-based Bantaray Mobile Sports Production has built its mobile producti...

02/10/2026

Overtime Raises New Strategic Investment Led by Eldridge Capital Management

Overtime has announced a new strategic investment led by Eldridge Capital Management. Eldridge has investments across sports and media including the Los Angeles...

02/10/2026

Milwaukee Bucks Launch Bucks+ Streaming Service For 2026-27 Season

The Milwaukee Bucks have launched Bucks , a direct-to-consumer streaming service that expands access to Bucks games during the 2026-27 season for fans statewide...

02/10/2026

Roland update Zenology GX for iPad

v1.9.3 introduces AUv3 support Roland have just released an update that kits their free iPad-based software synth out with AUv3 support, meaning it can now ...

02/10/2026

MOTU Digital Performer 12 now available

Dolby Atmos support, AI-powered stem separation & more The latest version of MOTU's DAW software is now available, and marks a major step forward with t...

02/10/2026

iFi audio reveal the GR2 MT

Portable DAC created in collaboration with Steve Levine British hi-fi experts iFi audio have unveiled a new Master Tuned variant of their praised iDSD GR2 p...

02/10/2026

New SBS podcast How Australia Works helps migrants to navigate Australia's democracy

New SBS podcast How Australia Works helps migrants to navigate Australia's d...

02/10/2026

NFVF Announces Appointment of New Chief Executive Officer

01 October 2026 | Johannesburg, South Africa - The National Film and Video Foundation (NFVF), an entity of the Department of Sport, Arts and Culture (DSAC), is ...

02/10/2026

Inside the Pirate Ecosystem: How Illegal Streaming Devices Put Consumers at Risk

In our latest blog, Tim Pearson looks at streaming piracy from a different lens, focusing on digital trust, consumer risk, and the future of subscriber protecti...

02/10/2026

Reps. Raskin, Whitesides Call for Investigation into Trumps Taxpayer-Funded Political Ads

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

WHYY Completes Acquisition of Penn State's WPSU

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

FCC Updates EEO Rule Wording No Form 395-B

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

AJA Video Helps Bantaray Mobile Tap Into Niche Sports Streaming

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

Haymaker VFX acquires SWISS

Haymaker VFX acquires SWISS Brie Clayton October 2, 2026 0 Comments Stockholm-based, globally recognized creative team becomes part of Haymaker VFX in...

02/10/2026

Treasure & Dirt Shot with URSA Cine 17K 65

Treasure & Dirt Shot with URSA Cine 17K 65 Brie Clayton October 2, 2026 0 Comments DP Edward Goldner, ACS, relied on 65mm sensor to capture vast deser...

02/10/2026

Sonnet Announces Industry's Only Bus-Powered 10 Gigabit Ethernet Thunderbolt 5 Adapter

Sonnet Announces Industry's Only Bus-Powered 10 Gigabit Ethernet Thunderbolt...

02/10/2026

Mediaproxy brings AIdriven monitoring and browserbased multiviewing to NAB Show New York

Mediaproxy brings AI driven monitoring and browser based multiviewing to NAB Sho...

02/10/2026

Cobalt Digital's Pacific Line Wins Two Future Best of Show Awards at IBC

Cobalt Digital's Pacific Line Wins Two Future Best of Show Awards at IBC Brie Clayton October 1, 2026 0 Comments Manufacturer receives honors from...

02/10/2026

Emergent Names Tom Shelburne Head of Business Development, North America

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

Mesh Broadcast Services Adds Calrec Argo M Console

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

International Swimming League Names Gravity Media Official Broadcast Partner

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

Big Blue Marble Adds Live Multiview to its Cloud Video Kit

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

AI Independence, Interoperability Fuel IP-Based Media Production

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

Photo Gallery: 34th Annual Broadcasting+Cable Hall of Fame

Share Copy link Facebook X Linkedin Bluesky Email...

02/10/2026

Andres Arochi Brings ZEISS Master Primes to Lady Gagas Th...

Cinematographer Andres Arochi was on his way back from filming in Spain when he got the call that Tim Burton would be directing a music video for Lady Gaga and ...

02/10/2026

Cobalt Digitals Pacific Line Wins Two Future Best of Show...

Cobalt Digital's Pacific Line Wins Two Future Best of Show Awards at IBC Manufacturer receives honors from both TV Tech and TVB Europe for advancements in...

02/10/2026

Maxon Adds Support for Artist-Controlled Automation with...

Maxon, maker of powerful, approachable software solutions for creators working in 2D and 3D design, motion graphics, visual effects and visualization, today ann...

02/10/2026

Vizrt reimagines live production workflows with fresh Tri...

The strengthened TriCaster portfolio increases accessibility to leading media technology, drives more creative experiences, and scales with every production wit...

02/10/2026

Computer-designed protein targets immune receptor linked to inflammation at a new undruggable site

LA JOLLA, CA-To sense their environment and respond accordingly, cells enlist me...

02/10/2026

Crystal Lake, a Friday the 13th prequel series, coming to Sky & NOW on 19 October

Friday 2 October 2026 Crystal Lake, a Friday the 13th' prequel series, com...

02/10/2026

Sky VIP helps families celebrate the Christmas season with 5,000 free tickets to LEGOLAND Windsor Resort

Friday 2 October 2026 Sky VIP helps families celebrate the Christmas season wit...