Files API

Attach new file to a subject

POST /rest/v2/subjects/:subject_id/files

This method attaches file to a subject

Parameters

Name Description
base64_content File in base64
file_name File name

Request

Headers

Accept: application/json
Content-Type: application/json

Route

POST /rest/v2/subjects/92751901/files

Body

{
  "file_name": "hello_world.txt",
  "file": {
    "base64_content": "IWRscm93ICxvbGxlSA==",
    "file_name": "hello_world.txt"
  }
}

Response

Headers

Content-Type: application/json; charset=utf-8

Status

201 Created

Body

{
  "file": {
    "n_subj_file_id": 93749701,
    "base64_content": "IWRscm93ICxvbGxlSA==",
    "file_name": "hello_world.txt"
  }
}