Registration Service End Points with Examples Possible Results: 200 - it worked 403 - the user is not allowed to perform this operation, (might not be the owner or perhaps has not authenticated) { "error": { //ERROR details } } 500 - something really bad happened { "error": { //ERROR details } } /v1/service POST - to create new service (We may want an option to limit this to admins) { "service": { "url": "http://reg.service.com/v1/service/host" "virtualHost": "host" "owner": ["auth-scheme:auth-data",...], "scheme": "http", //optional "port": 5000, //optional "securitySchemes": ["RMToken", "SSLCert"], //optional for a non-secure service "serverTimeoutSecs": 300 } } /v1/service/{virtualHost} DELETE - remove the service PUT - place holder to update the service. May be implemented later GET - Read an existing service, depending on authentication there could be different things returned //If Owner { "service": { "virtualHost": "host" "owner": ["auth-scheme:auth-data",...], "scheme": "http", "port": 5000, "securitySchemes": ["RMToken", "SSLCert"], "securityData": { "SSLCert": { "public": "...", "private": "..." } }, "serverTimeoutSecs": 300 } } //If not Owner { "service": { "virtualHost": "host" "scheme": "http", "port": 5000, "securitySchemes": ["RMToken", "SSLCert"] "securityData": { "SSLCert": { "public": "..." } }, "serverTimeoutSecs": 300 } } /v1/service/{virtualHost}/servers GET - retrieve a list of servers { "servers": [ { "serverId": "1of2", "host": "a.b.com", "port": 5000, "hb": 4364623784 }, { "serverId": "2of2", "host": "b.b.com", "port": 5000, "hb": 4364623654 //When it last did a heartbeat } ] } /v1/service/{virtualHost}/servers/{serverId} GET - retrieve a single server { "server": { "serverId": "1of2", "host": "a.b.com", "port": 5000, "hb": 4364623784 } } PUT - add/update a single server instance { "server": { "host": "a.b.com", "port": 5000 } }