This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Invoke rest api not returing json

Making a request to the api in json for json returns XML.

Here is the request out bound request

OST 172.24.251.158:17778/.../CreateCorePluginConfiguration

Accept: */*

Authorization: Basic xxxxxxxxx( not shown )

Content-Length: 371

Content-Type: application/json

[{"WmiRetriesCount":0,"Credentials":[{"CredentialID":78,"Order":"1"},{"Order":"2","CredentialID":77},{"CredentialID":85,"Order":"3"},{"CredentialID":82,"Order":"4"},{"CredentialID":84,"Order":"5"},{"CredentialID":92,"Order":"6"},{"Order":"7","CredentialID":3},{"CredentialID":73,"Order":"8"}],"BulkList":[{"Address":"165.237.101.81"}],"WmiRetryIntervalMiliseconds":1000}]

Here is the response from the server: ( it is not returning json)

HTTP/1.1 200 OK

Date: Fri, 11 May 2018 22:07:52 GMT

Server: Microsoft-HTTPAPI/2.0

Content-Length: 2686

Content-Type: application/json

"<?xml version=\"1.0\" encoding=\"utf-16\"?><PluginItems><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><string>SolarWinds.Orion.Core.Models.Discovery.CoreDiscoveryPluginConfiguration,SolarWinds.Orion.Core.Models</string></ArrayOfstring></knownTypes><pluginItem><ArrayOfDiscoveryPluginConfigurationBase xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery\"><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Orion\" i:type=\"d2p1:CoreDiscoveryPluginConfiguration\"><d2p1:ActiveDirectoryList /><d2p1:AddressRange /><d2p1:AgentsAddresses xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" /><d2p1:AutoImportVolumeTypes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/SolarWinds.Common.Snmp\" i:nil=\"true\" /><d2p1:BulkList xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d3p1:string>165.237.101.81</d3p1:string></d2p1:BulkList><d2p1:Credentials><d2p1:credentials><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" /></knownTypes><pluginItem><d2p1:ArrayOfCredential xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" /></pluginItem></d2p1:credentials></d2p1:Credentials><d2p1:DiscoverAgentNodes>false</d2p1:DiscoverAgentNodes><d2p1:PreferredPollingMethod>SNMP</d2p1:PreferredPollingMethod><d2p1:SharedCredentials xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d3p1:KeyValueOfintint><d3p1:Key>1</d3p1:Key><d3p1:Value>78</d3p1:Value></d3p1:KeyValueOfintint><d3p1:KeyValueOfintint><d3p1:Key>2</d3p1:Key><d3p1:Value>77</d3p1:Value></d3p1:KeyValueOfintint><d3p1:KeyValueOfintint><d3p1:Key>3</d3p1:Key><d3p1:Value>85</d3p1:Value></d3p1:KeyValueOfintint><d3p1:KeyValueOfintint><d3p1:Key>4</d3p1:Key><d3p1:Value>82</d3p1:Value></d3p1:KeyValueOfintint><d3p1:KeyValueOfintint><d3p1:Key>5</d3p1:Key><d3p1:Value>84</d3p1:Value></d3p1:KeyValueOfintint><d3p1:KeyValueOfintint><d3p1:Key>6</d3p1:Key><d3p1:Value>92</d3p1:Value></d3p1:KeyValueOfintint><d3p1:KeyValueOfintint><d3p1:Key>7</d3p1:Key><d3p1:Value>3</d3p1:Value></d3p1:KeyValueOfintint><d3p1:KeyValueOfintint><d3p1:Key>8</d3p1:Key><d3p1:Value>73</d3p1:Value></d3p1:KeyValueOfintint></d2p1:SharedCredentials><d2p1:SubnetList /><d2p1:WMICredentials /><d2p1:WmiRetries>0</d2p1:WmiRetries><d2p1:WmiRetryInterval>PT1S</d2p1:WmiRetryInterval></DiscoveryPluginConfigurationBase></ArrayOfDiscoveryPluginConfigurationBase></pluginItem></PluginItems>"