Api not returning all timeslips

i am finding that where more than one timeslip with same date exists within
the same project the api does not return all timeslips

has anybody else encountered this?

Hi,

Thanks for the explanation. Please provide me an example how to process the
next links.

Thanks,
Pavan

Pavan,

When you make requests that return a collection the results will be
paginated. When you get a response from us for a paginated endpoint we
include a response body and headers. One of these headers is the Link
header for pagination.

The link header looks like the following:

Link:
https://api.freeagent.com/v2/invoices?page=4&per_page=50; rel=“prev”,
https://api.freeagent.com/v2/invoices?page=6&per_page=50; rel=“next”,
https://api.freeagent.com/v2/invoices?page=1&per_page=50; rel=“first”,
https://api.freeagent.com/v2/invoices?page=10&per_page=50; rel=“last”

Notice how there are links to the previous, next, first and last pages of
results. These links allow you to make further requests for different pages
of results. Also notice that we provide the ability to change the number of
results per page using the per_page
parameter. By default this is 25 items per page but we do allow up to 100
items per page.

As such to retrieve all timeslips you would do the following:

Cheers,
Murray SummersOn Monday, June 16, 2014 2:54:31 PM UTC+1, pavan kumar wrote:

Hi,

Thanks for the explanation. Please provide me an example how to process
the next links.

Thanks,
Pavan

Hello Ned,

Could you please attach an example request so that we can investigate
further?

Regards,
Murray SummersOn Thursday, June 12, 2014 3:51:15 PM UTC+1, Ned Evans wrote:

i am finding that where more than one timeslip with same date exists
within the same project the api does not return all timeslips

has anybody else encountered this?

Thanks. Will update the code as required and update the status.

ThanksOn Jun 17, 2014 2:26 PM, “Murray Summers” murray@freeagent.com wrote:

Pavan,

When you make requests that return a collection the results will be
paginated. When you get a response from us for a paginated endpoint we
include a response body and headers. One of these headers is the Link
header for pagination.

The link header looks like the following:

Link:
https://api.freeagent.com/v2/invoices?page=4&per_page=50; rel=“prev”,
https://api.freeagent.com/v2/invoices?page=6&per_page=50; rel=“next”,
https://api.freeagent.com/v2/invoices?page=1&per_page=50; rel=“first”,
https://api.freeagent.com/v2/invoices?page=10&per_page=50; rel=“last”

Notice how there are links to the previous, next, first and last pages of
results. These links allow you to make further requests for different pages
of results. Also notice that we provide the ability to change the number of
results per page using the per_page
parameter. By default this is 25 items per page but we do allow up to 100
items per page.

As such to retrieve all timeslips you would do the following:

Cheers,
Murray Summers

On Monday, June 16, 2014 2:54:31 PM UTC+1, pavan kumar wrote:

Hi,

Thanks for the explanation. Please provide me an example how to process
the next links.

Thanks,
Pavan


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/_lT9IDtzgkM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Hello Murray,

The problem here’s below:

Aim:- We want to retrieve all the Active tasks for a project which
doesn’t have any time slips

Approach:- We’re following the below approach

  1. Get all the timeslips in the systems and get their corresponding task
    ids
  2. Get all the tasks for a project, and ignore the task ids if they’re
    present in the above list

Problem Facing:-
Ex:-

  1. For one of my project has 2 tasks
  2. These 2 tasks have time slips present and along with them there are 2
    other timeslips which are not related to these tasks
  3. When am retrieving all the timeslips, out of 4 , am getting only 2 that
    they’re not part of this project task.

This is the problem that we’re facing. Please let us know, if you need more
details.

Thanks,
Pavan

Pavan and Ned,

Thank you for the clarification.

When retrieving all of the timeslips are you ensuring to retrieve all the
results by iterating across all the pages? Retrieving all timeslips is a
paginated resource:

https://dev.freeagent.com/docs/introduction#pagination

Cheers,
Murray SummersOn Friday, June 13, 2014 7:41:29 PM UTC+1, pavan kumar wrote:

Hello Murray,

The problem here’s below:

Aim:- We want to retrieve all the Active tasks for a project which
doesn’t have any time slips

Approach:- We’re following the below approach

  1. Get all the timeslips in the systems and get their corresponding task
    ids
  2. Get all the tasks for a project, and ignore the task ids if they’re
    present in the above list

Problem Facing:-
Ex:-

  1. For one of my project has 2 tasks
  2. These 2 tasks have time slips present and along with them there are 2
    other timeslips which are not related to these tasks
  3. When am retrieving all the timeslips, out of 4 , am getting only 2 that
    they’re not part of this project task.

This is the problem that we’re facing. Please let us know, if you need
more details.

Thanks,
Pavan