Where to find a "Collection ID"?

Hi. So I’m trying to use this “https://rest-mainnet.onflow.org/v1/collections/{id}” from the documentation here developers.flow . com/http-api#tag/Collections to check out the UFC Strike collection. Where do I find the collection id? This is the contract flowscan . org/contract/A.329feb3ab062d289.UFC_NFT where the id at? Is it the “Identifier : UFC_NFT” part? I try this https://rest-mainnet.onflow.org/v1/collections/UFC_NFT and it gives me “invalid format” error. What am I doing wrong here?

Hey there, JimmyGee!

Unfortunately, you’ve fallen victim to a naming collision… :wink: Sorry!

The “Collections” referred to in the REST API at the protocol level are bundles of transactions used to construct a block. They are very different from NFT collections which is what you are interested in. Same word, two very different contexts.

If you want to query applications like UFC Strike, you need to submit a Cadence script that can query the state of various smart contracts and user accounts.

Best of luck!

Hey thanks heaps for the reply. Do you know of any Cadence tutorials or documentation that can help me with querying an NFT collection?