Search code examples
trello

trello API are id values unique across all objects


as the subject says - are the id values of all objects unique? For example is it possible (not probable) for a card to share the same id of a list/board etc ?

My guess would be 'yes' but just wanted to check.

Thanks.


Solution

  • The id values are meant to be unique across all accounts and all objects.

    The ids are in fact the document _ids associated with the records in the mongo database. They are required to be unique per collection (i.e. no two lists or members should ever have the same _id). See this other question about the probability of an _id collision. (In short, there shouldn't be any collisions)

    In fact, the Trello web client and API depend on the ids being unique, so it should be safe for you to make the same assumption.