# Not getting full list of damage taken from API

**URL:** <https://forums.combatlogforums.com/t/not-getting-full-list-of-damage-taken-from-api/6715>\
**Category:** Warcraft Logs\
**Created:** [July 21, 2018, 9:05pm UTC](https://forums.combatlogforums.com/t/not-getting-full-list-of-damage-taken-from-api/6715 "2018-07-21T21:05:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Illestra](https://avatars.discourse-cdn.com/v4/letter/i/a9a28c/32.png) [@Illestra](https://forums.combatlogforums.com/u/Illestra)\
**Post date:** [July 21, 2018, 9:05pm UTC](https://forums.combatlogforums.com/t/not-getting-full-list-of-damage-taken-from-api/6715/1 "2018-07-21T21:05:17Z")

</div>

I’m trying to pull all of the damage taken for a specific spell ID within a specific log.

The link for the report in Warcraft Logs is:  
[https://www.warcraftlogs.com/reports/mLRnbfNQ2MT74391#type=damage-taken&ability=244761&boss=-2&difficulty=0](https://www.warcraftlogs.com/reports/mLRnbfNQ2MT74391#type=damage-taken&ability=244761&boss=-2&difficulty=0)

The api request link is:  
`requests.get("https://www.warcraftlogs.com:443/v1/report/tables/damage-taken/mLRnbfNQ2MT74391?end=4366072&by=ability&abilityid=244761&encounter=2076&api_key=" + api_key)`

I get the following results from this code:  
`in: details['entries'][0]['targets']`

`out: [{'name': 'Radiantldeal', 'total': 46380977, 'type': 'Priest'}, {'name': 'Metonymy', 'total': 42599053, 'totalReduced': 39814192, 'type': 'Mage'}, {'name': 'Ayriea', 'total': 38669197, 'totalReduced': 31357537, 'type': 'Hunter'}, {'name': 'Illestra', 'total': 33881262, 'totalReduced': 18729996, 'type': 'Shaman'}, {'name': 'Psychodruid', 'total': 33159059, 'type': 'Druid'}]`

I’ve checked the hitCount (305) for the ability and it matches the total hits from the Warcraft Logs link, but can’t seem to get the same number of players.

Is there something I am doing wrong with the query?  
And secondly, is there a way to get the hitCount for individual players from the API?

---

<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:** [July 22, 2018, 1:54pm UTC](https://forums.combatlogforums.com/t/not-getting-full-list-of-damage-taken-from-api/6715/2 "2018-07-22T13:54:41Z")

</div>

You’re not viewing the correct view. You want the by=source not by=ability.

---

<div class="post-metadata">

**Author:** ![Illestra](https://avatars.discourse-cdn.com/v4/letter/i/a9a28c/32.png) [@Illestra](https://forums.combatlogforums.com/u/Illestra)\
**Post date:** [July 23, 2018, 3:45am UTC](https://forums.combatlogforums.com/t/not-getting-full-list-of-damage-taken-from-api/6715/3 "2018-07-23T03:45:20Z")

</div>

Thank you, this fixed the issue 100%
