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

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

Dolby Sets the New Standard for Premium Entertainment at CES 2026

January 6 2026, 05:30 (PST) Dolby Sets the New Standard for Premium Entertainment at CES 2026 Throughout the week, Dolby brings to life the latest innovatio...

20/05/2026

New Nissan Stadium Is First NFL Venue With Permanent Built-In Music Stage

True to the Music City theme, the Tennessee Titans plan to make live music a prominent fixture on game days at the new venue Reflecting the continuing converge...

20/05/2026

NHL Taps Honeywell To Make Arenas, Facilities More Energy-Efficient

The long-term goal is innovation for the next generation of hockey rinks at both the professional and the community level The National Hockey League (NHL) toda...

20/05/2026

A Look Into the Future: What It Takes To Power the Next Generation of Sports Stadiums

End-users and vendors alike work toward cost-effective yet high-quality solution...

20/05/2026

Nasvhvilles New Nissan Stadium To Host Super Bowl LXIV in 2030

The National Football League has announced that Nashville will host Super Bowl LXIV in 2030 at the new Nissan Stadium. The announcement was made at the NFL Spri...

20/05/2026

NFL Awards Minnesota as Host Site of 2028 NFL Draft

The NFL has announced that the 2028 NFL Draft presented by Bud Light will take place in Minnesota, uniting fans from around the world to celebrate one of the mo...

20/05/2026

Lawo Highlights Edge One at InfoComm 2026

As professional AV workflows continue to evolve, expectations around audio, video, networking, and control are rising rapidly. At InfoComm 2026 in Las Vegas, La...

20/05/2026

Haivision to Showcase Video Wall, IPTV, and Ultra-Low Latency Video Innovations at InfoComm 2026

Haivision will showcase its latest innovations at InfoComm 2026, taking place fr...

20/05/2026

Spotify House Returns to CMA Fest With 3 Days of Nonstop Country Music

For the seventh year, Spotify is returning to CMA Fest with Spotify House, the festival's premiere destination for fans. We're taking over downtown Nash...

20/05/2026

Aero 2 from Acustica Audio

Amp-simulation software expanded Acustica Audio's latest release greatly expands on their amp-simulation platform, turning it into a complete amplifica...

20/05/2026

Arturia update the KeyLab Mk3

MainStage integration, Analog Lab improvements & more Arturia have just announced the release of an update that brings an assortment of new features to thei...

20/05/2026

SGL Carbon holds successful Annual General Meeting with strong approval of proposed resolutions

At the Annual General Meeting held on May 20, 2026, the shareholders of SGL Carb...

20/05/2026

From Gulkula to the nation: Yothu Yindi Foundation and NITV deepen national access to Garma Festival

From Gulkula to the nation: Yothu Yindi Foundation and NITV deepen national acce...

20/05/2026

SBS appoints David Fernandez as National Manager, Digital & TV Sales

SBS appoints David Fernandez as National Manager, Digital & TV Sales 20 May, 2026 Media releases SBS has appointed David Fernandez as National Manager, Dig...

20/05/2026

Rohde & Schwarz and INFOZAHYST: A strategic alliance set to redefine modern defense

Rohde & Schwarz and INFOZAHYST: A strategic alliance set to redefine modern defe...

20/05/2026

L3Harris Achieves Major Milestones With Latest Series of Rotating Detonation Engine Tests

A Rotating Detonation Engine being hot fire tested at Purdue University's Zu...

20/05/2026

VAMPIRE Confirms Integrated Capability During Live Exercises

A U.S. Army VAMPIRE system, assigned to Bravo Battery, 1st Battalion, 51st Air Defense Artillery Regiment, 7th Infantry Division/Multi-Domain Command - Pacific ...

20/05/2026

NCAA Tournaments Spark March Madness for Paramount and Warner Bros. Discovery in Nielsen's The Gauge

Cable Captures Only Monthly Increase Among Viewing Categories in March, Earns it...

20/05/2026

The Gauge: Poland | April 2026

April brought a symbolic decrease in the overall time spent in front of television screens. On average, Poles watched video content for 3 hours and 51 minutes a...

20/05/2026

DirecTV Asks FCC to Block Scripps' INYO Acquisition

Share Copy link Facebook X Linkedin Bluesky Email...

20/05/2026

RTS Technology Centre Launches the RTS Technology Awards...

The Royal Television Society Technology Centre today announces the launch of the RTS Technology Awards 2026, celebrating excellence, innovation and achievement ...

20/05/2026

Lightware powers immersive video spectacle for The Hunger...

In the heart of London's financial district, the new purpose-built Troubadour Canary Wharf Theatre invites audiences to experience Suzanne Collins' inte...

20/05/2026

New LiveU LU900Q Powers Record Breaking Broadcast of the...

LiveU, the leader in live IP-video solutions, today announced that production powerhouse BCC Live successfully deployed the new LU900Q intelligent production un...

20/05/2026

Nella Mente di Narciso Docuseries Uses Blackmagic Design Workflow

Nella Mente di Narciso Docuseries Uses Blackmagic Design Workflow Brie Clayton May 19, 2026 0 Comments PYXIS 6K full frame camera and DaVinci Resolve ...

20/05/2026

Beeble launches Canvas, a node-based AI compositor for VFX and Virtual Production pipelinesx

Beeble launches Canvas, a node-based AI compositor for VFX and Virtual Productio...

20/05/2026

DSPolitical and FreeWheel Partner on Political CTV Ads

Share Copy link Facebook X Linkedin Bluesky Email...

20/05/2026

Amazon, Netflix and Google to Capture Half of CTV Ad Market by 2030

Share Copy link Facebook X Linkedin Bluesky Email...

20/05/2026

Roku Introduces 'Creator Hub

Share Copy link Facebook X Linkedin Bluesky Email...

20/05/2026

First Nations Factual Co-production Development Fund launched to elevate Indigenous storytelling in global markets

First Nations Factual Co-production Development Fund launched to elevate Indigen...

20/05/2026

TLC Announces All-Star Comedy Line-Up for Mock the Week: Summer Specials' on TLC

TLC Announces All-Star Comedy Line-Up for Mock the Week: Summer Specials' o...

20/05/2026

'One Hundred Years of Solitude' Concludes This August, With Part Two Premiering on the 5th and the Grand Finale on the 26th

Back to All News One Hundred Years of Solitude Concludes This August, With Part...

20/05/2026

Beloved NHK Dramas to Stream on Netflix Worldwide Starting June 22

Back to All News Beloved NHK Dramas to Stream on Netflix Worldwide Starting June 22 Entertainment 20 May 2026 GlobalJapan Link copied to clipboard Netflix...

20/05/2026

Dolby Recognized as 2025 Supplier of the Year and Overdrive Award Winner by General Motors

May 20 2026, 06:00 (PDT) Dolby Recognized as 2025 Supplier of the Year and Over...

20/05/2026

Two cooks shortlisted for the final of RT Today's TV Home Cook Competition

Mayo's Dee Freney and Margaret Leahy from Galway have reached the final of RT Today's TV Home Cook competition. Both contestants will cook again live...

20/05/2026

RT IN FULL BLOOM AT BORD BIA BLOOM 2026 WITH LIVE BROADCASTS, MUSIC, CHAT AND MUCH MORE

RT IN FULL BLOOM AT BORD BIA BLOOM 2026 WITH LIVE BROADCASTS, MUSIC, CHAT AND M...

19/05/2026

Young Journalist' finalists visit London for training and networking

The winner of Thomson Foundation's Young Journalist of the Year 2025, Tracy Bonareri Onchoke, and runner up Wangu Kanuri enjoyed a three-day trip to London ...

19/05/2026

Cisco and USGA Announce Multiyear Partnership Extension

Cisco and the USGA have announced a multiyear extension of their partnership, which began in 2018. Cisco serves as the Official Technology Partner of the USGA, ...

19/05/2026

Urban Edge Network and Spiideo Partner to Enhance NAIA Sports Streaming

Urban Edge Network (UEN), a streaming platform for NAIA sports, has announced a partnership with Spiideo to provide streaming and production tools to UEN's ...

19/05/2026

Warner Bros. Discovery Announces Expanded Roland-Garros 2026 Coverage

Warner Bros. Discovery (WBD) will provide live coverage of all 900 Roland-Garros matches across its platforms beginning with qualifiers on May 18. In Europe, 21...

19/05/2026

Tubi Launches FIFA World Cup 2026 FOX Hub

Tubi, Fox Corporation's free streaming service, has announced the launch of the FIFA World Cup 2026 FOX Hub, a dedicated destination for World Cup programmi...

19/05/2026

Telefnica and Sony Conduct 5G mmWave Broadcast Trial at Movistar Arena

Telef nica, in collaboration with Sony, has conducted a 5G connectivity trial at the Movistar Arena in Spain using the 26 GHz millimetre wave (mmWave) band. The...

19/05/2026

Ross Production Services Integrates Calrec Argo M into New Hypermax-1 Truck

Ross Production Services (RPS) has installed a Calrec Argo M console into its new Hypermax-1 remote production truck, replacing one of three Argo S consoles pre...

19/05/2026

Panasonic Projector and Display Acquires HIVE Media Control

Panasonic Projector and Display Corporation has announced the acquisition of 100% of the shares of UK-based media technology company Hive Media Control Ltd. (HI...

19/05/2026

Globecast Completes Major Renovation of Singapore Facility

Globecast has announced the completion of a nine-month renovation of its Singapore facility, converting it from a traditional linear broadcast operation into a ...

19/05/2026

Grass Valley Signs Three-Year Enterprise Agreement with Phoenix Broadcast Solutions

Grass Valley has announced a three-year enterprise agreement with Phoenix Broadc...

19/05/2026

Watch Brasil Selects Bitmovin for Streaming Player, Encoder, and Observability

Bitmovin has announced that Watch Brasil, a streaming platform operating across Brazil and Europe since 2018, has replaced its legacy systems with Bitmovin'...

19/05/2026

Ateme and Akamai Power Nepal Premier League Live Streaming

Ateme has announced the migration of Dish Home Nepal's Nepal Premier League (NPL) streaming infrastructure to Ateme's TITAN Live solution deployed on Ak...