Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Receiving 403 Forbidden When Using REST API In C#

$
0
0

Receiving 403 Forbidden When Using REST API In C#

 

I was referred to the following C# example of using REST APIs Sample code: OrionSDK/Program.cs at master · solarwinds/OrionSDK · GitHub

 

This looked very promising and I have attempted to implement it for my process. However, all requests are failing with a 403 Forbidden error.

 

I have verified if I used invalid credentials I get a 401 unauthorized error so it appears to be authenticating my request, but I can't get results for a simple query operation.

 

I am basically using the code from the example but I am only calling the query action with the following simple query string and no arguments:

conststring query = @"SELECT nodeid, caption FROM Orion.Nodes";

 

I have output the JSON string created before it is passed to the request and it looks like this:

{"parameters":null,"query":"SELECT nodeid, caption FROM Orion.Nodes"}

 

Is there something wrong with the JSON or my query request?


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>