Downloading file using API request

looks similar to the following post: