Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,482
Community Members
 
Community Events
165
Community Groups

Getting 504 error from /checklists Endpoint

Hello Community,

We are collecting data for all checklists present in all the boards. So, we are collecting all the boards from "/boards" endpoint and for all the boards, we are collecting the respective checklists using "/boards/board-id-1/checklists" endpoint.

But recently we are facing 504 errors during these API Calls. Is it an issue from Trello's side or we are doing something wrong here?

The error we are encountering:


"504 Server Error: Gateway Timeout for URL: https://api.trello.com/1/boards/my-board-id/checklists?fields=all&checkItem_fields=all"


Thanks.

1 answer

0 votes
Felix Atlassian Team May 03, 2022

Hey @hp

Likely what's going on here is that your board has a lot of checklists, and it's taking Trello longer than the time allowed (30 seconds) to process and return them. Technically, this is something we need to fix. We don't use this API internally in our clients, so it's not optimized for large boards at this point.

I would suggest in the meantime you switch to a different API call, that lets you paginate through cards and checklists on those cards - this should enable you to get all checklists from a board (albeit requires writing more logic).

A call like api.trello.com/1/boards/<my-board-id>/cards?fields=&checklists=all&limit=100&since=<last-seen-card-id> should get you what you need

 

Felix

Thank you @Felix for the response.

We have tried updating this call, but we have 2 points:

  1. The limit param for pagination is not working for this endpoint: "/boards/board-id-1/checklists". If any other pagination mechanism is available, then it would be helpful
  2. In the current API Call: "https://api.trello.com/1/boards/my-board-id/checklists?fields=all&checkItem_fields=all". Due to the fields params, we are getting all the fields, but with this change, we are not getting any of this extra fields, only basic fields are included in checklists key for cards records.
    Example of response from old API "/boards/board-id-1/checklists":
    {
        "checkItems": [],
        "id": "my-Checklist-ID-1",
        "name": "Checklist 1",
        "idBoard": "my-board-1",
        "idCard": "my-Card-ID-10",
        "pos": 16381.0,
        "limits": {
            "checkItems": {
                "perChecklist": {
                    "status": "ok",
                    "disableAt": 200,
                    "warnAt": 160
                }
            }
        },
        "creationMethod": null
    }
    Example of response from your suggested API change:
    {
        "id": "my-Card-ID-10",
        ...,
        "idChecklists": [
            "my-Checklist-ID-1",
            "my-Checklist-ID-2"
        ],
        "checklists": [
            {
                "name": "Checklist 1",
                "idBoard": "my-board-1",
                "idCard": "my-Card-ID-10",
                "pos": 16381.0,
                "id": "my-Checklist-ID-1",
                "checkItems": []
            },
            {
                "name": "Checklist 2",
                "idBoard": "my-board-1",
                "idCard": "my-Card-ID-10",
                "pos": 16382.0,
                "id": "my-Checklist-ID-2",
                "checkItems": []
            }
        ]
    }

    Is there any way to get all the fields of checklists from "/cards" endpoint.
Felix Atlassian Team May 04, 2022

1. Yes, the `/checklists` endpoint doesn't support pagination currently

2. Looks like you're just missing `limits`? I don't think that's currently available via the `/cards` route. Same with `creationMethod` - also currently not available.

Why do you need these fields?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Trello

Taco Tuesday: New years' resolutions with Trello

Congratulations to @Laura Holton , our latest winner of Taco Tuesday! And thanks to @Kristján Geir Mathiesen for sharing the picture of Taco having fun with his new friend  B...

2,313 views 28 40
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you