Files in responses

Files uploaded by users are saved in Toloka. A JSON sample with file information and key descriptions are shown below.

You can get metadata for files and download files to your computer:

JSON sample

{
  "id" : "0983459b-e26f-42f3-a5fd-6e3feee913e7",
  "attachment_type" : "ASSIGNMENT_ATTACHMENT",
  "name" : "ExampleAttachment.txt",
  "details" : {
    "user_id" : "ae1d5431cfc59e25b4abbbe75666d59b",
    "assignment_id" : "5241f238-6640-43e4-80bb-3283893cd221",
    "pool_id" : "154"
  },
  "created" : "2016-05-25T16:14:27.748",
  "media_type" : "application/octet-stream"
}

Keys

Key

Value

Data type

id

File ID.

String

attachment_type

Attachment type. Currently the key can have only one value — ASSIGNMENT_ATTACHMENT.

String

name

File name.

String

details

Infomation about the pool, the task, and the user who uploaded the file.

JSON

details.user_id

ID of the user who uploaded the file.

String

details.assignment_id

ID of the task suite assignment to a user.

String

details.pool_id

Pool ID.

String

created

The date when the file was uploaded to Toloka.

String

media_type

MIME type of the data.

String