Running With Rifles Stats REST API
Documentation about the Running With Rifles Stats (RWRS) REST API. About RWRS
The RWRS REST API is provided “as is”, without warranty of any kind, express or implied.
You are required to mention somewhere in your project - in a visible manner - that you’re using the RWRS REST API. Not doing so may lead to a ban from using the API.
Getting a Personal Access Token
Although this API is public, a Personal Access Token is required to prevent abuses. To obtain a Personal Access Token:
-
Create an RWRS account by signing in using your Steam account
-
Get your Personal Access Token by heading to your settings page
Sending the Personal Access Token
All endpoints needs a valid Personal Access Token, otherwise a 403 HTTP status code will be returned. Send this HTTP header in all of your HTTP requests along your Personal Access Token:
Authorization: Token {Your Personal Access Token}
Base URL
The RWRS REST API base URL is https://rwrstats.com/api
.
Using HTTPS is mandatory or you’ll encounter redirections (which may not be appreciated by your HTTP client).
Rate limiting
To prevent abuse, all resources are rate-limited. Each IP address + Personal Access Token couple is limited to 1 request per second. Failing to respect this rate-limiting window will lead to a 429 HTTP status code.
Ban
I reserve myself the right to ban from using the API anyone who might use it in an abusive fashion. In such cases, all requests will return a 423 HTTP status code.
Cache
Some resources are subject to server-side caching (i.e you’ll not necessarily get the most up-to-date data from the server). Check their respective documentation for more information.
HTTP status codes
The HTTP response status code must be used to check if the sent request was successfully handled or not:
-
2xx
Everything is OK. The response body will contain whatever the resource provide (check its doc) -
4xx
Something is wrong on the client side (e.g an input parameter validation error) -
5xx
There were a server error
The RWRS REST API doesn’t provide internal error codes, but tries to make a meaningful use of HTTP status codes instead.
Input & output data format
Everything is JSON along a Content-Type
HTTP header of application/json
.
Success (2xx)
The output can be different regarding the resource. Check their respective doc.
Client error (4xx)
Typically an input parameters validation error:
{
"message": {
"blow": "Missing required parameter in the JSON body",
"hey": "Missing required parameter in the JSON body"
}
}
In this case the hey
and blow
input parameters are missing.
If a query string parameter is missing or invalid, it’s the same output:
{
"message": {
"active": "Missing required parameter in the query string"
}
}
May also happen in other cases, e.g when the requested resource wasn’t found:
{
"message": "This thing does not exists."
}
Server error (5xx)
They should not happen (exception for 503). If so, please get in touch.
Example:
{
"message": "Error creating this thing: IndexError: out of bounds"
}
Servers ¶
A Server represent a public multiplayer Running With Rifles game.
Servers ¶
Get the list of ServersGET/servers{?location,map,type,mode,dedicated,official,not_empty,not_full,limit}
Return the list of Servers. The list may be optionally filtered by several criteria. These last are taken into account only if it they are present in the query string.
Server-side caching
This resource has a cache lifetime of 1 minute.
Example URI
- location
string
(optional) Default: any Example: continent:euServers country or continent of residence. This criterion format is either:
-
A concatenation of a location type and a location code, separated by a colon, OR
-
A single country code, OR
-
A list of any of the two above, separated by a
+
, OR -
any
Available location types are:
-
continent
-
country
Available continent codes:
-
af
- Africa -
na
- North America -
oc
- Oceania -
an
- Antarctica (who knows!) -
as
- Asia -
eu
- Europe -
sa
- South America
Country code must conform to ISO 3166-1 alpha-2.
Examples:
-
A continent:
continent:eu
-
A country:
country:fr
-
A country:
de
-
Two continents:
continent:eu+continent:na
-
Two countries:
country:fr+country:de
-
Two countries:
jp+country:cn
-
A country and a continent:
fr+continent:na
-
A country and a continent:
country:fr+continent:na
Don’t forget to URL-encode values given to this criterion!
Possible values and examples are shown unencoded for clarity purpose, but you must URL-encode these so it’s properly parsed by the server, e.g the last example would be
country%3Afr%2Bcountry%3Ade
.-
- map
string
(optional) Default: any Example: map10Servers map ID.
See this file, part of the RWRS source code, for a complete list of allowed map IDs.
- type
string
(optional) Default: any Example: vanillaServers type (used mod or DLC). This criterion format is either:
-
A single type, OR
-
A list of types, separated by a
+
, OR -
any
Examples:
-
Single type:
pacific
-
Two types:
pacific+edelweiss
Don’t forget to URL-encode values given to this criterion!
Possible values and examples are shown unencoded for clarity purpose, but you must URL-encode these so it’s properly parsed by the server, e.g the last example would be
pacific%2Bedelweiss
.Choices:
any
vanilla
vanilla.winter
vanilla.desert
pvp
pacific
edelweiss
man_vs_world_mp
man_vs_zombies_mp
Running_with_the_Dead
ww2_undead
overlord_defense
lab_defense
lab_def_koth
viper
casus_belli_05
Running_in_the_Bug_War
soldiers_at_war_heavy
SUPERHOT
superhotrailroad
snd
running_from_exterminatus
-
- mode
string
(optional) Default: any Example: COOPServers mode (game mode).
Choices:
any
COOP
DOM
PvP
PvE
PvPvE
- dedicated
string, number
(optional) Example: trueWhether to filter dedicated servers only.
true
or1
to enable this filter.false
or0
will be ignored and thus disable this filter.Choices:
true
1
false
0
- official
string, number
(optional) Example: trueWhether to filter official servers only.
true
or1
to enable this filter.false
or0
will be ignored and thus disable this filter.Choices:
true
1
false
0
- not_empty
string, number
(optional) Example: trueWhether to filter non-empty servers only.
true
or1
to enable this filter.false
or0
will be ignored and thus disable this filter.Choices:
true
1
false
0
- not_full
string, number
(optional) Example: trueWhether to filter non-full servers only.
true
or1
to enable this filter.false
or0
will be ignored and thus disable this filter.Choices:
true
1
false
0
- limit
number
(optional) Example: 10Return the n first servers of the filtered list.
Headers
Authorization: Token {Your Personal Access Token}
200
An empty list is returned if no Servers were found.
Headers
Content-Type: application/json
Body
[
{
"name": "InvasionEU2",
"ip": "31.186.250.67",
"port": 1235,
"is_ranked": true,
"is_official": true,
"website_url": "https://runningwithrifles.com/",
"url": "https://rwrstats.com/servers/31.186.250.67:1235/invasioneu2",
"type": {
"id": "vanilla",
"name": "Vanilla"
},
"mode": {
"id": "COOP",
"name": "Coop."
},
"database": {
"id": "invasion",
"name": "Invasion"
},
"map": {
"id": "map10",
"name": "Railroad Gap"
},
"players": {
"current": 20,
"max": 24,
"free": 4
},
"location": {
"name": "Frankfurt am Main, Germany",
"country_code": "de",
"flag_image_url": "https://rwrstats.com/static/images/flags/DE.png"
},
"steam_join_url": "steam://rungameid/270150//server_address=178.32.58.160 server_port=1240",
"event": {
"name": "PvP event!",
"is_ongoing": true,
"starts_at": "2019-04-16T16:00:00+02:00"
},
"has_friends": true
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Server name"
},
"ip": {
"type": "string",
"description": "Server IP address"
},
"port": {
"type": "number",
"description": "Server port"
},
"is_ranked": {
"type": "boolean",
"description": "Whether this server is a ranked one (official Invasion and WW2 DLCs servers only)"
},
"is_official": {
"type": "boolean",
"description": "Whether this server is an official one (official Invasion, WW2 DLCs or Dominance servers)"
},
"website_url": {
"type": [
"string",
"null"
],
"description": "Server website URL. `null` if none",
"default": "null"
},
"url": {
"type": "string",
"description": "RWRS server page URL"
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server type ID (used mod or DLC)"
},
"name": {
"type": "string",
"description": "Server type name (used mod or DLC)"
}
},
"required": [
"id",
"name"
],
"description": "Server type"
},
"mode": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "Server mode ID (game mode)"
},
"name": {
"type": "string",
"description": "Server mode name (game mode)"
}
},
"required": [
"id",
"name"
],
"description": "Server mode. `null` if unknown"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Server used database. `null` if not an official Invasion or WW2 DLCs server"
},
"map": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Map ID. **Not unique**: must be used in conjonction of the mode ID"
},
"name": {
"type": "string",
"description": "Map name. If unknown, `id` will be used"
}
},
"required": [
"id",
"name"
],
"description": "Server map"
},
"players": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Number of current players"
},
"max": {
"type": "number",
"description": "Maximum allowed number of players"
},
"free": {
"type": "number",
"description": "Number of free player slots"
}
},
"required": [
"current",
"max",
"free"
],
"description": "Server players"
},
"location": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "City name (if available) + country name of the server location"
},
"country_code": {
"type": "string",
"description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the server location"
},
"flag_image_url": {
"type": "string",
"description": "Image URL of the server country location. 24x24 pixels"
}
},
"required": [
"name",
"country_code",
"flag_image_url"
],
"description": "Server location. `null` if unknown"
},
"steam_join_url": {
"type": "string",
"description": "[Steam browser protocol](https://developer.valvesoftware.com/wiki/Steam_browser_protocol) URL to be used to load Running With Rifles onto the given server lobby screen"
},
"event": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Event name"
},
"is_ongoing": {
"type": "boolean",
"description": "Whether this event is ongoing or not"
},
"starts_at": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when this event will start"
}
},
"required": [
"name",
"is_ongoing",
"starts_at"
],
"description": "Event linked to this Server. `null` if none"
},
"has_friends": {
"type": "boolean",
"description": "Whether there's friends from the current user playing on this server"
}
},
"required": [
"name",
"ip",
"port",
"is_ranked",
"is_official",
"url",
"type",
"map",
"players",
"steam_join_url",
"has_friends"
]
}
}
400
One or more arguments are (is) invalid. Check the error message(s) for more information.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Server ¶
Get a specific ServerGET/servers/{ip}:{port}
Return the Server corresponding to the given IP address / port couple. This resource returns more information comparing
to the GET /servers
resource (e.g the player list).
Server-side caching
This resource has a cache lifetime of 1 minute.
Example URI
- ip
string
(required) Example: 31.186.250.67The Server IP
- port
integer
(required) Example: 1235The Server port
Headers
Authorization: Token {Your Personal Access Token}
200
Headers
Content-Type: application/json
Body
{
"name": "InvasionEU2",
"ip": "31.186.250.67",
"port": 1235,
"is_ranked": true,
"is_official": true,
"website_url": "https://runningwithrifles.com/",
"url": "https://rwrstats.com/servers/31.186.250.67:1235/invasioneu2",
"type": {
"id": "vanilla",
"name": "Vanilla"
},
"mode": {
"id": "COOP",
"name": "Coop.",
"name_long": "Cooperation"
},
"database": {
"id": "invasion",
"name": "Invasion"
},
"map": {
"id": "map10",
"name": "Railroad Gap",
"preview_image_url": "https://rwrstats.com/static/images/maps/preview/vanilla/map10.png",
"minimap_image_url": "https://rwrstats.com/static/images/maps/minimap/vanilla/map10.png"
},
"players": {
"current": 20,
"max": 24,
"free": 4,
"list": [
{
"username": "EPOCDOTFR",
"url": "https://rwrstats.com/players/invasion/EPOCDOTFR",
"is_rwrs_creator": true,
"is_contributor": false,
"is_rwr_dev": false,
"is_official_servers_mod": false,
"database": {
"id": "invasion",
"name": "Invasion"
},
"is_friend": true
}
]
},
"location": {
"name": "Frankfurt am Main, Germany",
"country_code": "de",
"flag_image_url": "https://rwrstats.com/static/images/flags/DE.png"
},
"steam_join_url": "steam://rungameid/270150//server_address=178.32.58.160 server_port=1240",
"event": {
"name": "PvP event!",
"is_ongoing": true,
"starts_at": "2019-04-16T16:00:00+02:00"
},
"version": "1.70.2",
"is_dedicated": true,
"comment": "Coop campaign",
"bots": 104,
"banner_image_url": "https://rwrstats.com/static/images/servers/106.14.208.129-1234.png"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Server name"
},
"ip": {
"type": "string",
"description": "Server IP address"
},
"port": {
"type": "number",
"description": "Server port"
},
"is_ranked": {
"type": "boolean",
"description": "Whether this server is a ranked one (official Invasion and WW2 DLCs servers only)"
},
"is_official": {
"type": "boolean",
"description": "Whether this server is an official one (official Invasion, WW2 DLCs or Dominance servers)"
},
"website_url": {
"type": [
"string",
"null"
],
"description": "Server website URL. `null` if none",
"default": "null"
},
"url": {
"type": "string",
"description": "RWRS server page URL"
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server type ID (used mod or DLC)"
},
"name": {
"type": "string",
"description": "Server type name (used mod or DLC)"
}
},
"required": [
"id",
"name"
],
"description": "Server type"
},
"mode": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "Server mode ID (game mode)"
},
"name": {
"type": "string",
"description": "Server mode name (game mode)"
},
"name_long": {
"type": [
"string",
"null"
],
"description": "Long server mode name (game mode). `null` if unknown",
"default": "null"
}
},
"required": [
"id",
"name"
],
"description": "Server mode. `null` if unknown"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Server used database. `null` if not an official Invasion or WW2 DLCs server"
},
"map": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Map ID. **Not unique**: must be used in conjonction of the mode ID"
},
"name": {
"type": "string",
"description": "Map name. If unknown, `id` will be used"
},
"preview_image_url": {
"type": [
"string",
"null"
],
"description": "Map preview image URL (ingame screenshot). `null` if none available. Size may vary",
"default": "null"
},
"minimap_image_url": {
"type": [
"string",
"null"
],
"description": "Mapview image URL. `null` if none available. 2048x2048 pixels",
"default": "null"
}
},
"required": [
"id",
"name"
],
"description": "Server map"
},
"players": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Number of current players"
},
"max": {
"type": "number",
"description": "Maximum allowed number of players"
},
"free": {
"type": "number",
"description": "Number of free player slots"
},
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "Player username"
},
"url": {
"type": [
"string",
"null"
],
"description": "RWRS player profile page URL. `null` if the player isn't an official Invasion or WW2 DLCs profile",
"default": "null"
},
"is_rwrs_creator": {
"type": "boolean",
"description": "Whether this player is the creator of RWRS"
},
"is_contributor": {
"type": "boolean",
"description": "Whether this player contributed in a way or another to RWRS"
},
"is_rwr_dev": {
"type": "boolean",
"description": "Whether this player is one of the RWR developers"
},
"is_official_servers_mod": {
"type": "boolean",
"description": "Whether this player is moderator on official servers"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Player database. `null` if not an official Invasion or WW2 DLCs player profile"
},
"is_friend": {
"type": "boolean",
"description": "Whether this player is friend with the current user"
}
},
"required": [
"username",
"is_rwrs_creator",
"is_contributor",
"is_rwr_dev",
"is_official_servers_mod",
"is_friend"
]
},
"description": "List of current players"
}
},
"required": [
"current",
"max",
"free",
"list"
],
"description": "Server players"
},
"location": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "City name (if available) + country name of the server location"
},
"country_code": {
"type": "string",
"description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the server location"
},
"flag_image_url": {
"type": "string",
"description": "Image URL of the server country location. 24x24 pixels"
}
},
"required": [
"name",
"country_code",
"flag_image_url"
],
"description": "Server location. `null` if unknown"
},
"steam_join_url": {
"type": "string",
"description": "[Steam browser protocol](https://developer.valvesoftware.com/wiki/Steam_browser_protocol) URL to be used to load Running With Rifles onto the given server lobby screen"
},
"event": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Event name"
},
"is_ongoing": {
"type": "boolean",
"description": "Whether this event is ongoing or not"
},
"starts_at": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when this event will start"
}
},
"required": [
"name",
"is_ongoing",
"starts_at"
],
"description": "Event linked to this Server. `null` if none"
},
"version": {
"type": "string",
"description": "Server game version"
},
"is_dedicated": {
"type": "boolean",
"description": "Whether this server is a dedicated one"
},
"comment": {
"type": [
"string",
"null"
],
"description": "Server comment. `null` if none",
"default": "null"
},
"bots": {
"type": "number",
"description": "Number of current bots"
},
"banner_image_url": {
"type": [
"string",
"null"
],
"description": "Server banner image URL. Only available for dedicated servers. 485x95 pixels",
"default": "null"
}
},
"required": [
"name",
"ip",
"port",
"is_ranked",
"is_official",
"website_url",
"url",
"type",
"mode",
"database",
"map",
"players",
"location",
"steam_join_url",
"event",
"version",
"is_dedicated",
"comment",
"bots",
"banner_image_url"
],
"additionalProperties": false
}
400
One or more arguments are (is) invalid. Check the error message(s) for more information.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
404
The Server wasn’t found.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Players ¶
A Player represent an online multiplayer Running With Rifles account on official Invasion or WW2 DLCs servers.
Important note
Players stats are updated daily and only concerns official Invasion and WW2 DLCs servers.
Also, stats history is only recorded for the 5000 most experienced players.
Players ¶
Get a list of PlayersGET/players/{database}{?start,sort,target,limit}
Return a list of Players (leaderboard). The list may be optionally filtered or sorted.
Server-side caching
This resource has a cache lifetime of 1 hour.
Example URI
- database
string
(required) Example: invasionThe players database.
Choices:
invasion
pacific
- start
integer
(optional) Default: 0 Example: 15Pagination start offset.
Minimum value:
0
- sort
string
(optional) Default: score Example: rank_progressionThe stat value (or column) on which the player list should be sorted.
Choices:
username
kills
deaths
score
kd
time_played
longest_kill_streak
targets_destroyed
vehicles_destroyed
soldiers_healed
teamkills
distance_moved
shots_fired
throwables_thrown
rank_progression
- target
string
(optional) Example: EPOCDOTFRA player username that should be highlighted.
- limit
integer
(optional) Default: 15 Example: 25Number of players to return.
Minimum value:
1
Maximum value:
100
Headers
Authorization: Token {Your Personal Access Token}
200
Headers
Content-Type: application/json
Body
[
{
"username": "EPOCDOTFR",
"url": "https://rwrstats.com/players/invasion/EPOCDOTFR",
"is_rwrs_creator": true,
"is_contributor": false,
"is_rwr_dev": false,
"is_official_servers_mod": false,
"database": {
"id": "invasion",
"name": "Invasion"
},
"is_friend": true,
"current_server": {
"name": "InvasionEU2",
"ip": "31.186.250.67",
"port": 1235,
"is_ranked": true,
"is_official": true,
"website_url": "https://runningwithrifles.com/",
"url": "https://rwrstats.com/servers/31.186.250.67:1235/invasioneu2",
"type": {
"id": "vanilla",
"name": "Vanilla"
},
"mode": {
"id": "COOP",
"name": "Coop."
},
"database": {
"id": "invasion",
"name": "Invasion"
},
"map": {
"id": "map10",
"name": "Railroad Gap"
},
"players": {
"current": 20,
"max": 24,
"free": 4
},
"location": {
"name": "Frankfurt am Main, Germany",
"country_code": "de",
"flag_image_url": "https://rwrstats.com/static/images/flags/DE.png"
},
"steam_join_url": "steam://rungameid/270150//server_address=178.32.58.160 server_port=1240",
"event": {
"name": "PvP event!",
"is_ongoing": true,
"starts_at": "2019-04-16T16:00:00+02:00"
}
},
"stats": {
"kills": 38689,
"deaths": 3695,
"score": 34994,
"kd_ratio": 10.47,
"time_played": 640200,
"longest_kill_streak": 301,
"targets_destroyed": 633,
"vehicles_destroyed": 638,
"soldiers_healed": 31,
"teamkills": 785,
"distance_moved": 790.4,
"shots_fired": 417868,
"throwables_thrown": 3057,
"xp": 219921
},
"current_rank": {
"id": 14,
"name": "Lieutenant General",
"required_xp": 200000,
"image_url": "https://rwrstats.com/static/images/ranks/us/14.png",
"icon_url": "https://rwrstats.com/static/images/ranks/us/14_icon.png"
},
"position": 42
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "Player username"
},
"url": {
"type": [
"string",
"null"
],
"description": "RWRS player profile page URL. `null` if the player isn't an official Invasion or WW2 DLCs profile",
"default": "null"
},
"is_rwrs_creator": {
"type": "boolean",
"description": "Whether this player is the creator of RWRS"
},
"is_contributor": {
"type": "boolean",
"description": "Whether this player contributed in a way or another to RWRS"
},
"is_rwr_dev": {
"type": "boolean",
"description": "Whether this player is one of the RWR developers"
},
"is_official_servers_mod": {
"type": "boolean",
"description": "Whether this player is moderator on official servers"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Player database. `null` if not an official Invasion or WW2 DLCs player profile"
},
"is_friend": {
"type": "boolean",
"description": "Whether this player is friend with the current user"
},
"current_server": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Server name"
},
"ip": {
"type": "string",
"description": "Server IP address"
},
"port": {
"type": "number",
"description": "Server port"
},
"is_ranked": {
"type": "boolean",
"description": "Whether this server is a ranked one (official Invasion and WW2 DLCs servers only)"
},
"is_official": {
"type": "boolean",
"description": "Whether this server is an official one (official Invasion, WW2 DLCs or Dominance servers)"
},
"website_url": {
"type": [
"string",
"null"
],
"description": "Server website URL. `null` if none",
"default": "null"
},
"url": {
"type": "string",
"description": "RWRS server page URL"
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server type ID (used mod or DLC)"
},
"name": {
"type": "string",
"description": "Server type name (used mod or DLC)"
}
},
"required": [
"id",
"name"
],
"description": "Server type"
},
"mode": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "Server mode ID (game mode)"
},
"name": {
"type": "string",
"description": "Server mode name (game mode)"
}
},
"required": [
"id",
"name"
],
"description": "Server mode. `null` if unknown"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Server used database. `null` if not an official Invasion or WW2 DLCs server"
},
"map": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Map ID. **Not unique**: must be used in conjonction of the mode ID"
},
"name": {
"type": "string",
"description": "Map name. If unknown, `id` will be used"
}
},
"required": [
"id",
"name"
],
"description": "Server map"
},
"players": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Number of current players"
},
"max": {
"type": "number",
"description": "Maximum allowed number of players"
},
"free": {
"type": "number",
"description": "Number of free player slots"
}
},
"required": [
"current",
"max",
"free"
],
"description": "Server players"
},
"location": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "City name (if available) + country name of the server location"
},
"country_code": {
"type": "string",
"description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the server location"
},
"flag_image_url": {
"type": "string",
"description": "Image URL of the server country location. 24x24 pixels"
}
},
"required": [
"name",
"country_code",
"flag_image_url"
],
"description": "Server location. `null` if unknown"
},
"steam_join_url": {
"type": "string",
"description": "[Steam browser protocol](https://developer.valvesoftware.com/wiki/Steam_browser_protocol) URL to be used to load Running With Rifles onto the given server lobby screen"
},
"event": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Event name"
},
"is_ongoing": {
"type": "boolean",
"description": "Whether this event is ongoing or not"
},
"starts_at": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when this event will start"
}
},
"required": [
"name",
"is_ongoing",
"starts_at"
],
"description": "Event linked to this Server. `null` if none"
}
},
"required": [
"name",
"ip",
"port",
"is_ranked",
"is_official",
"url",
"type",
"map",
"players",
"steam_join_url"
],
"description": "Server on which the player is currently playing"
},
"stats": {
"type": "object",
"properties": {
"kills": {
"type": "number",
"description": "Number of soldiers killed"
},
"deaths": {
"type": "number",
"description": "Number of times being killed"
},
"score": {
"type": "number",
"description": "Score as shown in-game (kills minus deaths)"
},
"kd_ratio": {
"type": "number",
"description": "Kills / deaths ratio. The higher above 1.0, the better"
},
"time_played": {
"type": "number",
"description": "Number of seconds played online"
},
"longest_kill_streak": {
"type": "number",
"description": "Maximum number of consecutive kills without a single death"
},
"targets_destroyed": {
"type": "number",
"description": "Number of structures destroyed (radars, prisons, etc)"
},
"vehicles_destroyed": {
"type": "number",
"description": "Number of vehicles destroyed"
},
"soldiers_healed": {
"type": "number",
"description": "Number of soldiers healed"
},
"teamkills": {
"type": "number",
"description": "Number of friendly soldiers killed"
},
"distance_moved": {
"type": "number",
"description": "Number of kilometers traveled (includes vehicles use)"
},
"shots_fired": {
"type": "number",
"description": "Number of bullets fired (includes static weapons, tank turrets, etc)"
},
"throwables_thrown": {
"type": "number",
"description": "Number of grenades, C4s, etc thrown"
},
"xp": {
"type": "number",
"description": "Current number of experience points"
}
},
"required": [
"kills",
"deaths",
"score",
"kd_ratio",
"time_played",
"longest_kill_streak",
"targets_destroyed",
"vehicles_destroyed",
"soldiers_healed",
"teamkills",
"distance_moved",
"shots_fired",
"throwables_thrown",
"xp"
],
"description": "Player statistics"
},
"current_rank": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Rank ID"
},
"name": {
"type": "string",
"description": "Rank name",
"default": "null"
},
"required_xp": {
"type": "number",
"description": "Number of experience points this rank requires to be promoted to"
},
"image_url": {
"type": "string",
"description": "Rank image URL. 64x64 pixels"
},
"icon_url": {
"type": "string",
"description": "Small rank image URL. 20x20 pixels"
}
},
"required": [
"id",
"name",
"required_xp",
"image_url",
"icon_url"
],
"description": "Player current rank"
},
"position": {
"type": "number",
"description": "Position on the leaderboard"
}
},
"required": [
"username",
"is_rwrs_creator",
"is_contributor",
"is_rwr_dev",
"is_official_servers_mod",
"is_friend",
"stats",
"current_rank",
"position"
]
}
}
400
One or more arguments are (is) invalid. Check the error message(s) for more information.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
404
Only if the target
parameter was provided: the given player username doesn’t exist.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Player ¶
Get a specific PlayerGET/players/{database}/{username}{?date}
Return the Player corresponding to the given database / player username couple.
Server-side caching
This resource has a cache lifetime of 1 hour.
Example URI
- database
string
(required) Example: invasionThe player database.
Choices:
invasion
pacific
- username
string
(required) Example: EPOCDOTFRThe player username.
- date
string
(optional) Example: 2018-11-30ISO 8601 date for which to retrieve the stats for.
Note the player must be part of the 5000 most experienced players for its stats history to be recorded.
Headers
Authorization: Token {Your Personal Access Token}
200
Headers
Content-Type: application/json
Body
{
"username": "EPOCDOTFR",
"url": "https://rwrstats.com/players/invasion/EPOCDOTFR",
"is_rwrs_creator": true,
"is_contributor": false,
"is_rwr_dev": false,
"is_official_servers_mod": false,
"database": {
"id": "invasion",
"name": "Invasion"
},
"is_friend": true,
"current_server": {
"name": "InvasionEU2",
"ip": "31.186.250.67",
"port": 1235,
"is_ranked": true,
"is_official": true,
"website_url": "https://runningwithrifles.com/",
"url": "https://rwrstats.com/servers/31.186.250.67:1235/invasioneu2",
"type": {
"id": "vanilla",
"name": "Vanilla"
},
"mode": {
"id": "COOP",
"name": "Coop."
},
"database": {
"id": "invasion",
"name": "Invasion"
},
"map": {
"id": "map10",
"name": "Railroad Gap"
},
"players": {
"current": 20,
"max": 24,
"free": 4
},
"location": {
"name": "Frankfurt am Main, Germany",
"country_code": "de",
"flag_image_url": "https://rwrstats.com/static/images/flags/DE.png"
},
"steam_join_url": "steam://rungameid/270150//server_address=178.32.58.160 server_port=1240",
"event": {
"name": "PvP event!",
"is_ongoing": true,
"starts_at": "2019-04-16T16:00:00+02:00"
}
},
"stats": {
"kills": 38689,
"deaths": 3695,
"score": 34994,
"kd_ratio": 10.47,
"time_played": 640200,
"longest_kill_streak": 301,
"targets_destroyed": 633,
"vehicles_destroyed": 638,
"soldiers_healed": 31,
"teamkills": 785,
"distance_moved": 790.4,
"shots_fired": 417868,
"throwables_thrown": 3057,
"xp": 219921
},
"current_rank": {
"id": 14,
"name": "Lieutenant General",
"required_xp": 200000,
"image_url": "https://rwrstats.com/static/images/ranks/us/14.png",
"icon_url": "https://rwrstats.com/static/images/ranks/us/14_icon.png"
},
"next_rank": {
"id": 14,
"name": "Lieutenant General",
"required_xp": 200000,
"image_url": "https://rwrstats.com/static/images/ranks/us/14.png",
"icon_url": "https://rwrstats.com/static/images/ranks/us/14_icon.png"
},
"xp_to_next_rank": 280079,
"xp_percent_completion_to_next_rank": 43.98,
"date": "2018-11-30",
"signature_image_url": "https://rwrstats.com/static/images/players/EPOCDOTFR-invasion.png",
"promoted_to_rank": {
"id": 14,
"name": "Lieutenant General",
"required_xp": 200000,
"image_url": "https://rwrstats.com/static/images/ranks/us/14.png",
"icon_url": "https://rwrstats.com/static/images/ranks/us/14_icon.png"
},
"owner": {
"id": 56,
"username": "Epoc",
"url": "https://rwrstats.com/users/56/epoc",
"steam_id": 76561198051750940,
"steam_profile_url": "https://steamcommunity.com/profiles/76561198051750940",
"small_avatar_url": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/18/18a19ee73965fb3b92f39db8a307df80f5624122.jpg",
"large_avatar_url": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/18/18a19ee73965fb3b92f39db8a307df80f5624122_full.jpg"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "Player username"
},
"url": {
"type": [
"string",
"null"
],
"description": "RWRS player profile page URL. `null` if the player isn't an official Invasion or WW2 DLCs profile",
"default": "null"
},
"is_rwrs_creator": {
"type": "boolean",
"description": "Whether this player is the creator of RWRS"
},
"is_contributor": {
"type": "boolean",
"description": "Whether this player contributed in a way or another to RWRS"
},
"is_rwr_dev": {
"type": "boolean",
"description": "Whether this player is one of the RWR developers"
},
"is_official_servers_mod": {
"type": "boolean",
"description": "Whether this player is moderator on official servers"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Player database. `null` if not an official Invasion or WW2 DLCs player profile"
},
"is_friend": {
"type": "boolean",
"description": "Whether this player is friend with the current user"
},
"current_server": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Server name"
},
"ip": {
"type": "string",
"description": "Server IP address"
},
"port": {
"type": "number",
"description": "Server port"
},
"is_ranked": {
"type": "boolean",
"description": "Whether this server is a ranked one (official Invasion and WW2 DLCs servers only)"
},
"is_official": {
"type": "boolean",
"description": "Whether this server is an official one (official Invasion, WW2 DLCs or Dominance servers)"
},
"website_url": {
"type": [
"string",
"null"
],
"description": "Server website URL. `null` if none",
"default": "null"
},
"url": {
"type": "string",
"description": "RWRS server page URL"
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server type ID (used mod or DLC)"
},
"name": {
"type": "string",
"description": "Server type name (used mod or DLC)"
}
},
"required": [
"id",
"name"
],
"description": "Server type"
},
"mode": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "Server mode ID (game mode)"
},
"name": {
"type": "string",
"description": "Server mode name (game mode)"
}
},
"required": [
"id",
"name"
],
"description": "Server mode. `null` if unknown"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Server used database. `null` if not an official Invasion or WW2 DLCs server"
},
"map": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Map ID. **Not unique**: must be used in conjonction of the mode ID"
},
"name": {
"type": "string",
"description": "Map name. If unknown, `id` will be used"
}
},
"required": [
"id",
"name"
],
"description": "Server map"
},
"players": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Number of current players"
},
"max": {
"type": "number",
"description": "Maximum allowed number of players"
},
"free": {
"type": "number",
"description": "Number of free player slots"
}
},
"required": [
"current",
"max",
"free"
],
"description": "Server players"
},
"location": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "City name (if available) + country name of the server location"
},
"country_code": {
"type": "string",
"description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the server location"
},
"flag_image_url": {
"type": "string",
"description": "Image URL of the server country location. 24x24 pixels"
}
},
"required": [
"name",
"country_code",
"flag_image_url"
],
"description": "Server location. `null` if unknown"
},
"steam_join_url": {
"type": "string",
"description": "[Steam browser protocol](https://developer.valvesoftware.com/wiki/Steam_browser_protocol) URL to be used to load Running With Rifles onto the given server lobby screen"
},
"event": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Event name"
},
"is_ongoing": {
"type": "boolean",
"description": "Whether this event is ongoing or not"
},
"starts_at": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when this event will start"
}
},
"required": [
"name",
"is_ongoing",
"starts_at"
],
"description": "Event linked to this Server. `null` if none"
}
},
"required": [
"name",
"ip",
"port",
"is_ranked",
"is_official",
"url",
"type",
"map",
"players",
"steam_join_url"
],
"description": "Server on which the player is currently playing"
},
"stats": {
"type": "object",
"properties": {
"kills": {
"type": "number",
"description": "Number of soldiers killed"
},
"deaths": {
"type": "number",
"description": "Number of times being killed"
},
"score": {
"type": "number",
"description": "Score as shown in-game (kills minus deaths)"
},
"kd_ratio": {
"type": "number",
"description": "Kills / deaths ratio. The higher above 1.0, the better"
},
"time_played": {
"type": "number",
"description": "Number of seconds played online"
},
"longest_kill_streak": {
"type": "number",
"description": "Maximum number of consecutive kills without a single death"
},
"targets_destroyed": {
"type": "number",
"description": "Number of structures destroyed (radars, prisons, etc)"
},
"vehicles_destroyed": {
"type": "number",
"description": "Number of vehicles destroyed"
},
"soldiers_healed": {
"type": "number",
"description": "Number of soldiers healed"
},
"teamkills": {
"type": "number",
"description": "Number of friendly soldiers killed"
},
"distance_moved": {
"type": "number",
"description": "Number of kilometers traveled (includes vehicles use)"
},
"shots_fired": {
"type": "number",
"description": "Number of bullets fired (includes static weapons, tank turrets, etc)"
},
"throwables_thrown": {
"type": "number",
"description": "Number of grenades, C4s, etc thrown"
},
"xp": {
"type": "number",
"description": "Current number of experience points"
}
},
"required": [
"kills",
"deaths",
"score",
"kd_ratio",
"time_played",
"longest_kill_streak",
"targets_destroyed",
"vehicles_destroyed",
"soldiers_healed",
"teamkills",
"distance_moved",
"shots_fired",
"throwables_thrown",
"xp"
],
"description": "Player statistics"
},
"current_rank": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Rank ID"
},
"name": {
"type": "string",
"description": "Rank name",
"default": "null"
},
"required_xp": {
"type": "number",
"description": "Number of experience points this rank requires to be promoted to"
},
"image_url": {
"type": "string",
"description": "Rank image URL. 64x64 pixels"
},
"icon_url": {
"type": "string",
"description": "Small rank image URL. 20x20 pixels"
}
},
"required": [
"id",
"name",
"required_xp",
"image_url",
"icon_url"
],
"description": "Player current rank"
},
"next_rank": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "number",
"description": "Rank ID"
},
"name": {
"type": "string",
"description": "Rank name",
"default": "null"
},
"required_xp": {
"type": "number",
"description": "Number of experience points this rank requires to be promoted to"
},
"image_url": {
"type": "string",
"description": "Rank image URL. 64x64 pixels"
},
"icon_url": {
"type": "string",
"description": "Small rank image URL. 20x20 pixels"
}
},
"required": [
"id",
"name",
"required_xp",
"image_url",
"icon_url"
],
"description": "Player next rank (if applicable)"
},
"xp_to_next_rank": {
"type": "number",
"description": "Number of experience points to gain until the next promotion",
"default": 0
},
"xp_percent_completion_to_next_rank": {
"type": "number",
"description": "Percentage of experience points to gain until the next promotion",
"default": 0
},
"date": {
"type": [
"string",
"null"
],
"description": "If not `null`: [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date for which this player date are available for (stats history mode only)",
"default": "null"
},
"signature_image_url": {
"type": [
"string",
"null"
],
"description": "Player signature image URL. 387x108 pixels"
},
"promoted_to_rank": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "number",
"description": "Rank ID"
},
"name": {
"type": "string",
"description": "Rank name",
"default": "null"
},
"required_xp": {
"type": "number",
"description": "Number of experience points this rank requires to be promoted to"
},
"image_url": {
"type": "string",
"description": "Rank image URL. 64x64 pixels"
},
"icon_url": {
"type": "string",
"description": "Small rank image URL. 20x20 pixels"
}
},
"required": [
"id",
"name",
"required_xp",
"image_url",
"icon_url"
],
"description": "If not `null`: rank this player has been promoted to (stats history mode only)"
},
"owner": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "number",
"description": "RWRS user ID"
},
"username": {
"type": "string",
"description": "The user nickname (as provided by Steam)"
},
"url": {
"type": "string",
"description": "RWRS user profile page URL"
},
"steam_id": {
"type": "number",
"description": "SteamID64 of this user"
},
"steam_profile_url": {
"type": "string",
"description": "URL to this Steam user profile page"
},
"small_avatar_url": {
"type": [
"string",
"null"
],
"description": "User small avatar (as provided by Steam). 32x32 pixels",
"default": "null"
},
"large_avatar_url": {
"type": [
"string",
"null"
],
"description": "User large avatar (as provided by Steam). 184x184 pixels",
"default": "null"
}
},
"required": [
"id",
"username",
"url",
"steam_id",
"steam_profile_url"
],
"description": "The RWRS user that owns this RWR account or `null` if he's unknown or if the RWRS user has defined its profile as private"
}
},
"required": [
"username",
"url",
"is_rwrs_creator",
"is_contributor",
"is_rwr_dev",
"is_official_servers_mod",
"database",
"is_friend",
"current_server",
"stats",
"current_rank",
"next_rank",
"xp_to_next_rank",
"xp_percent_completion_to_next_rank",
"date",
"signature_image_url",
"promoted_to_rank",
"owner"
],
"additionalProperties": false
}
400
One or more arguments are (is) invalid. Check the error message(s) for more information.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
404
The Player wasn’t found or, only when the date
parameter is provided: no stats found for this player (although he’s eligible for stats history).
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
412
If the date
parameter is provided: the Player isn’t eligible for stats history (5000 most experienced players only).
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Player ¶
Get stats historyGET/players/{database}/{username}/stats-history{?page,limit}
Return stats history corresponding to the given database / player username couple.
Available only for the 5000 most experienced players.
Example URI
- database
string
(required) Example: invasionThe player database.
Choices:
invasion
pacific
- username
string
(required) Example: EPOCDOTFRThe player username.
- page
integer
(optional) Default: 1 Example: 1Minimum value:
1
- limit
integer
(optional) Default: 15 Example: 25Number of stats row to return.
Minimum value:
1
Maximum value:
100
Headers
Authorization: Token {Your Personal Access Token}
200
Headers
Content-Type: application/json
Body
[
{
"kills": 38689,
"deaths": 3695,
"score": 34994,
"kd_ratio": 10.47,
"time_played": 640200,
"longest_kill_streak": 301,
"targets_destroyed": 633,
"vehicles_destroyed": 638,
"soldiers_healed": 31,
"teamkills": 785,
"distance_moved": 790.4,
"shots_fired": 417868,
"throwables_thrown": 3057,
"xp": 219921,
"date": "2018-11-30",
"promoted_to_rank": {
"id": 14,
"name": "Lieutenant General",
"required_xp": 200000,
"image_url": "https://rwrstats.com/static/images/ranks/us/14.png",
"icon_url": "https://rwrstats.com/static/images/ranks/us/14_icon.png"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"kills": {
"type": "number",
"description": "Number of soldiers killed"
},
"deaths": {
"type": "number",
"description": "Number of times being killed"
},
"score": {
"type": "number",
"description": "Score as shown in-game (kills minus deaths)"
},
"kd_ratio": {
"type": "number",
"description": "Kills / deaths ratio. The higher above 1.0, the better"
},
"time_played": {
"type": "number",
"description": "Number of seconds played online"
},
"longest_kill_streak": {
"type": "number",
"description": "Maximum number of consecutive kills without a single death"
},
"targets_destroyed": {
"type": "number",
"description": "Number of structures destroyed (radars, prisons, etc)"
},
"vehicles_destroyed": {
"type": "number",
"description": "Number of vehicles destroyed"
},
"soldiers_healed": {
"type": "number",
"description": "Number of soldiers healed"
},
"teamkills": {
"type": "number",
"description": "Number of friendly soldiers killed"
},
"distance_moved": {
"type": "number",
"description": "Number of kilometers traveled (includes vehicles use)"
},
"shots_fired": {
"type": "number",
"description": "Number of bullets fired (includes static weapons, tank turrets, etc)"
},
"throwables_thrown": {
"type": "number",
"description": "Number of grenades, C4s, etc thrown"
},
"xp": {
"type": "number",
"description": "Current number of experience points"
},
"date": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when stats have been recorded"
},
"promoted_to_rank": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "number",
"description": "Rank ID"
},
"name": {
"type": "string",
"description": "Rank name",
"default": "null"
},
"required_xp": {
"type": "number",
"description": "Number of experience points this rank requires to be promoted to"
},
"image_url": {
"type": "string",
"description": "Rank image URL. 64x64 pixels"
},
"icon_url": {
"type": "string",
"description": "Small rank image URL. 20x20 pixels"
}
},
"required": [
"id",
"name",
"required_xp",
"image_url",
"icon_url"
],
"description": "If not `null`: rank this player has been promoted to"
}
},
"required": [
"kills",
"deaths",
"score",
"kd_ratio",
"time_played",
"longest_kill_streak",
"targets_destroyed",
"vehicles_destroyed",
"soldiers_healed",
"teamkills",
"distance_moved",
"shots_fired",
"throwables_thrown",
"xp"
]
}
}
400
One or more arguments are (is) invalid. Check the error message(s) for more information.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
404
The Player wasn’t found.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
412
The Player isn’t eligible for stats history (5000 most experienced players only).
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Friends ¶
A Friend is an online multiplayer Running With Rifles account which is existing in the current user’s friends list.
Friends ¶
Get the Friends listGET/friends
Return the list of Friends for the current user, ordered by username.
Example URI
Headers
Authorization: Token {Your Personal Access Token}
200
Headers
Content-Type: application/json
Body
[
{
"username": "EPOCDOTFR",
"url": "https://rwrstats.com/players/invasion/EPOCDOTFR",
"is_rwrs_creator": true,
"is_contributor": false,
"is_rwr_dev": false,
"is_official_servers_mod": false,
"database": {
"id": "invasion",
"name": "Invasion"
},
"current_server": {
"name": "InvasionEU2",
"ip": "31.186.250.67",
"port": 1235,
"is_ranked": true,
"is_official": true,
"website_url": "https://runningwithrifles.com/",
"url": "https://rwrstats.com/servers/31.186.250.67:1235/invasioneu2",
"type": {
"id": "vanilla",
"name": "Vanilla"
},
"mode": {
"id": "COOP",
"name": "Coop."
},
"database": {
"id": "invasion",
"name": "Invasion"
},
"map": {
"id": "map10",
"name": "Railroad Gap"
},
"players": {
"current": 20,
"max": 24,
"free": 4
},
"location": {
"name": "Frankfurt am Main, Germany",
"country_code": "de",
"flag_image_url": "https://rwrstats.com/static/images/flags/DE.png"
},
"steam_join_url": "steam://rungameid/270150//server_address=178.32.58.160 server_port=1240",
"event": {
"name": "PvP event!",
"is_ongoing": true,
"starts_at": "2019-04-16T16:00:00+02:00"
}
},
"friend_since": "2019-02-22T10:46:00+00:00"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "Player username"
},
"url": {
"type": [
"string",
"null"
],
"description": "RWRS player profile page URL. `null` if the player isn't an official Invasion or WW2 DLCs profile",
"default": "null"
},
"is_rwrs_creator": {
"type": "boolean",
"description": "Whether this player is the creator of RWRS"
},
"is_contributor": {
"type": "boolean",
"description": "Whether this player contributed in a way or another to RWRS"
},
"is_rwr_dev": {
"type": "boolean",
"description": "Whether this player is one of the RWR developers"
},
"is_official_servers_mod": {
"type": "boolean",
"description": "Whether this player is moderator on official servers"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Player database. `null` if not an official Invasion or WW2 DLCs player profile"
},
"current_server": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Server name"
},
"ip": {
"type": "string",
"description": "Server IP address"
},
"port": {
"type": "number",
"description": "Server port"
},
"is_ranked": {
"type": "boolean",
"description": "Whether this server is a ranked one (official Invasion and WW2 DLCs servers only)"
},
"is_official": {
"type": "boolean",
"description": "Whether this server is an official one (official Invasion, WW2 DLCs or Dominance servers)"
},
"website_url": {
"type": [
"string",
"null"
],
"description": "Server website URL. `null` if none",
"default": "null"
},
"url": {
"type": "string",
"description": "RWRS server page URL"
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server type ID (used mod or DLC)"
},
"name": {
"type": "string",
"description": "Server type name (used mod or DLC)"
}
},
"required": [
"id",
"name"
],
"description": "Server type"
},
"mode": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "Server mode ID (game mode)"
},
"name": {
"type": "string",
"description": "Server mode name (game mode)"
}
},
"required": [
"id",
"name"
],
"description": "Server mode. `null` if unknown"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Server used database. `null` if not an official Invasion or WW2 DLCs server"
},
"map": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Map ID. **Not unique**: must be used in conjonction of the mode ID"
},
"name": {
"type": "string",
"description": "Map name. If unknown, `id` will be used"
}
},
"required": [
"id",
"name"
],
"description": "Server map"
},
"players": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Number of current players"
},
"max": {
"type": "number",
"description": "Maximum allowed number of players"
},
"free": {
"type": "number",
"description": "Number of free player slots"
}
},
"required": [
"current",
"max",
"free"
],
"description": "Server players"
},
"location": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "City name (if available) + country name of the server location"
},
"country_code": {
"type": "string",
"description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the server location"
},
"flag_image_url": {
"type": "string",
"description": "Image URL of the server country location. 24x24 pixels"
}
},
"required": [
"name",
"country_code",
"flag_image_url"
],
"description": "Server location. `null` if unknown"
},
"steam_join_url": {
"type": "string",
"description": "[Steam browser protocol](https://developer.valvesoftware.com/wiki/Steam_browser_protocol) URL to be used to load Running With Rifles onto the given server lobby screen"
},
"event": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Event name"
},
"is_ongoing": {
"type": "boolean",
"description": "Whether this event is ongoing or not"
},
"starts_at": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when this event will start"
}
},
"required": [
"name",
"is_ongoing",
"starts_at"
],
"description": "Event linked to this Server. `null` if none"
}
},
"required": [
"name",
"ip",
"port",
"is_ranked",
"is_official",
"url",
"type",
"map",
"players",
"steam_join_url"
],
"description": "Server on which the player is currently playing"
},
"friend_since": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date / time since the current user is friend with this player"
}
},
"required": [
"username",
"is_rwrs_creator",
"is_contributor",
"is_rwr_dev",
"is_official_servers_mod",
"friend_since"
]
}
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Add a new FriendPOST/friends
Add the given player to the current user’s friends list.
Example URI
Headers
Content-Type: application/json
Authorization: Token {Your Personal Access Token}
Body
{
"username": "EPOCDOTFR"
}
201
Headers
Content-Type: application/json
Body
{
"username": "EPOCDOTFR",
"url": "https://rwrstats.com/players/invasion/EPOCDOTFR",
"is_rwrs_creator": true,
"is_contributor": false,
"is_rwr_dev": false,
"is_official_servers_mod": false,
"database": {
"id": "invasion",
"name": "Invasion"
},
"current_server": {
"name": "InvasionEU2",
"ip": "31.186.250.67",
"port": 1235,
"is_ranked": true,
"is_official": true,
"website_url": "https://runningwithrifles.com/",
"url": "https://rwrstats.com/servers/31.186.250.67:1235/invasioneu2",
"type": {
"id": "vanilla",
"name": "Vanilla"
},
"mode": {
"id": "COOP",
"name": "Coop."
},
"database": {
"id": "invasion",
"name": "Invasion"
},
"map": {
"id": "map10",
"name": "Railroad Gap"
},
"players": {
"current": 20,
"max": 24,
"free": 4
},
"location": {
"name": "Frankfurt am Main, Germany",
"country_code": "de",
"flag_image_url": "https://rwrstats.com/static/images/flags/DE.png"
},
"steam_join_url": "steam://rungameid/270150//server_address=178.32.58.160 server_port=1240",
"event": {
"name": "PvP event!",
"is_ongoing": true,
"starts_at": "2019-04-16T16:00:00+02:00"
}
},
"friend_since": "2019-02-22T10:46:00+00:00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "Player username"
},
"url": {
"type": [
"string",
"null"
],
"description": "RWRS player profile page URL. `null` if the player isn't an official Invasion or WW2 DLCs profile",
"default": "null"
},
"is_rwrs_creator": {
"type": "boolean",
"description": "Whether this player is the creator of RWRS"
},
"is_contributor": {
"type": "boolean",
"description": "Whether this player contributed in a way or another to RWRS"
},
"is_rwr_dev": {
"type": "boolean",
"description": "Whether this player is one of the RWR developers"
},
"is_official_servers_mod": {
"type": "boolean",
"description": "Whether this player is moderator on official servers"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Player database. `null` if not an official Invasion or WW2 DLCs player profile"
},
"current_server": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Server name"
},
"ip": {
"type": "string",
"description": "Server IP address"
},
"port": {
"type": "number",
"description": "Server port"
},
"is_ranked": {
"type": "boolean",
"description": "Whether this server is a ranked one (official Invasion and WW2 DLCs servers only)"
},
"is_official": {
"type": "boolean",
"description": "Whether this server is an official one (official Invasion, WW2 DLCs or Dominance servers)"
},
"website_url": {
"type": [
"string",
"null"
],
"description": "Server website URL. `null` if none",
"default": "null"
},
"url": {
"type": "string",
"description": "RWRS server page URL"
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server type ID (used mod or DLC)"
},
"name": {
"type": "string",
"description": "Server type name (used mod or DLC)"
}
},
"required": [
"id",
"name"
],
"description": "Server type"
},
"mode": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "Server mode ID (game mode)"
},
"name": {
"type": "string",
"description": "Server mode name (game mode)"
}
},
"required": [
"id",
"name"
],
"description": "Server mode. `null` if unknown"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Server used database. `null` if not an official Invasion or WW2 DLCs server"
},
"map": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Map ID. **Not unique**: must be used in conjonction of the mode ID"
},
"name": {
"type": "string",
"description": "Map name. If unknown, `id` will be used"
}
},
"required": [
"id",
"name"
],
"description": "Server map"
},
"players": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Number of current players"
},
"max": {
"type": "number",
"description": "Maximum allowed number of players"
},
"free": {
"type": "number",
"description": "Number of free player slots"
}
},
"required": [
"current",
"max",
"free"
],
"description": "Server players"
},
"location": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "City name (if available) + country name of the server location"
},
"country_code": {
"type": "string",
"description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the server location"
},
"flag_image_url": {
"type": "string",
"description": "Image URL of the server country location. 24x24 pixels"
}
},
"required": [
"name",
"country_code",
"flag_image_url"
],
"description": "Server location. `null` if unknown"
},
"steam_join_url": {
"type": "string",
"description": "[Steam browser protocol](https://developer.valvesoftware.com/wiki/Steam_browser_protocol) URL to be used to load Running With Rifles onto the given server lobby screen"
},
"event": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Event name"
},
"is_ongoing": {
"type": "boolean",
"description": "Whether this event is ongoing or not"
},
"starts_at": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when this event will start"
}
},
"required": [
"name",
"is_ongoing",
"starts_at"
],
"description": "Event linked to this Server. `null` if none"
}
},
"required": [
"name",
"ip",
"port",
"is_ranked",
"is_official",
"url",
"type",
"map",
"players",
"steam_join_url"
],
"description": "Server on which the player is currently playing"
},
"friend_since": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date / time since the current user is friend with this player"
}
},
"required": [
"username",
"url",
"is_rwrs_creator",
"is_contributor",
"is_rwr_dev",
"is_official_servers_mod",
"database",
"current_server",
"friend_since"
],
"additionalProperties": false
}
400
One or more arguments are (is) invalid. Check the error message(s) for more information.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
412
The given player is already friend with the current user.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Friend ¶
Remove a FriendDELETE/friends/{username}
Remove the given player from the current user’s friends list.
Example URI
- username
string
(required) Example: EPOCDOTFRThe player username.
Headers
Authorization: Token {Your Personal Access Token}
204
Headers
Content-Type: application/json
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
404
The given player isn’t friend with the current user.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Users ¶
A User represent a RWRS user, created after the User signed-in via Steam.
User ¶
Get a specific UserGET/users/{user_id}
Return the User corresponding to the given RWRS user ID.
Example URI
- user_id
number
(required) Example: 56The RWRS user ID.
Headers
Authorization: Token {Your Personal Access Token}
200
Headers
Content-Type: application/json
Body
{
"id": 56,
"username": "Epoc",
"url": "https://rwrstats.com/users/56/epoc",
"steam_id": 76561198051750940,
"steam_profile_url": "https://steamcommunity.com/profiles/76561198051750940",
"small_avatar_url": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/18/18a19ee73965fb3b92f39db8a307df80f5624122.jpg",
"large_avatar_url": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/18/18a19ee73965fb3b92f39db8a307df80f5624122_full.jpg",
"registered_at": "2019-02-22T10:46:00+00:00",
"country": {
"name": "France",
"code": "fr",
"flag_image_url": "https://rwrstats.com/static/images/flags/FR.png"
},
"accounts": [
{
"username": "EPOCDOTFR",
"url": "https://rwrstats.com/players/invasion/EPOCDOTFR",
"is_rwrs_creator": true,
"is_contributor": false,
"is_rwr_dev": false,
"is_official_servers_mod": false,
"database": {
"id": "invasion",
"name": "Invasion"
},
"is_friend": true,
"current_server": {
"name": "InvasionEU2",
"ip": "31.186.250.67",
"port": 1235,
"is_ranked": true,
"is_official": true,
"website_url": "https://runningwithrifles.com/",
"url": "https://rwrstats.com/servers/31.186.250.67:1235/invasioneu2",
"type": {
"id": "vanilla",
"name": "Vanilla"
},
"mode": {
"id": "COOP",
"name": "Coop."
},
"database": {
"id": "invasion",
"name": "Invasion"
},
"map": {
"id": "map10",
"name": "Railroad Gap"
},
"players": {
"current": 20,
"max": 24,
"free": 4
},
"location": {
"name": "Frankfurt am Main, Germany",
"country_code": "de",
"flag_image_url": "https://rwrstats.com/static/images/flags/DE.png"
},
"steam_join_url": "steam://rungameid/270150//server_address=178.32.58.160 server_port=1240",
"event": {
"name": "PvP event!",
"is_ongoing": true,
"starts_at": "2019-04-16T16:00:00+02:00"
}
}
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "RWRS user ID"
},
"username": {
"type": "string",
"description": "The user nickname (as provided by Steam)"
},
"url": {
"type": "string",
"description": "RWRS user profile page URL"
},
"steam_id": {
"type": "number",
"description": "SteamID64 of this user"
},
"steam_profile_url": {
"type": "string",
"description": "URL to this Steam user profile page"
},
"small_avatar_url": {
"type": [
"string",
"null"
],
"description": "User small avatar (as provided by Steam). 32x32 pixels",
"default": "null"
},
"large_avatar_url": {
"type": [
"string",
"null"
],
"description": "User large avatar (as provided by Steam). 184x184 pixels",
"default": "null"
},
"registered_at": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date / time when user registered on RWRS"
},
"country": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "User country name"
},
"code": {
"type": "string",
"description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) user country code"
},
"flag_image_url": {
"type": "string",
"description": "Image URL of the user country. 24x24 pixels"
}
},
"required": [
"name",
"code",
"flag_image_url"
],
"description": "If not `null`: user country (as provided by Steam)"
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "Player username"
},
"url": {
"type": [
"string",
"null"
],
"description": "RWRS player profile page URL. `null` if the player isn't an official Invasion or WW2 DLCs profile",
"default": "null"
},
"is_rwrs_creator": {
"type": "boolean",
"description": "Whether this player is the creator of RWRS"
},
"is_contributor": {
"type": "boolean",
"description": "Whether this player contributed in a way or another to RWRS"
},
"is_rwr_dev": {
"type": "boolean",
"description": "Whether this player is one of the RWR developers"
},
"is_official_servers_mod": {
"type": "boolean",
"description": "Whether this player is moderator on official servers"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Player database. `null` if not an official Invasion or WW2 DLCs player profile"
},
"is_friend": {
"type": "boolean",
"description": "Whether this player is friend with the current user"
},
"current_server": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Server name"
},
"ip": {
"type": "string",
"description": "Server IP address"
},
"port": {
"type": "number",
"description": "Server port"
},
"is_ranked": {
"type": "boolean",
"description": "Whether this server is a ranked one (official Invasion and WW2 DLCs servers only)"
},
"is_official": {
"type": "boolean",
"description": "Whether this server is an official one (official Invasion, WW2 DLCs or Dominance servers)"
},
"website_url": {
"type": [
"string",
"null"
],
"description": "Server website URL. `null` if none",
"default": "null"
},
"url": {
"type": "string",
"description": "RWRS server page URL"
},
"type": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server type ID (used mod or DLC)"
},
"name": {
"type": "string",
"description": "Server type name (used mod or DLC)"
}
},
"required": [
"id",
"name"
],
"description": "Server type"
},
"mode": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "Server mode ID (game mode)"
},
"name": {
"type": "string",
"description": "Server mode name (game mode)"
}
},
"required": [
"id",
"name"
],
"description": "Server mode. `null` if unknown"
},
"database": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string",
"description": "The database ID"
},
"name": {
"type": "string",
"description": "The database name"
}
},
"required": [
"id",
"name"
],
"description": "Server used database. `null` if not an official Invasion or WW2 DLCs server"
},
"map": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Map ID. **Not unique**: must be used in conjonction of the mode ID"
},
"name": {
"type": "string",
"description": "Map name. If unknown, `id` will be used"
}
},
"required": [
"id",
"name"
],
"description": "Server map"
},
"players": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Number of current players"
},
"max": {
"type": "number",
"description": "Maximum allowed number of players"
},
"free": {
"type": "number",
"description": "Number of free player slots"
}
},
"required": [
"current",
"max",
"free"
],
"description": "Server players"
},
"location": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "City name (if available) + country name of the server location"
},
"country_code": {
"type": "string",
"description": "[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the server location"
},
"flag_image_url": {
"type": "string",
"description": "Image URL of the server country location. 24x24 pixels"
}
},
"required": [
"name",
"country_code",
"flag_image_url"
],
"description": "Server location. `null` if unknown"
},
"steam_join_url": {
"type": "string",
"description": "[Steam browser protocol](https://developer.valvesoftware.com/wiki/Steam_browser_protocol) URL to be used to load Running With Rifles onto the given server lobby screen"
},
"event": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Event name"
},
"is_ongoing": {
"type": "boolean",
"description": "Whether this event is ongoing or not"
},
"starts_at": {
"type": "string",
"description": "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when this event will start"
}
},
"required": [
"name",
"is_ongoing",
"starts_at"
],
"description": "Event linked to this Server. `null` if none"
}
},
"required": [
"name",
"ip",
"port",
"is_ranked",
"is_official",
"url",
"type",
"map",
"players",
"steam_join_url"
],
"description": "Server on which the player is currently playing"
}
},
"required": [
"username",
"is_rwrs_creator",
"is_contributor",
"is_rwr_dev",
"is_official_servers_mod",
"is_friend"
]
},
"description": "List of linked RWR accounts"
}
},
"required": [
"id",
"username",
"url",
"steam_id",
"steam_profile_url",
"small_avatar_url",
"large_avatar_url",
"registered_at",
"country",
"accounts"
],
"additionalProperties": false
}
400
One or more arguments are (is) invalid. Check the error message(s) for more information.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
404
The User wasn’t found, or its profile is set as private and is not requested by the same user the Personal Access Token is linked to.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
Misc ¶
Miscellanous resources.
Live counters ¶
Get live countersGET/live-counters
Return the current number of players (total / online) and servers (total / active).
Server-side caching
This resource has a cache lifetime of 1 minute.
Example URI
Headers
Authorization: Token {Your Personal Access Token}
200
Headers
Content-Type: application/json
Body
{
"players": {
"total": 85,
"online": 32,
"friends_online": 12
},
"servers": {
"total": 22,
"active": 7
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"players": {
"type": "object",
"properties": {
"total": {
"type": "number",
"description": "Total number of people playing RWR"
},
"online": {
"type": "number",
"description": "Number of people playing RWR multiplayer online"
},
"friends_online": {
"type": "number",
"description": "Number of current user's friends playing RWR multiplayer online"
}
},
"required": [
"total",
"online",
"friends_online"
],
"description": "Player counts"
},
"servers": {
"type": "object",
"properties": {
"total": {
"type": "number",
"description": "Total number of public RWR servers"
},
"active": {
"type": "number",
"description": "Number of active (non-empty) public RWR servers"
}
},
"required": [
"total",
"active"
],
"description": "Player counts"
}
},
"required": [
"players",
"servers"
],
"additionalProperties": false
}
403
Invalid Personal Access Token or Personal Access Token not provided.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}
503
Maintenance in progress.
Headers
Content-Type: application/json
Body
{
"message": "Example error message"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message explaining what happened"
}
},
"required": [
"message"
],
"additionalProperties": false
}