Uploading Images to Orion Maps through an API

Hello, I'm currently looking into automating the background image uploading for Orion Maps (since it doesn't support background image from URL). From taking a look at what network requests are made when an image is uploaded it looks like "https://<solarwindsServer>/api2/maps/v1/assets/images" is the correct address to post the file to. However when testing in Postman I get a 200 response back which looks to be a redirect to the login page, rather than any sort of 401 error like I'd expect. I've tried to setup an Authorization header to try and authenticate, however that causes the same redirect to the login page.

I've looked into possibly using the JSON/REST api which I can get to work, however I don't believe it'd allow me to upload an image.

Has anyone managed to get "https://<solarwindsServer>/api2/maps/v1/assets/images" to work, or found a different way to upload images to Orion Maps without having to go into the web interface?

  • What I can briefly tell you is that /api2 is an internal API that requires authentication, which I believe is cookie-based. It s not intended for general access like the SWIS API, that is not to say it's impossible to do what you describe, but it may be difficult. 

  • Alright, thanks for the info. I did get the file to upload after copying over my browser cookies to Postman, and I believe I found out how to update the map with that image, need to check things before testing it though. Now I just need to find a way to generate the cookies without having to auth manually and copy them over.