# Delete EHR not finding the EHR ID in EHRBase 2.0 **Category:** [Platform](https://discourse.openehr.org/c/platform-implem/7) **Created:** 2024-04-29 15:20 UTC **Views:** 272 **Replies:** 5 **URL:** https://discourse.openehr.org/t/delete-ehr-not-finding-the-ehr-id-in-ehrbase-2-0/5155 --- ## Post #1 by @yampeku I was trying a simple create EHR --> delete EHR workflow for testing purposes, using all default configuration in a fresh EHRBase 2.0 installation using the orders in the installation tutorial (so no security). I created an EHR with the following code based on the client example and then I tried to delete it with the admin API ![imagen|534x183](upload://mUKcDVPEy1cQ8uSDlf2N0UFkHv7.jpeg) However, the server returns a 404 for the delete operation The EHR exists (I can access it with *https://localhost:8080/ehrbase/rest/openehr/v1/ehr/fd4ba265-1a6e-43e3-a8d2-c02de1854785*) The delete code is creating the uri *http://localhost:8080/ehrbase/rest/admin/ehr/fd4ba265-1a6e-43e3-a8d2-c02de1854785* which also gives me 404 even executing it directly over REST Also tried with setModifiable as true just in case, same result Am I missing anything? --- ## Post #2 by @birger.haarbrandt @yampeku these admin endpoints are de-activated by default in the application.yml (https://github.com/ehrbase/ehrbase/blob/develop/configuration/src/main/resources/application.yml): ![Bildschirmfoto 2024-04-29 um 20.10.59|406x226](upload://pQ5L2h9bePoEZPbFzaUrNrnTRro.png) So it should work after making this adjustment --- ## Post #3 by @yampeku Oh, I completely misunderstood the "(de)activate" part of the documentation Thanks! --- ## Post #4 by @yampeku Is it possible to activate admin mode with a parameter when loading the docker image? Does admin mode have a prerequisite of having some kind of security other than "None"? --- ## Post #5 by @birger.haarbrandt You can overwrite the variables like the following: ``` docker run --network ehrbase-net --name ehrbase -e DB_URL=jdbc:postgresql://ehrbase-postgres:5432/ehrbase -e DB_USER=ehrbase_restricted -e DB_PASS=ehrbase_restricted -e DB_USER_ADMIN=ehrbase -e DB_PASS_ADMIN=ehrbase -e SERVER_NODENAME=local.ehrbase.org -e ADMINAPI_ACTIVE=true -e SPRING_PROFILES_ACTIVE=local -d -p 8080:8080 ehrbase/ehrbase ``` In this case, use the "ehrbase" password with basic auth. --- ## Post #6 by @yampeku Can confirm it works :smiley: --- **Canonical:** https://discourse.openehr.org/t/delete-ehr-not-finding-the-ehr-id-in-ehrbase-2-0/5155 **Original content:** https://discourse.openehr.org/t/delete-ehr-not-finding-the-ehr-id-in-ehrbase-2-0/5155