# Event API not returning any results

**URL:** https://forums.combatlogforums.com/t/event-api-not-returning-any-results/4620
**Category:** Warcraft Logs
**Created:** [November 10, 2017, 4:40pm UTC](https://forums.combatlogforums.com/t/event-api-not-returning-any-results/4620 "2017-11-10T16:40:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Pernicious](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/pernicious/32/740_2.png) [@Pernicious](https://forums.combatlogforums.com/u/Pernicious)
#### Post date: [November 10, 2017, 4:40pm UTC](https://forums.combatlogforums.com/t/event-api-not-returning-any-results/4620/1 "2017-11-10T16:40:39Z")

</div>

Using PHP to request some event data from the API

$url = [https://www.warcraftlogs.com:443/v1/report/events/KnDf9A4vqL8w6JYP/?api\_key={my\_key\_goes\_here}](https://www.warcraftlogs.com:443/v1/report/events/KnDf9A4vqL8w6JYP/?api_key=%7Bmy_key_goes_here%7D)

$json = file\_get\_contents($url);  
$array = json\_decode($json, true);

print\_r($array);

Returns:

Array  
(  
[events] =\> Array  
(  
)  
)

Did I do something wrong (more like what did I do wrong…)

---

<div class="post-metadata">

### Author: ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)
#### Post date: [November 10, 2017, 4:57pm UTC](https://forums.combatlogforums.com/t/event-api-not-returning-any-results/4620/2 "2017-11-10T16:57:41Z")

</div>

Need to specify start and end times. Use the fights API to get fight start and end time so that you can request the events for the fight you want.

---

<div class="post-metadata">

### Author: ![Pernicious](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/pernicious/32/740_2.png) [@Pernicious](https://forums.combatlogforums.com/u/Pernicious)
#### Post date: [November 10, 2017, 5:40pm UTC](https://forums.combatlogforums.com/t/event-api-not-returning-any-results/4620/3 "2017-11-10T17:40:04Z")

</div>

Thank you. I didn’t realize that was a requirement. I also just tried out the API page widget thingy. I don’t know the technical term obviously, but that is pretty awesome. I can get the url I need and build it in my app. Less testing is always great!
