x-namespace to enable namespace isolation. When a client request reaches the server, the server will check this header:default is used.EUREKA-DEMO-PROVIDER in namespace ns1 with the instance port set to 18081.curl -X 'POST' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER' \\-H "Content-type: application/json" \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-d '{"instance": {"instanceId": "10.91.80.100:eureka-demo-provider:18081","hostName": "10.91.80.100","app": "EUREKA-DEMO-PROVIDER","ipAddr": "10.91.80.100","status": "UP","overriddenStatus": "UNKNOWN","port": {"$": 18081,"@enabled": "true"},"securePort": {"$": 443,"@enabled": "false"},"countryId": 1,"dataCenterInfo": {"@class": "com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo","name": "MyOwn"},"leaseInfo": {"renewalIntervalInSecs": 30,"durationInSecs": 90,"registrationTimestamp": 0,"lastRenewalTimestamp": 0,"evictionTimestamp": 0,"serviceUpTimestamp": 0},"metadata": {"management.port": "18081"},"homePageUrl": "http://10.91.80.100:18081/","statusPageUrl": "http://10.91.80.100:18081/actuator/info","healthCheckUrl": "http://10.91.80.100:18081/actuator/health","vipAddress": "EUREKA-DEMO-PROVIDER","secureVipAddress": "EUREKA-DEMO-PROVIDER","isCoordinatingDiscoveryServer": "false","lastUpdatedTimestamp": "1681266990026","lastDirtyTimestamp": "1681266990889"}}' \\-v
EUREKA-DEMO-PROVIDER in namespace ns2 with the instance port set to 18082.curl -X 'POST' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER' \\-H "Content-type: application/json" \\-H "Accept: application/json" \\-H "x-namespace: ns2" \\-d '{"instance": {"instanceId": "10.91.80.100:eureka-demo-provider:18082","hostName": "10.91.80.100","app": "EUREKA-DEMO-PROVIDER","ipAddr": "10.91.80.100","status": "UP","overriddenStatus": "UNKNOWN","port": {"$": 18082,"@enabled": "true"},"securePort": {"$": 443,"@enabled": "false"},"countryId": 1,"dataCenterInfo": {"@class": "com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo","name": "MyOwn"},"leaseInfo": {"renewalIntervalInSecs": 30,"durationInSecs": 90,"registrationTimestamp": 0,"lastRenewalTimestamp": 0,"evictionTimestamp": 0,"serviceUpTimestamp": 0},"metadata": {"management.port": "18082"},"homePageUrl": "http://10.91.80.100:18082/","statusPageUrl": "http://10.91.80.100:18082/actuator/info","healthCheckUrl": "http://10.91.80.100:18082/actuator/health","vipAddress": "EUREKA-DEMO-PROVIDER","secureVipAddress": "EUREKA-DEMO-PROVIDER","isCoordinatingDiscoveryServer": "false","lastUpdatedTimestamp": "1681266990026","lastDirtyTimestamp": "1681266990889"}}' \\-v
EUREKA-DEMO-PROVIDER in namespace ns1.curl -X 'GET' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER' \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-v## Return the instance on port 18081
EUREKA-DEMO-PROVIDER in namespace ns2.curl -X 'GET' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER' \\-H "Accept: application/json" \\-H "x-namespace: ns2" \\-v## Return the instance on port 18082
curl -X 'POST' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER' \\-H "Content-type: application/json" \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-d '{"instance": {"instanceId": "10.91.80.100:eureka-demo-provider:18081","hostName": "10.91.80.100","app": "EUREKA-DEMO-PROVIDER","ipAddr": "10.91.80.100","status": "UP","overriddenStatus": "UNKNOWN","port": {"$": 18081,"@enabled": "true"},"securePort": {"$": 443,"@enabled": "false"},"countryId": 1,"dataCenterInfo": {"@class": "com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo","name": "MyOwn"},"leaseInfo": {"renewalIntervalInSecs": 30,"durationInSecs": 90,"registrationTimestamp": 0,"lastRenewalTimestamp": 0,"evictionTimestamp": 0,"serviceUpTimestamp": 0},"metadata": {"management.port": "18081"},"homePageUrl": "http://10.91.80.100:18081/","statusPageUrl": "http://10.91.80.100:18081/actuator/info","healthCheckUrl": "http://10.91.80.100:18081/actuator/health","vipAddress": "EUREKA-DEMO-PROVIDER","secureVipAddress": "EUREKA-DEMO-PROVIDER","isCoordinatingDiscoveryServer": "false","lastUpdatedTimestamp": "1681266990026","lastDirtyTimestamp": "1681266990889"}}' \\-v
curl -X 'PUT' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER/10.91.80.100:eureka-demo-provider:18081' \\-H "x-namespace: ns1" \\-v
curl -X 'DELETE' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER/10.91.80.100:eureka-demo-provider:18081' \\-H "x-namespace: ns1" \\-v
curl -X 'GET' 'http://127.0.0.1:8761/eureka/apps' \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-v
curl -X 'GET' 'http://127.0.0.1:8761/eureka/apps/delta' \\-H "Accept: application/json" \\-v
curl -X 'GET' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER' \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-v
curl -X 'GET' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER/10.91.80.100:eureka-demo-provider:18081' \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-v
curl -X 'GET' 'http://127.0.0.1:8761/eureka/instance/10.91.80.100:eureka-demo-provider:18081' \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-v
curl -X 'GET' 'http://127.0.0.1:8761/eureka/vips/EUREKA-DEMO-PROVIDER' \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-v
curl -X 'GET' 'http://127.0.0.1:8761/eureka/svips/EUREKA-DEMO-PROVIDER' \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-v
curl -X 'PUT' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER/10.91.80.100:eureka-demo-provider:18081/status' \\-H "x-namespace: ns1" \\-v
curl -X 'DELETE' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER/10.91.80.100:eureka-demo-provider:18081/status' \\-H "x-namespace: ns1" \\-v
curl -X 'PUT' 'http://127.0.0.1:8761/eureka/apps/EUREKA-DEMO-PROVIDER/10.91.80.100:eureka-demo-provider:18081/metadata?k=v' \\-H "x-namespace: ns1" \\-v
curl -X 'POST' 'http://127.0.0.1:8761/eureka/peerreplication/batch' \\-H "Content-type: application/json" \\-H "Accept: application/json" \\-H "x-namespace: ns1" \\-d '{"replicationList":[{"appName": "EUREKA-DEMO-PROVIDER","id": "10.91.80.100:eureka-demo-provider:18081","lastDirtyTimestamp": 1681266990889,"overriddenStatus": "UNKNOWN","status": "UP","instanceInfo": {"instanceId": "10.91.80.100:eureka-demo-provider:18081","hostName": "10.91.80.100","app": "EUREKA-DEMO-PROVIDER","ipAddr": "10.91.80.100","status": "UP","overriddenStatus": "UNKNOWN","port": {"$": 18081,"@enabled": "true"},"securePort": {"$": 443,"@enabled": "false"},"countryId": 1,"dataCenterInfo": {"@class": "com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo","name": "MyOwn"},"leaseInfo": {"renewalIntervalInSecs": 30,"durationInSecs": 90,"registrationTimestamp": 0,"lastRenewalTimestamp": 0,"evictionTimestamp": 0,"serviceUpTimestamp": 0},"metadata": {"management.port": "18081"},"homePageUrl": "http://10.91.80.100:18081/","statusPageUrl": "http://10.91.80.100:18081/actuator/info","healthCheckUrl": "http://10.91.80.100:18081/actuator/health","vipAddress": "EUREKA-DEMO-PROVIDER","secureVipAddress": "EUREKA-DEMO-PROVIDER","isCoordinatingDiscoveryServer": "false","lastUpdatedTimestamp": "1681266990026","lastDirtyTimestamp": "1681266990889"},"action": "Register"}]}' \\-v
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback