https://docs.opsgenie.com/docs/heartbeat-api#update-heartbeat-request-partial says I can use curl -X PATCH https://api.opsgenie.com/v2/heartbeats/HeartbeatName --data "{ ... }" but when I do I get"message":"Request method 'PATCH' is not supported"So, how am I supposed to update heartbeats?
Reposting outside the thread so I can mark one reply as the answer to this question.
Shashwat Khare:Yes, unfortunately, this is a current limitation and we have an outstanding feature request to the Product team as below:https://jira.atlassian.com/browse/OPSGENIE-1648
Hi @Moses Moore ,This is Shashwat from Opsgenie support and here to help! May I know if this heartbeat is active and if you're able to do a GET call for this heartbeat?May I know your Opsgenie instance name and the email ID with which you're calling this API?Best,Shashwat
The problem is present with ALL heartbeats, not a single one. I can GET and DELETE heartbeats, but when I try PATCH as per the instructions in docs.opsgenie.com I get "Request method 'PATCH' is not supported".Opsgenie instance "gameloft". There is no email ID; as per the instructions in docs.opsgenie.com that I already linked above, I'm using an API key. The API keys are listed in Settings > Integrations, the one I'm using is "Prometheus OGI". I can GET and DELETE using this API key but PATCH responds with "Request method 'PATCH' is not supported" and NOT with a message like access denied.
Hey @Moses Moore ,Thank you for elaborating on this.Please note that the PATCH request on the heartbeat only allows the addition of data but does not allow the removal or overriding of any data, which means customers can not perform actions such as removing tags via the API.Also, could you please create an API Integration and obtain your apiKey to make requests listed above?Please make sure that the integration is not restricted to access configurations. Otherwise, the integration will only be authorized to send Ping Heartbeat Request.Best,Shashwat
Please note that the PATCH request on the heartbeat only allows the addition of data but does not allow the removal or overriding of any dataBut the documentation I already linked above says"Update Heartbeat request is used to change configuration of existing heartbeats..."And the example in the documentation shows overriding data; it even explicitly states "Sample Request To Remove ownerTeam of Heartbeat" but you just said PATCH does not allow removal. So, if you're correct and docs.opsgenie.com is wrong, then please fix docs.opsgenie.com to give correct information and remove the misleading examples.Please make sure that the integration is not restricted to access configurations... only authorized to send Ping Heartbeat RequestI already stated I can do DELETE, so I'm authorized to do more than send Ping; I should've also mentioned I can also do POST with this API key, so that's Create/Read/Delete of CRUD, but when I try to Update as per docs.opsgenie.com I get the error message. So either It's wrong that I can't curl -X PATCH, or it's wrong that docs.opsgenie.com tells me I can curl -X PATCH .
It looks like you're new here. Sign in or register to get started.