Natural Selection 2

Natural Selection 2

Not enough ratings
Remote Server Stats
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
37.549 KB
Feb 5, 2022 @ 9:55pm
Feb 5, 2022 @ 11:19pm
4 Change Notes ( view )

Subscribe to download
Remote Server Stats

Description
This mod makes it easy to submit server round data to any remote server of your choice.

Add a new RemoteStats.json config file, following this structure:

{ "url": "https://some-endpoint.com/api/endpoint", "authToken": "optional authentication token", }

At the end of each round, the same JSON data that is written to the NS2Plus/Stats/<roundtime>.json stats file, along with the authentication token set in the RemoteStats.json config file (if present), will be sent via HTTP POST request to the configured endpoint URL. The message is formatted according to regular HTTP URL encoding with a structure as follows:

authToken=auth_token_string&stats=urlEncodedJsonData...


Applications wanting to make use of this data will have to decode the message payload from URL-encoded form to JSON before making use of the data.