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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...