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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...