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

Getting 504 error from /checklists Endpoint

hp May 3, 2022

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
Atlassian Team members are employees working across the company in a wide variety of roles.
May 3, 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

hp May 4, 2022

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
Atlassian Team members are employees working across the company in a wide variety of roles.
May 4, 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
AUG Leaders

Atlassian Community Events