Store file information in DB

This API is part of a series of API calls you need to make to upload a file to our system.
Click here to see the APIs alongside code examples using cURL
  1. Look for the 'Get parameters for uploading files' API or use the following code snippet: curl -H "Authorization: Bearer API_KEY" "https://api.toriihq.com/v1.0/files/url?name={FILE_NAME}&type={CONTENT_TYPE}"
    curl -H "Authorization: Bearer API_KEY" "https://api.toriihq.com/v1.0/files/url?name=my_file.json&type=text/csv"
  2. Use the URL returned to upload the file directly to S3. curl -H "Content-Type: {CONTENT_TYPE}" --data-binary @'PATH/TO/YOUR/FILE' -X PUT "{S3_URL}"
    curl -H "Content-Type: text/csv" --data-binary @'~/Downloads/my_file.json' -X PUT "{S3_URL}"
  3. This API. It returns a unique file identifier. curl -d '{"path":"{FILE_PATH}","type":"{FILE_TYPE}"}' -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" "https://api.toriihq.com/v1.0/files"
    curl -d '{"path":"1629889604893/my_file.json","type":"expenseReport"}' -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" "https://api.toriihq.com/v1.0/files"

  • Rate limit: 200 requests per minute

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

The path to the file on S3: <Timestamp/Filename>

string
enum
required

File type

Allowed:
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
*/*