June 20
A couple of notes/updates.
- Documentation Page updated
- APIs devs should now be able to see owner team name in api/v2/castle_critical
- Reminder: Please continue to provide feedback and being making your adjustments/migration... below is a timeline from our end before our team plans on disabling api/v1/castle_info and api/v2/castle_fleets.
- 7/3 update the rate limit of both APIs to 10 requests / second per IP
- 7/17 update the rate limit of both APIs to 1 request / second per IP
- 7/24 review the # of incoming request and consider disabling both endpoints.
our team can still see requests coming from these two APIs, so please migrate the requests to api/v2/castle_critical as soon as possible..
June 14
Hey all,
Thanks again to the devs within the War Dragons community that reached out to us and answered all our questions regarding the usage of our API. Below are some details and updates we made. For full details, please check the Public API documentation here for schema examples.
Changes to existing API following your feedback:
- added API /api/v2/castle_critical, which returns fleet data and fort data (which includes shield status)
- The IP rate limit of /api/v2/castle_critical is 15 requests/second per IP, 1 request/second per pgid
- Limitation of the number of castles is 100 castles/request
- As /api/v2/castle_critical has both fleets and fort data and has higher throughput, we are planning to have it replace the /api/v2/castle_fleets API, please migrate all /api/v2/castle_fleets requests to /api/v2/castle_critical.
These changes will be live shortly. We are keeping/api/v2/castle_fleets for you guys to migrate to /api/v2/castle_critical.
From April 7
Hey all,
Thanks again to the devs within the War Dragons community that reached out to us and answered all our questions regarding the usage of our API. Below are some details and updates we made:
Please check the Public API documentation here for schema examples
Changes to existing API
- /api/v1/castle_info: return all castle info data including fleets (for 3rd party developer migration).
- Rate limit on pgid: 1 request per 10s, 5 requests per minute
- 10 sec cache
- Rate limit: 1 request per 10s per PGID OR 5 requests per minute per PGID. We want to encourage you to use /api/v2/castle_info and /api/v2/castle_fleets to get castle info data and fleets data.
- The current API will be deprecated later on. Date is TBD as the team is still working to find a better solution to support higher rate-limits. Our end goal is to support running the bot from a single IP with some limitations. Please note that we won’t deprecate the V1 API before we resolve all the blocking issues raised by our API developers (aka you).
- /api/v2/castle_fleets: We changed the rate limit to 50 requests/second per IP.
New API launched
- * /api/v2/castle_fleets: only return fleet data
- Rate limit 10 requests per second per ip
- Rate limit 1 request per second per pgid
- 10 sec cache
- Rate limit: 10 requests per second per IP OR 1 request per second per PGID (whichever is triggered first). This is a lightweight API with lower rate limit, it returns realtime fleets info for requested castles.
- /api/v2/castle_info: return castle info data exclude fleets
- Rate limit 10 requests per minute per ip
- Rate limit 1 request per minute per pgid
- 60 sec cache
- Rate limit: 10 requests per minute per IP OR 1 request per minute per PGID (whichever is triggered first). This API returns castle info excluding fleets data. Information for each castle will be updated every minute. We encourage you to use cache to avoid sending multiple requests for the same castles within one minute.
Summary
- We split the api/v1/castle_info into two sub APIs
- /api/v2/castle_info
- /api/v2/castle_fleets
- Castle Info API (/api/v2/castle_info)
- Rate limitations:
- 0 request per minute per ip
- 1 request per minute per pgid
- Querying sooner than that will send an empty response. If you hit the rate-limit too frequently, you might get blacklisted by our servers.
- Data: Whatever we send in our current /api/v1/castle endpoint
- Use-Case: Historical analysis
- Rate limitations:
- Castle fleets API (/api/v2/castle_fleets)
- Rate limitations:
- 10 request per second per ip
- 1 request per second per pgid
- This will enable a developer to circle through all 2k castles every 10 seconds if done properly. (max can do 2.5k castles per 10 sec)
- Data: Only send the primarch, gp data (aka troops related)
- Use-Case: Monitoring castles
- Rate limitations:
- Why we needed to make these updates
- Splitting into separate API means we can support user requirements better (real-time alert for attacks while non-real time monitoring for castle information)
- These updates encourages developers to cache data locally instead of requesting data for the same castle multiple times.
We require that developers modify their API in order to improve caching on their end so that players don’t get impacted at all. **We plan on deprecating the old API on June 1, 2023.**
**Please note that V2 APIs are already live for developers to test it out and migrate as soon as possible.**
Comments
0 comments
Article is closed for comments.