Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Duplicate actions through requesting REST API

Vantroeyen Eric February 9, 2018

Hello

 

through a script I browse all lists of a board, and request all the actions of each list.

In the final result, some actions are duplicated.

 

How can I avoid it?

What is the reason?

 

Thanks in advance

1 answer

1 accepted

1 vote
Answer accepted
Oscar Triscon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2018

Are you paginating (i.e. requesting further actions with the since or before parameters)?

Vantroeyen Eric February 9, 2018

I'm not sure to understand what paginating means  or to what parameter it refers to.

I think the answer is no.

Here is the command I use is : /lists/[idList]/cards 

and I don't have any argument

Oscar Triscon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2018

Are you requesting the cards or the actions?

If you're not paginating, I know of no case of duplication in results returned by the Trello API (and I use it a lot). Have you considered the possibility of a bug in your script?

Vantroeyen Eric February 9, 2018

I'm not sure to understand what paginating means  or to what parameter it refers to.

I think the answer is no.

Here is the command I use is : /lists/idList/cards 

and I don't have any argument

Vantroeyen Eric February 9, 2018

sorry for the previous answer.

 

I'm requesting actions linked to a list '/lists/idlist/actions'

Oscar Triscon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2018

Paginating means performing multiple requests to obtain further items. When enumerating a resource, the Trello API will return a reasonable number of items on your first request (you can set that with the limit parameter). If you need more items, you issue a follow-up request specifying the before parameter.

As I said, I'm not aware of the API returning duplicate actions. I assume you are not confusing two similar actions as the same (they can be told apart by their id). Worse comes to worse, you can simply ignore an action if you've seen its id before.

Vantroeyen Eric February 9, 2018

Thanks 

I haven't seen the limit parameter in the documentation, it may be the solution,

Have you any link on the documentation about it ?

Oscar Triscon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2018
Vantroeyen Eric February 9, 2018

MARVELOUS. 

thanks 

Vantroeyen Eric February 10, 2018

In the documentation on Actions Nested Resource it says that we can use the following parameters:

  • limit
  • page
  • format

but in the paragraph Nested Actions with Query Params in the curl example it uses 

  • actions_limit

limit and page are not working on the curl example, meanwhile actions_format accept the count parameter.

So, I don't understand when or how to use limit and page

I have a board with more than 1000 actions, I'd like to access those above 1000.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events