Endpoint Notes - Requests and Responses
All timestamps provided are in UNIX TIMESTAMP format.
THIS DOCUMENTATION IS NOT YET COMPLETE. DO NOT USE FOR PRODUCTION SERVICES!
Alerts
Example request:
GET /v2/alerts/10000
Example Response:
{
"data": {
"id": 10000,
"started": 1438169834,
"ended": 1438177048,
"server": 1,
"zone": 2,
"winner": "VS",
"isDraw": false,
"isDomination": false,
"isValid": true,
"inProgress": false
}
}
This endpoint supports embeds. Embeds allow you to request other information about alerts. Please see the list at the bottom of this document for a list of Alert Embeds.
Alerts/Active
Todo
Alerts/Counts
Todo
Embeds
Supported Alerts
embeds:
Each of the responses as demonstrated below are all shown AFTER the alert details are shown. The ...
at the top of each response represents the alert data, signifying that the response shown is after the alert data.
...
s within the response itself signify that there is more data that would likely come. If these dots are missing, you are seeing the entire response.
Classes
Shows all data relating to classes for an alert.
GET /v2/alerts/10000?embed=classes
...
"classes": {
"data": [
{
"id": 1, // ClassID
"kills": 463,
"deaths": 449,
"teamkills": 6,
"suicides": 5
},
...
]
}
Combats
Shows all kill totals for each faction for an alert. Does NOT show weapon statistics, that has it's own embed.
GET /v2/alerts/10000?embed=combats
...
"combats": {
"data": {
"kills": {
"vs": 3873,
"nc": 2863,
"tr": 4762,
"total": 11498
},
"deaths": {
"vs": 4291,
"nc": 3085,
"tr": 4913,
"total": 12289
},
"teamkills": {
"vs": 244,
"nc": 113,
"tr": 189,
"total": 546
},
"suicides": {
"vs": 124,
"nc": 50,
"tr": 71,
"total": 245
}
}
}
CombatHistory
Gets the running total of each faction's kill totals as the alert went on. All data should be sorted by timestamp ascending. Data is sampled at 30 second intervals.
GET /v2/alerts/10000?embed=combatHistorys
...
"combatHistorys": {
"data": [
{
"timestamp": 1438169860,
"vs": 14,
"nc": 14,
"tr": 14
},
...
{
"timestamp": 1438170760,
"vs": 805,
"nc": 805,
"tr": 921
},
...
]
}
MapInitials
Gets the initial map state so that accurate maps can be built.
GET /v2/alerts/10000?embed=mapInitials
...
"mapInitials": {
"data": [
{
"facilityID": 7500,
"facilityType": 4,
"facilityFaction": 1
},
...
]
}
Maps
Gets all facility captures and defences (may add filters later for this) for an alert.
GET /v2/alerts/10000?embed=maps
...
"maps": {
"data": [
{
"timestamp": 1438169876,
"facilityID": 118000,
"facilityNewFaction": 3,
"facilityOldFaction": 2,
"durationHeld": 4961,
"controlVS": 29,
"controlNC": 22,
"controlTR": 47,
"server": 1,
"zone": 2,
"outfitCaptured": 37521582920072694,
"isDefence": false
},
...
]
}
Outfits
Gets all statistics for each outfit during the alert.
Note, in this endpoint, there is 3 outfits with the IDs of -1
, -2
, and -3
. These represent the players who are not in an outfit for each faction. So for example, a VS player who doesn't have an outfit will be counted as outfit -1
.
GET /v2/alerts/10000?embed=outfits
...
"outfits": {
"data": [
{
"outfit": {
"id": 37530800324403534,
"name": "PLANETSIDE POLICE DEPT",
"tag": "PSDP",
"faction": 3
},
"metrics": {
"kills": 32,
"deaths": 23,
"teamkills": 1,
"suicides": 0,
"captures": 0
}
},
...
]
}
Players
Gets all statistics for each player during the alert.
GET /v2/alerts/10000?embed=players
...
"players": {
"data": [
{
"player": {
"id": 5428359100732927473,
"name": "MoZaiNai",
"outfitID": 37530800324403534,
"faction": 3
},
"metrics": {
"kills": 32,
"deaths": 23,
"teamkills": 1,
"suicides": 0,
"headshots": 5
}
},
...
]
}
Populations
Gets the running Population totals over the course of the alert. All data should be sorted by timestamp ascending. Data is sampled at 30 second intervals.
GET /v2/alerts/10000?embed=populations
...
"populations": {
"data": [
{
"timestamp": 1438169840,
"vs": 146,
"nc": 100,
"tr": 155,
"total": 401
},
...
]
}
Vehicles
Gets each vehicle's type metrics during the alert.
GET /v2/alerts/10000?embed=vehicles
...
"vehicles": {
"data": [
{
"id": 1, // Vehicle ID
"kills": {
"infantry": 73,
"vehicle": 15,
"total": 88
},
"deaths": {
"infantry": 98,
"vehicle": 82,
"total": 180
},
"bails": 139
},
...
]
}
NOTE TO DEV: Implement player based vehicle stats endpoint
Weapons
Gets each weapon's type metrics during the alert
GET /v2/alerts/10000?embed=weapons
...
"weapons": {
"data": [
{
"id": 4601, // WeaponID
"kills": 44,
"headshots": 2,
"teamkills": 1
},
...
]
}
NOTE TO DEV: Implement player based weapon stats endpoint
Alerts/Counts
Alerts/Counts/Daily
Returns the daily totals for all servers combined.
GET /v2/alerts/counts/daily
"data": {
"2014-10-29": { // All dates are in (Y-m-d format)
"data": {
"vs": 9,
"nc": 3,
"tr": 4,
"draw": 1,
"total": 17
}
},
"2014-10-30" : {
...
}
...
}
Alerts/Counts/DailyByServer
Returns the daily totals broken down by server, by date
GET /v2/alerts/counts/dailyByServer
"data": {
"1": {
"2014-10-29": {
"data": {
"vs": 2,
"nc": 0,
"tr": 1,
"draw": 0,
"total": 3
}
},
"2014-10-30": {
...
},
...
}
"10": {
...
}
}
Alerts/History
Returns the latest results across all servers
GET /v2/alerts/history
"data": [
{
"id": 19352,
"started": 1455368259,
"ended": 1455373660,
"server": 10,
"zone": 8,
"winner": "TR",
"isDraw": false,
"isDomination": false,
"isValid": true,
"inProgress": false
},
...
}
Also supports embeds. Recommended use is ?embed=map
.