We have been using Eureka with our Spring download applications for several months. We have activated the search for services between applications using the @DiscoveryClient annotations. Registration, renewal, and deregistration work as expected.
Recently, we came across a scenario in which we have a component of a non-Java application (written in C ++) that provides three REST service endpoints that many of our Spring Boot Java applications will use. We are trying to find out if the C ++ component can use the Eureka REST API to register when it appears, so Spring Boot Java applications can do a regular search through Eureka to contact the C ++ component.
Since I cannot use the Eureka client in C ++ components (obviously), I started testing the direct REST APIs (as described here ) using Postman. Registration worked without any problems sending the JSON payload using the POST method in http: // eurekaserver: 8761 / eureka / apps / FOO-APP (with instanceId = 1111 and hostName = foo-app). I can request http: // eurekaserver: 8761 / eureka / apps and can see that the FOO-APP is listed there as expected.
However, when I try to perform a cancel operation using the DELETE method, http: // eurekaserver: 8761 / eureka / apps / FOO-APP / 1111 or http: // eurekaserver: 8761 / eureka / apps / FOO-APP / foo-app I get a 404 error.
With instanceId:
{ "timestamp": 1447479397996, "status": 404, "error": "Not Found", "message": "Not Found", "path": "/eureka/apps/FOO-APP/1111" }
OR (same result for hostName):
{ "timestamp": 1447479397996, "status": 404, "error": "Not Found", "message": "Not Found", "path": "/eureka/apps/FOO-APP/foo-app" }
I tried different combinations, but I can not do this work. I have a feeling that I'm missing something obvious - maybe something small. Any help on this would be appreciated.
PS: The Eureka REST documentation for endpoints mentions "v2" in the URL. However, this does not work in my case. Registration (which works for me) does not use "v2" as described above. If someone can confirm this, it will also be useful. It seems that is not enough.