All Apps and Add-ons

Add the API to a Visual Studio project.

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

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
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!


Or Learn More in Our Blog >>