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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...