I would like to store some arbitary data against each card in the Trello API (at the moment only a single numerical value from 0 to 100, but if this works well then I'll shift more card-related data from my own app over to trello).
I cannot see anything like this available in the API docs, am I correct?
I may have to store a comment with json data in it against each card. Or maybe a better way?
Thanks!
Trello recently added the ability to store an arbitrary amount of labels on each card. These labels can either be color coded (which causes them to show up in the board display in Trello) or have no color (which causes them only to be displayed on the card detail display). For small amounts of arbitrary data (such as a single number as you described) this may be a reasonable option for you.
You can create the label and add it to a card in one call with:
POST /1/cards/[card id or shortlink]/labels
(reference - https://trello.com/docs/api/card/index.html#post-1-cards-card-id-or-shortlink-labels)
If you have a larger amount of data to store for which labels may not be sufficient, I would suggest adding a checklist to store your data. Checklist items that are marked as complete can be hidden in the interface. That could be helpful in making the UI a little cleaner with large amounts of data. If you use each checklist item as a separate data object, you could probably develop a very flexible data structure to store whatever you want.
For more detail on how to interact with checklists and checkitems you can read the documentation here - https://trello.com/docs/api/checklist/index.html