SEMP API to delete the messages from the queue?

Hi Team,

Is there any way or SEMP API available to delete the messages from a queue?

Thanks
Tejas

@tejaschowsalkar , Looking at the SEMPv2 Action API reference, there is no single API call to delete ALL messages.

You will have get the list of messages with GET first

and iterate over them to call delete

Also pl see this thread:

Thanks @nram,this helps

@tejaschowsalkar Can you accept the answer from @nram for the benefits of other people in the community? Thanks!

@hong -Yes,the answer from @nram is acceptable

Thanks, @tejaschowsalkar. I’ve accepted it as the best answer on your behalf.

Hi, this can be done simply with a SEMPv1 script. There is an example purge queue script here.

Check this post by @amackenzie ! Delete All Messages on a Queue/Topic Endpoint now available in Broker Manager and SEMPv2 — Solace Community