404 on PATCH annotation

Hi all, thanks in advance for any help – sure seems like I’m doing something wrong.
I’m getting a 404 when patching an annotation, using container grafana/grafana:5.4.3, which is the most recent docker image I could find here: https://hub.docker.com/r/grafana/grafana

See verbose curl output below for both the add and the patch…

THings I’ve tried:

  • I get the same 404 result using both the “id” and the “endId”
  • I get the same 404 result with and without the colon (":") prior to the id as shown in the documentation.
    PATCH /api/annotations/:id

If “:id” in the doc is supposed to indicate that “id” is a data item that I supply…I don’t think the doc makes that point.

Thanks again,

–Erik

* About to connect() to myserver.com port 3200 (#0)
*   Trying 1.1.1.1...
* Connected to myserver.com (1.1.1.1) port 3200 (#0)
> POST /api/annotations HTTP/1.1^M
> User-Agent: curl/7.29.0^M
> Host: myserver.com:3200^M
> Authorization: Bearer eyJrIjoidkd1emp6aURSN0sxRDFMeDZxTTVtcmVYMG05RGlT
> Accept: application/json^M
> Content-Type:application/json^M
> Content-Length: 147^M
> ^M
} [data not shown]
* upload completely sent off: 147 out of 147 bytes
< HTTP/1.1 200 OK^M
< Content-Type: application/json^M
< Date: Mon, 08 Apr 2019 12:15:19 GMT^M
< Content-Length: 51^M
< ^M
{ [data not shown]
* Connection #0 to host myserver.com left intact
\n response from adding grafana annotation: HTTP/1.1 200 OK^M Content-Type: application/json^M Date: Mon, 08 Apr 2019 12:15:19 GMT^M Content-Length: 51^M ^M {"endId":156,"id":155,"message":"Annotation added"}\n

* About to connect() to myserver.com port 3200 (#0)
*   Trying 1.1.1.1...
* Connected to myserver.com (1.1.1.1) port 3200 (#0)
> PATCH /api/annotations/155?endTime=1549792081000 HTTP/1.1^M
> User-Agent: curl/7.29.0^M
> Host: myserver.com:3200^M
> Authorization: Bearer eyJrIjoidkd1emp6aURSN0sxRDFMeDZxTTVtcmVYMG05RGlT
> Accept: application/json^M
> Content-Type:application/json^M
> ^M
< HTTP/1.1 404 Not Found^M
< Content-Type: application/json; charset=UTF-8^M
< Date: Mon, 08 Apr 2019 12:15:20 GMT^M
< Content-Length: 23^M
< ^M
{ [data not shown]
* Connection #0 to host myserver.com left intact
\n response from patching grafana annotation: HTTP/1.1 404 Not Found^M Content-Type: application/json; charset=UTF-8^M Date: Mon, 08 Apr 2019 12:15:20 GMT^M Content-Length: 23^M ^M {"message":"Not found"}\n
~

Replying to self here. I get the same 404 result with two different PATCH formats.

The format above includes the PATCH attribute on the URL.
THe format below includes the PATCH attribute/value in the data.

Here is the patch data:

{ "endTime":1549878481000 }

Here is the raw output from CURL:

> PATCH /api/annotations/164 HTTP/1.1^M
> User-Agent: curl/7.29.0^M
> Host: myserver.com:3200^M
> Authorization: Bearer eyJrIjoidkd1emp6aURSN0sxRDFMeDZxTTVtcmVYMG05RGlTQXYiLCJu
> Accept: application/json^M
> Content-Type:application/json^M
> Content-Length: 29^M
> ^M
} [data not shown]
* upload completely sent off: 29 out of 29 bytes
< HTTP/1.1 404 Not Found^M
< Content-Type: application/json; charset=UTF-8^M
< Date: Mon, 08 Apr 2019 14:30:16 GMT^M

Hi, me again.
Is there more detail I can post to clarify my case? Willing to sing for my supper, here.

Here’s the use case:

  1. Add Grafana Region Annotation.
  2. PATCH that same annotation with an endTime, which might be a few minutes or a few hours after the start time.

This is a trivial use case, and I’m sure I’m doing something wrong, could use just 5 minutes of help.
The output from curl, above, shows I’m getting the 404 on the PATCH.
Thanks all,

–Erik