I'm trying to monitor an API that is behind Azure API management using heartbeat, and I need to submit the API key.
This works: "curl https://api.blabla.com/service/v1/product/apicall" -H "Ocp-Apim-Subscription-Key: 1234567890" -i -s"
My heartbeat config is:
but all i get is ""statusCode": 401, "message": "Access denied due to missing subscription key"
What am I missing?
If you look at the headers section: https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html you will notice that it isnt wrapped in double quotes.
I think you would just want to put
'Ocp-Apim-Subscription-Key': '12345' on the line after the other header.
It looks like:
- type: http
schedule: '@every 5s'
'Ocp-Apim-Subscription-Key': '12345' # Maybe?
# urlencode the body:
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.