Not signed in (Sign In)

API

pulling date-specific data

Bottom of Page

1 to 4 of 4

  1.  
  1.  

    We're building a dashboard tool to look at some of our productivity numbers (billable hours, etc.) and I need to be able to pull date-specific data such as current week, current month, and current year.

    The question is, how do I do that with a string like this:
    https://api.myintervals.com/time/?

    Can i put in a variable for the dates (and if so, what are they) so that they will be constantly updating and I won't have to go in and change them all of the time.

    Thanks!

    • jprado
    • Jun 21st 2012 edited @ 06/21/2012 2:41 pm
     

    The date filter variables are datebegin and dateend. For more details on the filters for this list take a look at the allowed filters under the collection section of this page:

    https://www.myintervals.com/api/resource.php?r=time

    The date format needs to be in ISO 8601 format (yyyy-mm-dd)

    This would return this month's time

    https://api.myintervals.com/time/?datebegin=2012-06-01&dateend=2012-06-30

    You'd have to write code that outputs the dates by doing date calculations based on the current date. That should be dependent on the language you are using so I can't really give advice on how to do that.

  2.  

    The challenge is, i'm not using any code. I'm using a dashboard tool (Klipfolio) that will pull in data via the API, so all I have to do is provide it with the right query and it pulls in the data. I've got it working where it will pull in the data just like you have, but want it to always be set for the current month instead of having to update it each month.

    Is there a way to put in a dynamic variable that your API will interpret as the current month / or day?

  3.  
    The time list unfortunately doesn't have that type of filter right now. There currently isn't a dynamic variable for filtering time based on a date range name (this year, this month, current year, etc). I would suggest making a feature request submission via the application. The link is located in the footer on the left. Once you do it will get passed to our dev team and handled accordingly.

Comments are closed.
For more Intervals help documentation, please visit help.myintervals.com