Get resource

GET: /resources/<resource_uuid>
Request params
Parameters Description
project_id Project ID, needed when requesting a resource that was uploaded by another user - e.g. as a project’s translation
fetch (optional) possible values: false - (default) do not fetch content ; base64 - fetch content, base64 encoded
Response params
Parameters Description
type text | file
length File size in bytes.
file_name Only for files.
file_mime Only for files.
download_url URL to download as file (currently str link to the API call “Download resource”...)
content base64 encoded (only if fetch=”base64”)

Request Example

curl  --request GET "https://www.onehourtranslation.com/api/2/resources/rsc-5270f421267822-79952796?secret_key=<SECRET_KEY>&public_key=<PUBLIC_KEY>&project_id=654321"

Response Example

{
 "status":
  {
  "code":0,
  "msg":"ok"
  },
 "results":
  {
  "type":"file",
  "length":103,
  "file_name":"test.txt",
  "file_mime":"text\/plain",
  "download_url":"http:\/\/www.onehourtranslation.com\/api\/2\/resources\/rsc-527116d8f07a02-60735023\/download"
  },
 "errors":[]
}