# 1.8 Alpha2 API Stats - Cannot Specify mediaID By Itself

**URL:** https://community.xibo.org.uk/t/1-8-alpha2-api-stats-cannot-specify-mediaid-by-itself/5349
**Category:** Developer Experience
**Created:** [March 10, 2016, 4:59am UTC](https://community.xibo.org.uk/t/1-8-alpha2-api-stats-cannot-specify-mediaid-by-itself/5349 "2016-03-10T04:59:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cslaughter](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/cslaughter/32/186_2.png) [@cslaughter](https://community.xibo.org.uk/u/cslaughter)
#### Post date: [March 10, 2016, 4:59am UTC](https://community.xibo.org.uk/t/1-8-alpha2-api-stats-cannot-specify-mediaid-by-itself/5349/1 "2016-03-10T04:59:16Z")

</div>

Continuing the discussion from [1.8 Alpha2 API stats - Not Required … Required](https://community.xibo.org.uk/t/1-8-alpha2-api-stats-not-required-required/4548):

> [@1.8 Alpha2 API stats - Not Required .... Required](https://community.xibo.org.uk/t/1-8-alpha2-api-stats-not-required-required/4548/1):
>
> It seems with the API we cannot request a displayId or mediaId without specifying fromDt and toDt. In the swagger documentation everything says not required. You can however send nothing and get everything, based on the API’s predefined search range.
> 
> Update: Not sure why, this started working. Please close this non-issue.

It started working because our code was defaulting to the first and last day of the current month as the fromDt and toDt.

So we still need to specify that information, is this by design?

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [March 11, 2016, 12:26pm UTC](https://community.xibo.org.uk/t/1-8-alpha2-api-stats-cannot-specify-mediaid-by-itself/5349/2 "2016-03-11T12:26:08Z")

</div>

If you don’t provide a from/to date then it will default to the previous 24 hours - I should make a note of this on the swagger doc. (i’ll do that now as it happens)

---

<div class="post-metadata">

### Author: ![cslaughter](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/cslaughter/32/186_2.png) [@cslaughter](https://community.xibo.org.uk/u/cslaughter)
#### Post date: [March 14, 2016, 1:16am UTC](https://community.xibo.org.uk/t/1-8-alpha2-api-stats-cannot-specify-mediaid-by-itself/5349/3 "2016-03-14T01:16:54Z")

</div>

What I have found that it ignores the other parameters completely if we don’t at least specify fromDt OR toDt.

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [March 14, 2016, 8:14am UTC](https://community.xibo.org.uk/t/1-8-alpha2-api-stats-cannot-specify-mediaid-by-itself/5349/4 "2016-03-14T08:14:51Z")

</div>

I’ve tried every which way to recreate this and can’t. I think we might need some logging over a period where this happened.
