Upload local file
Uploads a file.
Introduction
You can use this endpoint to upload your local file and then use the file_key
you obtained to create a data source through the Create data source endpoint.
Only files with the following extensions are supported: .csv, .tsv, .md, .mdx, .json, .txt, .pdf, .pptx, .ppt, .doc, .docx, .xls, or .xlsx.
Example request:
Example response:
Authorizations
Headers
The trace ID you set in your system to trace this request. It can be up to 128 characters in length. If the request fails, you can provide it to the Powerdrill team to help with troubleshooting.
Body
The file to be uploaded. This is a required field and should contain the file data. For example, --form 'file=@"/Users/jiaoqi/Downloads/0f9a7ebd-7a2a-454a-8cd9-96accffa3107.csv"'
.
Your user ID, which uniquely identifies you within your team. To obtain your ID:
- If you're the team admin, refer to Check user information.
- If you're a system or virtual user, ask your team admin to check your user ID by referring to Check user information.
Response
Status code. 0 indicates that the operation is successful. Otherwise, the operation fails. For error troubleshooting, refer to Error Codes.
The returned data object.