Create a Geoevent INPUT with a poll to Admin API

05-18-2018 07:17 AM
New Contributor III

Hello everyone,

I want create a Geoevent INPUT with a poll to ArcGIS GeoEvent Server REST Admin API (https://localhost:6143/geoevent/admin/monitoring) to send messages when a event occurs.

But I have an error:

Request failed (HTTP/1.1 415 Unsupported Media Type)

I think it's because Admin API need a token generated.

someone could poll the admin API from an input???

From already thank you very much!

0 Kudos
1 Reply
Occasional Contributor

Javier Rodolfo Pintos Ettlin

Hello Javier,

There are two things to address here. You are correct. Any connection to the admin API is going to require a token. Otherwise, trying to access that endpoint will result in a "Forbidden" error.

However, the message that you mentioned says "Unsupported media type." This is likely due to the fact the MIME type in the input connector configuration is not set correctly. The monitoring endpoint is formatted as JSON. Since it is not a JSON file that is being accessed and rather a JSON API, you will want to make sure the MIME type specified is application/JSON.

Once this is set, you should no longer run into the Request failed (HTTP/1.1 415 Unsupported Media Type) error.

Now, going back to the access concern...the way to work around this would be to somehow include the token in your request to the endpoint. The simplest way would be to generate a token from the Portal admin directory.

From there, you can append the token to the URL and use that URL for the input connector's URL parameter. You should then see the counts go up for that input and a definition be created.

I hope this helps!


0 Kudos