I'm getting "405 Method Not Allowed None" when I attempt to delete a filter via pulp REST api. To reproduce: curl -k -u admin:admin -X DELETE https://localhost/pulp/api/filters/:id/
*** Bug 761126 has been marked as a duplicate of this bug. ***
This is more of a documentation bug. Delete filter is a POST operation on api/filters/delete_filter.
Is there any reason, why it is like that? Because most other parts of the API support the DELETE http verb and this is also how common REST-APIs work. If there is not really a reason that it is a POST operation, I would prefer to have consistency amongst the different parts of the pulp REST-API and being in line with how common REST-APIs work.
The reason was ability to pass 'force' flag to remove associations with repositories if any, which by default it set to 'false'. However, we are thinking of removing that functionality and remove all associations by default when deleting a filter. If we decide to go that route, we will change it to more restful approach with DELETE. (In reply to comment #3) > Is there any reason, why it is like that? Because most other parts of the API > support the DELETE http verb and this is also how common REST-APIs work. > > If there is not really a reason that it is a POST operation, I would prefer to > have consistency amongst the different parts of the pulp REST-API and being in > line with how common REST-APIs work.
As per comment #4, I have updated api and cli to DELETE operation on /filters/id/ instead of POST on /filters/id/delete_filter/ with 'force' option. Please note that filter delete now removes repo associations without warning. api and cli docs are updated for this change as well. commit 3c90992c5b00c618d07428fd71abf00166dc2d3a Author: Sayli Karmarkar <skarmark> Date: Wed Dec 14 13:59:24 2011 -0800 745142 - changing delete filter api to more restful DELETE on /filters/filter_id and removing 'force' delete option
build: 0.255
verified [root@preethi ~]# rpm -q pulp pulp-0.0.255-1.fc15.noarch [root@preethi ~]# curl -k -u admin:admin -X GET https://localhost/pulp/api/filters/ [{"description": "blacklist", "_ns": "filters", "package_list": [], "_id": "blacklist", "type": "blacklist", "id": "blacklist"}][root@preethi ~]# [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# curl -k -u admin:admin -X DELETE https://localhost/pulp/api/filters/blacklist/ true[root@preethi ~]# [root@preethi ~]# [root@preethi ~]# curl -k -u admin:admin -X GET https://localhost/pulp/api/filters/ [][root@preethi ~]#
Pulp v1.0 is released Closed Current Release.
Pulp v1.0 is released.