Ahhh. Got it. In the get resource snippet the id of the main document will be used, not of the linked resource.