Upload file
Changed onUpload a new file to the system. Supports various file formats including PDF, DOC, DOCX, PPT, PPTX, JPG, PNG, EML, HTML, SRT, CSV, XLS, and XLSX.
File uploads do not accept team parameters. When you attach a file to a Knowledge Graph, the file inherits the team scope of that Knowledge Graph.
Request
- Base URLhttps://api.writer.com
- URLhttps://api.writer.com/v1/files
- AuthHTTP bearer
Query parameters
The unique identifier of the Knowledge Graph to associate the uploaded file with.
Note: The response from the upload endpoint does not include the graphId field, but the association will be visible when you retrieve the file using the file retrieval endpoint.
Headers
The disposition type of the file, typically used to indicate the form-data name. Use attachment with the filename parameter to specify the name of the file, for example: attachment; filename=example.pdf.
The MIME type of the file being uploaded. Supports txt, doc, docx, ppt, pptx, jpg, png, eml, html, pdf, srt, csv, xls, xlsx, mp3, and mp4 file extensions.
The size of the file in bytes.
Request body text/plain
Response
Changes
- info
added the new optional
queryrequest parametergraphId
- info
- breaking
removed the media type
application/octet-streamfrom the request body - breaking
removed the media type
audio/mpegfrom the request body - breaking
removed the media type
video/mp4from the request body - info
added the media type
message/rfc822to the request body
- breaking