All Apps and Add-ons

Add the API to a Visual Studio project.

jmsummitt
New Member

Attempting to add a service reference to the API (Splunk installed locally as "local system") in a Visual Studio project results in a certificate warning, a login prompt (logging in as "admin" successfully) then finally an error with theses details:

The document at the url https://localhost:8089/services was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'XML Schema' is 'The root element of a W3C XML Schema should be and its namespace should be 'http://www.w3.org/2001/XMLSchema'.'. - Report from 'DISCO Document' is 'Discovery document at the URL https://localhost:8089/services could not be found.'. - The document format is not recognized. - Report from 'WSDL Document' is 'There is an error in XML document (4, 2).'. - was not expected. Metadata contains a reference that cannot be resolved: 'https://localhost:8089/services'. The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="/splunk"'. The remote server returned an error: (401) Unauthorized. If the service is defined in the current solution, try building the solution and adding the service reference again.

0 Karma

Neeraj_Luthra
Splunk Employee
Splunk Employee

Splunk APIs are RESTful and you are expecting a WSDL document.

Instead of adding as a service reference, I recommend using the Splunk SDK for C# and add it as a project dependency.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...