Skip to content

Methods & parameters

Luís Gustavo edited this page Jun 29, 2018 · 112 revisions

THIS DOCUMENTATION WILL CONSUME A JSON RESPONSE.

Connectivity

Create Session

/createsession[ResponseFormat]/{devID}/{signature}/{timestamp}
A required step to Authenticate the developerId/signature for further API use.

Parameter Description Example
ResponseFormat JSON or XML json
devID Your devID from your application request 1004
signature The signature of "createsession" method c332691773af33948c9ddb12e5fb444f
timestamp The current timestamp 20180628012612



Request: http://api.realmroyale.com/realmapi.svc/createsessionjson/1004/c332691773af33948c9ddb12e5fb444f/20180628012612

Response: JSON

{
    "ret_msg": "Approved",
    "session_id": "1465AFCA32DBDB800CEF8C72F296C52C",
    "timestamp": "6/28/2018 1:26:12 AM"
}

The Session is contained in an element called “session_id”. This parameter is needed to call the other methods.


Ping

/ping[ResponseFormat]
A quick way of validating access to the Realm Royale API.


Parameter Description Example
ResponseFormat JSON or XML json


Request: http://api.realmroyale.com/realmapi.svc/pingjson

Response: TEXT PLAIN

RealmAPI (ver 1.0.0.0) [PATCH - ] - Ping successful. Server Date:6/28/2018 1:26:12 AM

Test Session

/testsession[ResponseFormat]/{devId}/{signature}/{session_id}/{timestamp}
A means of validating that a session is established.

Parameter Description Example
ResponseFormat JSON or XML json
devID Your devID from your application request 1004
signature The signature of "testsession" method c332691773af33948c9ddb12e5fb444f
session_id A valid session_id 1465AFCA32DBDB800CEF8C72F296C52C
timestamp The current timestamp 20180628012612


Request: http://api.realmroyale.com/realmapi.svc/testsessionjson/1004/c332691773af33948c9ddb12e5fb444f/1465AFCA32DBDB800CEF8C72F296C52C/20180628012612

Response: TEXT PLAIN

This was a successful test with the following parameters added: developer: 1004 time: 6/28/2018 1:26:12 AM signature: c332691773af33948c9ddb12e5fb444f session: 1465AFCA32DBDB800CEF8C72F296C52C

APIs

Get Player

/getPlayer[ResponseFormat]/{devId}/{signature}/{session_id}/{timestamp}/{player}/{platform}
Returns basic player information

Parameter Description Example
ResponseFormat JSON or XML json
devID Your devID from your application request 1004
signature The signature of "getplayer" method c332691773af33948c9ddb12e5fb444f
session_id A valid session_id 1465AFCA32DBDB800CEF8C72F296C52C
timestamp The current timestamp 20180628012612
player playerId (int), playerName (string) or steamId (int) RealmHero
platform HIREZ or STEAM hirez

Request: http://api.realmroyale.com/realmapi.svc/getPlayerjson/1004/c332691773af33948c9ddb12e5fb444f/1465AFCA32DBDB800CEF8C72F296C52C/20180628012612/RealmHero/hirez

Response: JSON

{
    "created_datetime": "3\/18\/2018 5:14:27 PM",
    "id": 123,
    "last_login_datetime": "6\/12\/2018 7:51:11 PM",      
    "level": 22,
    "name": "RealmHero",
    "region": "Europe",
    "ret_msg": null,
    "steam_id": 76561198199559770
}

Get Player Stats

/getPlayerStats[ResponseFormat]/{devId}/{signature}/{session_id}/{timestamp}/{player}

http://api.realmroyale.com/realmapi.svc/getPlayerStatsJSON/{devId}/{signature}/{session_id}/{timestamp}/{player}

Get Player Match History

/getPlayerMatchHistory[ResponseFormat]/{devId}/{signature}/{session_id}/{timestamp}/{player}
Returns high level data regarding matches played in the past 30 days. Limited to the 50 most recent matches.

http://api.realmroyale.com/realmapi.svc/getPlayerMatchHistoryJSON/{devId}/{signature}/{session_id}/{timestamp}/{player}

Get Leaderboard

/getLeaderboard[ResponseFormat]/{devId}/{signature}/{session_id}/{timestamp}/{queue}/{ranking_criteria}

http://api.realmroyale.com/realmapi.svc/getLeaderboardJSON/{devId}/{signature}/{session_id}/{timestamp}/{queue}/{ranking_criteria}

Get Match IDs By Queue

/getMatchIDsByQueue[ResponseFormat]/{devId}/{signature}/{session_id}/{timestamp}/{queue}/{date}/{hour}

http://api.realmroyale.com/realmapi.svc/getMatchIDsByQueueJSON/{devId}/{signature}/{session_id}/{timestamp}/{queue}/{date}/{hour}

Get Match Details

/getMatchDetails[ResponseFormat]/{devId}/{signature}/{session_id}/{timestamp}/{matchId}

http://api.realmroyale.com/realmapi.svc/getMatchDetailsJSON/{devId}/{signature}/{session_id}/{timestamp}/{matchId}