Can you JSON export percentage completion of checklist on cards in a board?

Luc Esplin April 13, 2021

I'm using coupler.io to export data from a Trello board into google sheets. It has a JSON exporter option and I can export titles of checklists and other items related to checklists by using this: https://api.trello.com/1/cards/{card-id}/checklists?key={API-key}&token={server-token}

But I can't seem to find anything related to exporting percentage completion of the checklists within a card.

Is there an option to export the percentage completion of a checklist in a card using the export method above?

Thanks :)

1 answer

0 votes
Felix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 13, 2021

If you use the card API, there's a thing called "badges" ( api.trello.com/1/cards/:cardId/badges or api.trello.com/1/cards/:cardId?badges=true )

 

That includes `checkItems` and `checkItemsChecked` values, from which it should be really easy to calculate a percentage.

Luc Esplin April 13, 2021

Hi Felix,

If I called this API would I only be able to get the checkItems from one card? There are over 700 cards on our board so I need to find some way of exporting the checklist data from Trello all at the same time. 

So at the moment I'm using this API call: https://api.trello.com/1/boards/:boardID/checklists

Felix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 14, 2021

Ah, if you need all the cards, you'll want to use something like: api.trello.com/1/boards/:idBoard/cards?badges=true&fields=id,badges&filter=visible

 

Some notes:

- use filter to narrow down the cards you're fetching, "open" is all cards that are not archived, but includes cards in lists that are archived, "visible" is all cards that are not archived, and not in lists that are archived. Most of the time you'll want "visible"

- use fields to narrow down the fields on the cards you're requesting to only the ones you need; makes the API as fast as can be for your use-case

For more info check out the docs: https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-cards-get

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events