Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

API 1.0 - Character Information

serveradminserveradmin Administrator
edited July 2016 in API Information
Welcome to the SWTORApps API information. This forum post discusses our Character Information endpoint API, located via: http://api.swtorapps.com/character/{CHARACTER_ID}. In this post, we will discuss both the information provided and best practices. If our API is updated, we will append versions to the request URL so that developers are allowed time to update their applications.

INFORMATION PROVIDED
Upon suscessfully accessing the endpoint, the following information will be provided in a JSON object:
  • server, characterName, characterFaction, characterClass, characterLevel, characterGuild, craftingOne, craftingTwo, craftingThree, swtorappsVerifiedAPI, swtorappsAPIVersion
In order for you to access this information, a user must enable API access on their associated character. To do this, please read our adding characters to the site forum post

If you attempt to access a character that has disabled API access, the following error will occur:
  • {"Code":403,"Exception":"API Access is not enabled. Permission denied.","Class":"API_CHARACTER_NOACCESS"}
If you attempt to access a character that does not exist, the following error will occur:
  • not_found

BEST PRACTICES
Cache data. Making frequent requests to the site can have your domain put on a restricted access list. We do not currently have a limiter in place nor API authentication, but if there is abuse, we will begin to enforce at least domain limitations. At most, 1000 request a day. Cache that data!

Bug test. We purposefully did not place the NOT_FOUND error in a JSON object, so please verity that you have systems in place should a NOT_FOUND come back. In most cases, this should not happen. Please have your users verify their API link before submitting them to you, as only users themselves have direct access to their own links/IDs. 

EXAMPLE API REQUEST (Success) | http://api.swtorapps.com/character/1-80902100648172016
{ "server":"The Harbinger", "characterName":"Lud'wig", "characterFaction":"Republic", "characterClass":"Commando", "characterLevel":"65", "characterGuild":"The Army of Light", "craftingOne":"Biochem", "craftingTwo":"Slicing", "craftingThree":"Bioanalysis", "swtorappsVerifiedAPI":"True", "swtorappsAPIVersion":"1.0" }

SWTORApps Account | Server Administrator
Follow us on Twitter @swtorapps | Like us on Facebook

Comments

  • elfindreamselfindreams Member, Donor
    Would it be possible to record/track Alignment Level, Valor and Social Level in addition to the data fields currently included?
  • LudwigVanCoverLudwigVanCover Administrator, Staff

    Would it be possible to record/track Alignment Level, Valor and Social Level in addition to the data fields currently included?


    We will be adding all of those fields soon! We have to run a script to update everyone's information, though during a maintenance period would be preferable just in case something happens. I think we can do this by next Friday though! 
    Davison | Primary Programmer
    Follow us on Twitter @swtorapps | Like us on Facebook
  • elfindreamselfindreams Member, Donor

    Would it be possible to record/track Alignment Level, Valor and Social Level in addition to the data fields currently included?


    We will be adding all of those fields soon! We have to run a script to update everyone's information, though during a maintenance period would be preferable just in case something happens. I think we can do this by next Friday though! 
    Many thanks :)
  • LudwigVanCoverLudwigVanCover Administrator, Staff
    Hi everyone,

    We recently removed an extra space that was found in our Character API. We have since removed the extra space. We have updated the version to 1.1 to reflect this change.

    Thanks,

    - Ludwig
    Davison | Primary Programmer
    Follow us on Twitter @swtorapps | Like us on Facebook
Sign In or Register to comment.