View canister storage usage?

I’m implementing a storage bucket like system. Is there a way to view the storage capacity remaining on the canister? Is there a way to view it programmatically?

Sorry if this had an obvious answer on the docs, I’m not the best at finding things. :slight_smile: