Get parameters for uploading files

This API is part of a series of API calls you need to make to upload a file to our system.
    <details>
      <summary>
        Click here to see the APIs alongside code examples using cURL
      </summary>
      <ol>
        <li>
          <details>
            <summary>
              This API. It returns a URL (used in step #2) and the file's path (used in step #3):                
            </summary>
            <code class="hljs">curl -H "Authorization: Bearer API_KEY" "https://api.toriihq.com/v1.0/files/url?name={FILE_NAME}&type={CONTENT_TYPE}"</code>
            <hr />
            <code class="hljs">curl -H "Authorization: Bearer API_KEY" "https://api.toriihq.com/v1.0/files/url?name=my_file.json&type=text/csv"</code>
          </details>
        </li>
        <li>
          <details>
            <summary>
              Use the URL returned to upload the file directly to S3:
            </summary>
            <code class="hljs">curl -H "Content-Type: {CONTENT_TYPE}" --data-binary @'PATH/TO/YOUR/FILE' -X PUT "{S3_URL}"</code>
            <hr />
            <code class="hljs">curl -H "Content-Type: text/csv" --data-binary @'~/Downloads/my_file.json' -X PUT "{S3_URL}"</code>
          </details>
        </li>
        <li>
          <details>
            <summary>
              Look for the 'Store file information in DB' API or use the following code snippet:
            </summary>
            <code class="hljs">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"</code>
            <hr />
            <code class="hljs">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"</code>
          </details>
        </li>
      </ol>
    </details>

  • Rate limit: 200 requests per minute

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

File name

string
required
Response

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