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

03/09/2026

NAB Backs Most Proposed EAS Changes at FCC

Share Copy link Facebook X Linkedin Bluesky Email...

03/09/2026

TiVo Expands FAST Channels, AI Discovery with Latest OS Update

Share Copy link Facebook X Linkedin Bluesky Email...

03/09/2026

Eluvio Advances Content Fabric, AI at IBC 2026

Share Copy link Facebook X Linkedin Bluesky Email...

03/09/2026

Haivision Adds Bonded 5G Cellular Support to Makito ONE

Share Copy link Facebook X Linkedin Bluesky Email...

03/09/2026

Alex Pannell Joins Gravity Media as Chief Business Officer

Share Copy link Facebook X Linkedin Bluesky Email...

03/09/2026

AI-Media To Feature Multilingual AI Developments At IBC2026

Share Copy link Facebook X Linkedin Bluesky Email...

03/09/2026

Tuxera and ATTO collaborate to deliver blistering macOS n...

Recognizing the ever-increasing demands for media throughput in challenging environments like post-production, two leaders in network technology have worked tog...

03/09/2026

EVS and Matrox Video Join Forces to Accelerate Dynamic Me...

EVS, a leader in live video technology and production infrastructure solutions, and Matrox Video, a leader in software-defined media technology and IP-based vid...

03/09/2026

AJA Debuts OG-FiDO-4 openGear Four-Channel SDI/Fiber Conversion Cards

AJA Debuts OG-FiDO-4 openGear Four-Channel SDI/Fiber Conversion Cards Brie Clayton September 3, 2026 0 Comments New product family expands 12G-SDI and...

03/09/2026

Nice Touch launches V2 of its AI edit assistant for professional editors

Nice Touch launches V2 of its AI edit assistant for professional editors Brie Clayton September 3, 2026 0 Comments Built by two editors with twelve ye...

03/09/2026

Accedo and MediaKind Launch End-to-End Streaming Solution...

Accedo, a global provider of video streaming software and services, and MediaKind, a world-leading video technology company and the number one independent provi...

03/09/2026

14 Percent of live sports viewers have considered switchi...

International research from Big Blue Marble puts a consumer churn number against a technical failure, and sets out what streaming providers must fix before 2030...

03/09/2026

Broadpeak expands CDNaaS for streaming at scale with new...

High-performance points of presence power video streaming delivery to large audiences across Latin America with guaranteed quality of experience Broadpeak , a ...

03/09/2026

Dalia Delivers New Agentic Workflows Changing How Media W...

Dalet, a leading technology and service provider for media-rich organizations, will unveil the next evolution of Dalia at IBC2026 (7.A43), its media-aware agent...

03/09/2026

CGI showcases AI-assisted newsroom and radio workflows pa...

CGI (TSX: GIB.A) (NYSE: GIB), one of the world's largest independent IT and business consulting services firms, will showcase CGI OpenMedia Evolve and CGI d...

03/09/2026

LiveU Joins IBC Accelerator Smart Stories Consortium to D...

LiveU is participating in the IBC Accelerator Incubator 2026: Smart Stories The New Knowledge Architecture for Content Production, an industry-wide initiative...

03/09/2026

Christer Palsson brings global experience to Broadcast So...

Broadcast Solutions, a leading systems integrator and provider of innovative solutions for the broadcast and media industry, has taken another major step in its...

03/09/2026

Quortex brings AI and IP transition into focus at IBC 202...

Quortex today announced that it will showcase how it is accelerating innovation and the transition to IP at IBC 2026. The company will debut its newest intellig...

03/09/2026

Grass Valley Names Ronny Van Geel Vice President Of Cameras

Share Copy link Facebook X Linkedin Bluesky Email...

03/09/2026

VisualOn and EZDRM Enable Visualization of C2PA Provenanc...

The EZDRM approach to Revenue Security on streaming video can be visualized as a multi-dimensional set of solutions. A growing dimension of that approach is the...

03/09/2026

Kiloview Brings Hybrid AV-over-IP to Life at IBC 2026 wit...

From field capture to management, control and production, Kiloview will demonstrate one connected Hybrid AV-over-IP workflow including a complete 4RU producti...

03/09/2026

Mediagenix Curation Unlocks Greater Catalog Value Through...

Mediagenix, a global leader in smart content solutions to profitably connect the right content to the right audience, today announced Mediagenix Curation, a new...

03/09/2026

LucidLink brings distributed media into active workflows...

LucidLink, the Emmy-winning cloud-native file streaming platform for instant, secure access to large files, today announced the next step in its vision to make ...

03/09/2026

Fraudulent communications purportedly from Screen Australia

Fraudulent communications purportedly from Screen Australia 3 September 2026 Screen Australia is aware of scam attempts involving fake emails and promotional m...

03/09/2026

AJA Introduces FS8, Next-Gen 12G-SDI/SMPTE ST 2110 Media Processor

AJA Introduces FS8, Next-Gen 12G-SDI/SMPTE ST 2110 Media Processor Brie Clayton September 2, 2026 0 Comments AJA Video Systems unveiled FS8, a video a...

03/09/2026

Shooting Deadheading with Blackmagic URSA Cine 12K LF

Shooting Deadheading with Blackmagic URSA Cine 12K LF Brie Clayton September 2, 2026 0 Comments Bringing a small story to the big screen with dark com...

03/09/2026

OOONA Launches OOONA Go: Professional Localization Management for Small Companies

OOONA Launches OOONA Go: Professional Localization Management for Small Companie...

03/09/2026

East of Texas Opens at American Tobacco Campus, Bringing North Carolina's First Tex-Mex BBQ Concept to Durham

DURHAM, N.C. - East of Texas Durham has officially opened its doors at American ...

03/09/2026

Is Six-Seven over? Comedian Tony Cantwell gets the low-down from kids in new RT KIDS series, First Class Take

First Class Takes is a new six-part series for RT KIDS that captures funny, hon...

03/09/2026

NBA 2K27' With NVIDIA DLSS 5 Leads 26 New Games Coming to GeForce NOW

September is here with 26 more games streaming on GeForce NOW this month, led by a slam dunk: NBA 2K27 with the NVIDIA DLSS 5 3D-Guided Neural Rendering feature...

02/09/2026

SVG Venues & Teams Summit 2026: All Sessions Now Available To Watch on SVG PLAY

Professional and collegiate clubs, leading vendors discuss current trends in stadium production On. Aug. 12, the 2026 SVG Venues & Teams Summit explored the ev...

02/09/2026

SoFi Stadium Completes Broadcast Infrastructure Upgrade

SoFi Stadium, YouTube Theater, and Hollywood Park have completed an infrastructure upgrade expanding game presentation and broadcast production capabilities acr...

02/09/2026

IBC 2026: Comcast Technology Solutions Unveils AI-Powered Workflow Applications

Comcast Technology Solutions (CTS) has announced a suite of AI-powered workflow applications for broadcasters, content owners, and operators, built on its Video...

02/09/2026

NABA and APWPT Announce Partnership on Wireless Spectrum Advocacy

The North American Broadcasters Association (NABA) and the Association of Professional Wireless Production Technologies (APWPT) have announced a partnership to ...

02/09/2026

Prime Video Lands Exclusive In-Market Streaming Rights for Six NHL Teams Beginning This Season

Carolina Hurricanes, Anaheim Ducks, Columbus Blue Jackets, Dallas Stars, Minneso...

02/09/2026

Mercedes-Benz Stadium Goes Mini: Nine-Year-Old Venue Continues to Innovate With Control Room Mini Halo Board

New LED provides enhanced quality control, quicker show prep, detailed productio...

02/09/2026

Keeley Electronics launch the Tube Drive

Combines the Phat Drive with high-voltage valve circuit The latest pedal from Keeley Electronics combines their popular Phat Mode drive pedal with an all-ne...

02/09/2026

Lewitt introduce Space Replicator Free

Free version of virtual mixing room plug-in introduced Lewitt's Space Replicator plug-in provides users with a virtual monitoring environment that aims ...

02/09/2026

Stereophonic Bundle from AIR Music Tech

Two new mixing & mastering plug-ins revealed AIR Music Tech have just introduced the Stereophonic Bundle, a pair of processing plug-ins designed to provide ...

02/09/2026

Rohde & Schwarz has achieved initial verification of 3GPP Rel. 17 power-saving feature SSSG for 5G NR

Rohde & Schwarz has achieved initial verification of 3GPP Rel. 17 power-saving f...

02/09/2026

AgileTV and Fiend MTS Complete CDN Watermarking Integration to Fast-Track Anti-Piracy Protection for Operators

Bilbao - 3rd September 2026 -AgileTV, a leading provider of end-to-end TV and vi...

02/09/2026

Agentic AI in the content supply chain

Why agentic media supply chains need experience design built around visibility, reversibility and human authority When AI can generate a functional interface ...

02/09/2026

Gracenote study: 85% of sports fans want TV home screens to show when and where to watch favorite teams

Six-country survey finds 26% of sports fans frequently unable to determine where...

02/09/2026

Manfrotto Showcases New Video Support Solutions at IBC 2026

Share Copy link Facebook X Linkedin Bluesky Email...

02/09/2026

Mediagenix Rebrands Spideo as Mediagenix Curation

Share Copy link Facebook X Linkedin Bluesky Email...

02/09/2026

Creative Technology Group Founder Graham Andrews Sets Year-End Exit

Share Copy link Facebook X Linkedin Bluesky Email...

02/09/2026

San Antonio Spurs, DAZN Ink Exclusive Streaming Deal

Share Copy link Facebook X Linkedin Bluesky Email...