Ev.io Developer API

Submitted by Forgeable on Tue, 06/14/2022 - 11:21

 

See the matchmaker API for creating matches and monitoring match status programmatically. 

What sort of things can you do with the ev.io API?

  • Create an app to display data about users, clans, NFTs, or leaderboards 
  • Create discord bots which can perform certain actions, such as retrieving player stats or deploying clan members. 
  • Create an app to control lending (i.e. scholarships) of ev.io NFTs
  • Create an app which allows you to programmatically create and run tournaments (see the matchmaker API).

Build a cool, useful app and we'll even help you promote it. Message ForgeableSum#1514 in Discord if you have something cool to show.

Getting started

There are two supported methods used within the HTTP protocol: GET and PATCH. Use PATCH when you want to change data. Use GET when you want to retrieve data.

Most GET requests (retrieving data) will not need to be authenticated. PATCH requests however, which involve changing data, will need to be authenticated. 

Authenticating

Ev.io API requests support two authentication methods:

  • HTTP Basic Auth - In the authorization header, supply your ev.io username and password on each request in the form of a base64 encoded string.  
  • OAuth - coming soon.

 

GET Example

Get all info related to user with id "1".

curl -X GET -H "Accept: application/json,application/xml" -H "Conteplication/xml" -H "X-CSRF-Token: {token_here}" "https://ev.io/user/1?_format=json"

 

PATCH Example

Update a user's abilities loadout. 

curl -i -X PATCH \
   -H "Accept:application/json" \
   -H "Content-Type:application/json" \
   -H "Authorization:Basic {base64 here}}" \
   -d \
'{
  "field_abilities_loadout": [
    {
      "value": "[1,2,0,0,3,0,3,0,0,1,0,0,0,1,0,1,1,0,0]"
    }
  ]
}' \
 'http://ev.io/user/{user id}?_format=json'

Data Endpoints

All ev.io data is exposed via JSON endpoints. 

Endpoint Applies to Notes Methods
https://ev.io/user/{user id}?_format=json Users GET comprehensive data concerning a user. Some fields are only visible to the user which owns the account. Includes a match history field for any games played in tournament mode. Use PATCH to alter certain fields, such as your crosshair.   GET, PATCH
https://ev.io/group/{clan id}?_format=json Clans GET comprehensive data concerning a particular clan. use PATCH to alter certain fields, such as which users are deployed.  GET, PATCH
https://ev.io/clans-all3 Clans GET all clans (non-comprehensive) data and deployed members. Use the /group endpoint (above) for comprehensive data on a particular clan.  GET
https://ev.io/nft-drops NFTs GET all data concerning live NFT drops currently in the game GET
https://ev.io/flags/{user id} NFTs GET (non-comprehensive) data concerning a user's NFTs. The NFTs shown here are simply the last ones verified when the user connected their wallet. If a flag has field_flag_nft_address set to false, it is a non-NFT game asset. Scholar NFTs are not shown at this endpoint. GET
https://ev.io/get-nft-flags/{nft token address} NFTs GET (non-comprehensive) data concerning an NFT by the NFT token address. Note if the wallet which owns the NFT has never connected to ev.io, a record will not exist.  GET
https://ev.io/all-skins Items GET (non-comprehensive) data concerning all live game items in ev.io. Includes both default weapons, as well as equippable skins. Includes swords, character skins, and weapons. GET
https://ev.io/scholar/{user id} Scholars GET all the NFTs lent out to a particular user id and all associated meta data. GET
https://ev.io/vars Vars This is a special endpoint which game servers use to set certain variables, such as the current global earn rate (field_e_earn_rate_per_100_score). Later this endpoint will be used for dynamic stuff like daily quests.   GET

Content Endpoints

All content in ev.io is exposed via JSON endpoints. All you need is a node id to retrieve them. Node id is referenced as nid in https://ev.io/all-skins and entity_id in some other places, such as the https://ev.io/flags/{user id} endpoint. 
 

Example Endpoint (GET only) Applies to Notes
https://ev.io/node/133?_format=json Maps Fracture map
https://ev.io/node/7?_format=json Weapons Shotgun
https://ev.io/node/243?_format=json Weapon Skins Invictus AR
https://ev.io/node/308?_format=json Character Skins Kijo