Upload file
Uploads a file.
Introduction
You can use this endpoint to upload your local file and then use the fileKey
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 media type of the resource.
The ID of the data agent. If no data agent ID is available or you want to use the general mode, set it to GENERAL.
The external trace ID. The length ranges from 0 to 128 characters.
Body
The full path to the file.
Only files with the following extensions are supported: .csv, .tsv, .md, .mdx, .json, .txt, .pdf, .pptx, .ppt, .doc, .docx, .xls, or .xlsx.
Response
Status code. 0 indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include:
- 100: Bad request.
- 201: Request frequency limit.
- 9999: Internal error.
- 100001: Invalid operation.
The returned data object.