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

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

08/07/2026

LARA Wizard Touchpanel gets major configuration upgrade

Lightware is introducing the biggest update yet to the LARA Wizard Touchpanel configuration experience, designed to help integrators work faster while deliverin...

08/07/2026

DMC Production Reimagines Live OB with Calrec

DMC Production has turned to Calrec in its quest to redefine outside broadcasting with a flexible approach to live production that reverse engineers the convent...

08/07/2026

FCC Probe of 'The View' Racks Up 77,611 Comments

Share Copy link Facebook X Linkedin Bluesky Email...

08/07/2026

NAB Releases New Radio and TV Station Self-Inspection Guides

Share Copy link Facebook X Linkedin Bluesky Email...

08/07/2026

Ross Production Services Standardizes on Clear-Com Intercom Systems

Share Copy link Facebook X Linkedin Bluesky Email...

08/07/2026

Reel FX Animation Adopts Foundrys Flix on Doctor Dolittle...

Foundry today announced that Reel FX Animation Studios has adopted Flix to standardize their pipeline and streamline processes across departments. Flix is a vis...

08/07/2026

The right team. The right time.' How The Killings at Parrish Station stuck to their creative guns

The right team. The right time.' How The Killings at Parrish Station stuck t...

08/07/2026

Australians in Film and Screen Australia launch FUTURE VISION Forward to elevate Australian television to the global stage

Australians in Film and Screen Australia launch FUTURE VISION Forward to elevate...

07/07/2026

Open call: Apply for the Media Innovation Europe Validation Booster

Applications are now open for the Validation Booster, a six-month acceleration programme supporting journalists, media organisations, content creators, media in...

07/07/2026

HAND Issues Persistent Digital IDs to 50 Top 2026 MLB Draft Prospects

The Universal Talent Identifier (HAND) has issued HAND IDs to 50 top prospects ahead of the 2026 MLB Draft, including consensus top-ranked players Roch Cholowsk...

07/07/2026

Cisco and McLaren Mastercard Formula 1 Team Extend Technology Partnership

Cisco and the McLaren Mastercard Formula 1 Team have announced an extension of their partnership, expanding the scope from networking and communications to incl...

07/07/2026

LucidLink Announces Enhanced Integration with Adobe Frame.io

LucidLink has announced a workflow integration with Adobe Frame.io that gives production teams unified access to Frame.io projects alongside supporting producti...

07/07/2026

Chyron Appoints Ahmed Magd as Middle East Sales Director

Chyron has announced the appointment of Ahmed Magd as Sales Director for the Middle East. Magd joins from previous senior commercial roles at Riedel Communicati...

07/07/2026

Leader Electronics T&M Equipment Used in Live Broadcast of Pope Leo XIVs Visit to Sagrada Famlia

Leader Electronics of Europe has announced that its PHABRIX Qx rasterizer and Le...

07/07/2026

eCLUTCH Secures EMEA and MENA Broadcast Rights for Esports World Cup 2026

eCLUTCH has announced it has acquired broadcast rights to the Esports World Cup 2026 for EMEA and MENA, covering the Middle East, Africa, the Balkans, Sweden, a...

07/07/2026

Riedel and ARRI Support Cinematic Live Production at Eurovision Song Contest 2026

Riedel Communications and ARRI supported ORF's host broadcast of the Eurovis...

07/07/2026

ARRI Releases ALEXA 35 Live Xtreme With High-Frame-Rate SDI Output for Live Production

ARRI has announced the ALEXA 35 Live Xtreme, a camera that adds high frame rate ...

07/07/2026

IBC 2026: LiveU To Exhibit With LU900Q, Sony Integration, EcoSystem Expansion

LiveU will exhibit at IBC 2026 (Stand 7.C24), showcasing the LU900Q Intelligent Production Unit, expanded Sony collaboration, and additions to its open IP-video...

07/07/2026

Peacock Advances Spanish-Language World Cup Streaming With Visin de Campo, Dolby Vision, Real-Time Highlights

Telemundo's coverage is packaged with Multiview, Catch Up with Key Plays, in...

07/07/2026

Australian Rugby League Commission Secures $5.3 Billion Media Rights Deal with Foxtel, Nine, and Sky NZ

The Australian Rugby League Commission (ARLC) has announced a seven-year media r...

07/07/2026

BYUtv Partners With Big 12 for Football Media Days Production

Produced onsite at The Star in Frisco, TX, live coverage of the two-day event airs on ESPN platforms The season for Football Media Days is here, and the Big 12...

07/07/2026

Rogers To Become 100% Owner of Maple Leaf Sports & Entertainment

Rogers Communications Inc. has announced an agreement to acquire the remaining 25% ownership stake in Maple Leaf Sports and Entertainment (MLSE) from Kilmer Spo...

07/07/2026

Mobile TV Groups Nick Garvin on Success of MTVG Production Platform at New Mountain Media Center

End-to-end broadcast solution includes fleet of mobile units, Cloud Control, and...

07/07/2026

SVG Executive Perspectives 2026: Industry Leaders Discuss Biz and Tech Trends for the Year Ahead

Sports-production-tech experts sound off on the state of the industry...

07/07/2026

Mix Buddy instrument mixer from Heritage Audio

New mixer aimed squarely at instrument-level sources Heritage Audio have clearly been busy recently, as alongside their all-new Tubestrip, they've also ...

07/07/2026

Heritage Audio unveil the Tubestrip

New channel strip combines popular hardware designs The latest arrival to the Heritage Audio line-up brings together a selection of their praised hardware d...

07/07/2026

Clear-Com Powers Ross Production Services Mobile Productions

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

07/07/2026

New Nielsen data shows Kiwis' wellbeing is shaped by fitness, finance and mental health

New Kessler 10 data now available in Nielsen CMI gives brands a deeper view of h...

07/07/2026

Vitamin brands boost ad spend by 27% as 11.8 million Australians turn to supplements

New Nielsen Ad Intel and CMV data reveals rising competition in Australia's ...

07/07/2026

DAS Disputes Wiegels 3.0 EAS Limitations

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

LiveU to Showcase Q Era Innovations at 2026 IBC Show

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

LucidLink Unifies Adobe Frame.io, Enterprise Storage

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

ARRI Introduces ALEXA 35 Live Xtreme Camera

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

Riedel and ARRI Bring Cinematic Live Production to the Eu...

Riedel Communications and ARRI played a key role in one of the most technically ambitious Eurovision Song Contest productions to date. For the first time in the...

07/07/2026

Berklee Valencia Honors Eric Whitacre at the 2026 Commencement Ceremony

Berklee Valencia Honors Eric Whitacre at the 2026 Commencement Ceremony The Grammy-winning composer was celebrated alongside this years cohort of masters degr...

07/07/2026

Disagreements Abound Over the Adequacy of C-Band Replacements

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

Cameras Become More Connected to Production Workflows

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

NFL on TV: Time to Move the Regulatory Goal Posts?

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

Building a Future-Ready Facility for Tomorrow's Broadcasters

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

Rewriting the Control Room: How Broadcasters Are Going Remote

Share Copy link Facebook X Linkedin Bluesky Email...

07/07/2026

Fincons Group appoints Andrea Fravega as Global BU Media...

The appointment will drive growth and innovation across the Media Business Unit Fincons Group, a leading IT business consultancy and systems integrator company...

07/07/2026

Big Blue Marble debuts next-gen ultra low latency MoQ str...

International broadcast and streaming expert Big Blue Marble has announced a multi-month Proof of Concept (PoC) for Media over QUIC (MoQ) during a major interna...

07/07/2026

Leader provides Test and Measurement for global broadcast...

Test & measurement innovator, Leader Electronics of Europe, is proud to announce that two of its leading products, the PHABRIX Qx rasterizer and LeaderPhabrix L...

07/07/2026

Clear-Com Powers Ross Production Services Mobile Producti...

Clear-Com announced that Ross Production Services (RPS), a leading provider of mobile production solutions for live events and broadcasts, has standardized on ...

07/07/2026

Q Era Innovations Take Center Stage for LiveU at IBC2026

LiveU redefined live newsgathering with the invention of cellular bonding. At IBC2026, Stand 7.C24, the company will show how that foundation is evolving into t...

07/07/2026

Camera to Cloud Meets Camera to Timeline LucidLink Unifi...

LucidLink, a leader in cloud-based file services for content creators, today announced an enhanced workflow integration between LucidLink and Adobe Frame.io tha...

07/07/2026

Comcast's Sky to Acquire ITV Media and Entertainment

Share Copy link Facebook X Linkedin Bluesky Email...