Ask a Question

Ask a Question
Back to All

DELETE /basic/announcements/ always returns OK

Hi, me again :)

We're still struggling with announcements and failing.

Our announcements are added and managed through the Server REST API so each time the prefix api-announcements.is added to the symbol automatically at your end.

As we're trying to debug or come up with a workaround for the ClientData issue (https://docs.beamable.com/discuss/64b1061f51670f0041bc6ef3) we got tired of manually deleting all the announcements through the portal.

It turns out that:

  1. The api-announcements. prefix is not expected by the endpoint
  2. DELETE /basic/announcements returns OK anyway whether the announcement was deleted or not

To better visualize the problem:

Example raw announcement json:

{

    "symbol":"api-announcements.1666429318963052555",
    "channel":"any",
    "title":"",
    "summary":"Twitter post",
    "body":"[REDACTED]",
    "clientData":{
        "Media":[
            "[REDACTED]"
        ],
        "Author":{
            "Name":"[REDACTED]",
            "ImageUrl":"[REDACTED]"
        },
        "IsPinned":false,
        "Acti on":{
            "Url":"[REDACTED]",
            "Text":"[REDACTED]"
        },
        "Type":"Twitter"
    }

}

Code we're using as a workaround:

var announcements = await beamableClient.Announcements.GetAll();
foreach(var announcement in announcements.Announcements)
{
    var symbol = announcement.Symbol.Replace("api-announcements.", "");
    await beamableClient.Announcements.Delete(symbol);
}

Is this behaviour expected?

Best
BB