# API Request

**URL:** https://forum.beeminder.com/t/api-request/1428
**Category:** uncategorized
**Created:** [May 16, 2013, 2:36pm UTC](https://forum.beeminder.com/t/api-request/1428 "2013-05-16T14:36:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Joseph\_Paravisini](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/joseph_paravisini/32/697_2.png) [@Joseph\_Paravisini](https://forum.beeminder.com/u/Joseph_Paravisini)
#### Post date: [May 16, 2013, 2:36pm UTC](https://forum.beeminder.com/t/api-request/1428/1 "2013-05-16T14:36:47Z")

</div>

Would it be possible to add either an additional api method or some  
optional parameters to the existing get datapoints call?  
I would love to be able to grab both the last logged data point and  
datapoints only within a specific date range. Two of my scripts rely on  
last data input, so I find myself parsing through the entire dataset each  
time a call is made.  
Thanks!

---

<div class="post-metadata">

### Author: ![apb](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/apb/32/100_2.png) [@apb](https://forum.beeminder.com/u/apb)
#### Post date: [May 17, 2013, 7:51am UTC](https://forum.beeminder.com/t/api-request/1428/2 "2013-05-17T07:51:33Z")

</div>

Hi Joseph - this is a good idea and would probably save us some work on the  
server side if we don’t have to send all the datapoints every time.

I had a similar need for the ios app, and solved it with the combination of  
diff\_since and skinny (see the docs on the User endpoint for more info).

There’s also the datapoints\_count on the Goal endpoint, but NB the caveat -  
it sorts by the time the datapoint was added, not the time that it was  
measured.

Any chance that using those would be a workaround for the time being? We  
can probably support the kind of direct filtering you’re talking about as  
well, but I’m not sure when we’ll get to implementing and testing it.

-Andy

On Thursday, May 16, 2013 3:36:47 PM UTC+1, Joseph Paravisini wrote:

> Would it be possible to add either an additional api method or some  
> optional parameters to the existing get datapoints call?  
> I would love to be able to grab both the last logged data point and  
> datapoints only within a specific date range. Two of my scripts rely on  
> last data input, so I find myself parsing through the entire dataset each  
> time a call is made.  
> Thanks!

---

<div class="post-metadata">

### Author: ![Joseph\_Paravisini](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/joseph_paravisini/32/697_2.png) [@Joseph\_Paravisini](https://forum.beeminder.com/u/Joseph_Paravisini)
#### Post date: [May 17, 2013, 1:09pm UTC](https://forum.beeminder.com/t/api-request/1428/3 "2013-05-17T13:09:31Z")

</div>

Hey Andy  
Thanks, but I don’t think those options will do what I need necessarily.  
Right now, it’s honestly not too big of a deal since the dataset is still  
very small, so if you guys will be doing it in the next year or so that  
would be fine. To remediate unnecessary calls to your servers, I just  
created a table that logs data that I send to you guys and uses that it’s  
place. The one shortcoming is it won’t protect from data I manually enter,  
but it’s totally fine for now.

El viernes, 17 de mayo de 2013 03:51:33 UTC-4, [an...@andybrett.com](mailto:an...@andybrett.com) escribió:

> Hi Joseph - this is a good idea and would probably save us some work on  
> the server side if we don’t have to send all the datapoints every time.
> 
> I had a similar need for the ios app, and solved it with the combination  
> of diff\_since and skinny (see the docs on the User endpoint for more info).
> 
> There’s also the datapoints\_count on the Goal endpoint, but NB the caveat
> 
> - it sorts by the time the datapoint was added, not the time that it was  
> measured.
> 
> Any chance that using those would be a workaround for the time being? We  
> can probably support the kind of direct filtering you’re talking about as  
> well, but I’m not sure when we’ll get to implementing and testing it.
> 
> -Andy
> 
> On Thursday, May 16, 2013 3:36:47 PM UTC+1, Joseph Paravisini wrote:
> 
> > Would it be possible to add either an additional api method or some  
> > optional parameters to the existing get datapoints call?  
> > I would love to be able to grab both the last logged data point and  
> > datapoints only within a specific date range. Two of my scripts rely on  
> > last data input, so I find myself parsing through the entire dataset each  
> > time a call is made.  
> > Thanks!
