Documentum REST API to get file content as binary

We have a Java application which is deployed on cloud and uses Documentum REST API to connect with Documentum. Our requirement is to get file content as binary. We have the documentumid and currently we are using this API to get file binary -

@GetMapping("/objects/{id}/content-media")
ResponseEntity<byte[]> getFileContent(@PathVariable("id") String documentumId);

This API is not working consistently. For few files we are able to get content as binary, but in majority this API returns null. Is there any other efficient way to get file content as binary using Documentum REST API?

Appreciate any inputs.

Tagged: