EchoTools / EchoRelay

A proof-of-concept reimplementation of Echo VR's web services and dedicated game servers
13 stars 13 forks source link

Add API endpoints for use by "Central API" #50

Closed NotBlue-Dev closed 11 months ago

NotBlue-Dev commented 11 months ago

This PR add 3 endpoints for central API server

centralApi/relay return relay config (without api key of course) centralApi/peerStats return peers stat like in the CLI centralApi/sessionsList return sessions data, doesn't return unassigned server/privates/account

2 new CLI options : --advertise "http://51.75.140.182:3000" Will do a post request on central server when it turns on/off --centralapikey "apikey" Required to do post request on central API server / for Central API to do get request on relay (avoid stranger requesting data directly from relay

I will provide the API Key as it's generated when I add a server to the API