Whats REST call for deleting concept reference term?

Hello everyone,

I am currently working on RA-1072 Ticket. My problem is that i need to add “Delete Forever” button when editing existing Reference Term (You can see it here), but REST Swagger Documentation doesn’t have any DELETE calls for /conceptreferenceterm.

Any ideas?

Tomek :slight_smile:

Have you tried doing a DELETE request with a purge=true parameter? Try that, and see if it works anyway, but is just not documented.

Otherwise you may have to add this feature to the REST web services module.

-Darius

··· On Wed, Mar 16, 2016 at 6:45 AM, Tomasz Marzeion wrote:

tmarzeion https://talk.openmrs.org/users/tmarzeion Tomasz Marzeion https://talk.openmrs.org/users/tmarzeion March 16

Hello everyone,

I am currently working on RA-1072 https://issues.openmrs.org/browse/RA-1072 Ticket. My problem is that i need to add “Delete Forever” button when editing existing Reference Term (You can see it here http://demo.openmrs.org/openmrs/admin/concepts/conceptReferenceTerms.htm), but REST Swagger Documentation doesn’t have any DELETE calls for /conceptreferenceterm.

Any ideas?

Tomek [image: :slight_smile:]

Visit Topic https://talk.openmrs.org/t/whats-rest-call-for-deleting-concept-reference-term/5345/1 or reply to this email to respond

To stop receiving notifications for this particular topic, click here https://talk.openmrs.org/t/whats-rest-call-for-deleting-concept-reference-term/5345/unsubscribe. To unsubscribe from these emails, change your user preferences https://talk.openmrs.org/my/preferences

or, click here <reply@talk.openmrs.org?subject=unsubscribe> to unsubscribe via email.

purge=true did the job, thanks!

@tmarzeion, are you using the latest build of the REST module from the repo? If so, you should see the DELETE operation documented for Concept Reference Terms (static docs available here).

Looking here and here it looks like DELETE without the purge parameter should correctly be retiring the resource.

Are you able to confirm that the resource is retired in the database after you do a DELETE without the purge parameter? If it is, then maybe the problem is that retired Concept Reference Terms are being displayed to the user?

1 Like

@pascal, Rafał said that we aren’t using the latest build of REST module, but documentation You sent is much better than Swagger Doc.

I’ve checked DELETE function without purge parameter, it retires the resource as intended.

We are going to think how “Show retired” function should work later i think :slight_smile:

Thanks for support! Tomek

Okay good, that means the docs and the resource implementation are both correct :).

p.s. The static docs are the same as the ones in the latest build of the REST module.