From the docs I've successfully been able to create a document in Salesforce using Inserting a New Document. I'd like to be able to link this document to multiple cases. From what I understand, it appears I need to use ContentDocument and ContentDocumentLink objects to achieve this.
How can this be achieved with the rest api? I see they have an example for how to create a ContentVersion in the docs, but they don't explain how to create a ContentDocument and get its Id to associate it to the ContentVersion