Skip to content
Philipp Wolfer edited this page May 14, 2013 · 4 revisions
* GET /project/{projectId}/job/{jobId}/document Request: =GET /project/{projectId}/job/{jobId}/document= Downloads the source document for a job. The document will be transferred as binary data in the response body. ** Request headers |Header|Description| |-+-| |Authorization|[[Authorization and authentication][oAuth 2 authentication header]]| ** Response status codes |HTTP status|Description| |-+-| |200 Ok|Successful request.| |404 Not Found|The job or project with the given ID does not exist or the job has no source document.| ** Response headers |Header|Description| |-+-| |Content-Type|The content type of the source document.| |Content-Disposition|Always =attachment; filename={filename}=, where ={filename}= indicates the file name of the downloaded document.| |Last-Modified|The date the document was last modified.| ** Example Download the source document for the job with the ID =d0c30471-7c70-45d4-bcc1-a7773cb352bd=, where the source document is a plain text file: #+BEGIN_EXAMPLE GET /v1/project/bc141454-5949-401b-9c05-7591ee2f5624/job/d0c30471-7c70-45d4-bcc1-a7773cb352bd/document HTTP/1.1 Host: api.textking.com Authorization: Bearer youraccesstoken #+END_EXAMPLE Response: #+BEGIN_EXAMPLE HTTP/1.1 200 Ok Content-Type: text/plain Content-Disposition: attachment; filename=MyFile.txt Last-Modified: Tue, 14 Aug 2012 10:53:14 GMT Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. #+END_EXAMPLE

Clone this wiki locally