I am using the Restful API and calling to delete items. It appears to be deleting the item, but for some reason the status code comes back as 204 - No Content. While technically this is true because it deleted it, shouldn't it be returning 200 - Success? Note I am using 3.1 Labs.
Delete call is as follows:
@DELETE @Consumes("text/plain") @Path("/delete/{id}") public String deleteContentItem(@PathParam("id") String id) throws Exception{ //DELETE /alfresco/service/api/path/{store_type}/{store_id}/{id}?includeChildren={includeChildren?} HttpClient client = buildClient("admin", "admin"); DeleteMethod method = new DeleteMethod("http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/'+ id); try { int statusCode = client.executeMethod(method);
return method.getResponseBodyAsString(); } catch (Exception e) { logger.error("exception while processing message", e); return "Exception while getting person"; } } I don't know if this a bug or what alfresco expects.