Create a file

Creates a file.

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

owner/namespace uid

string
required

catalog id

Body Params

file

string
string
enum
  • FILE_TYPE_TEXT: text
  • FILE_TYPE_PDF: PDF
  • FILE_TYPE_MARKDOWN: MARKDOWN
  • FILE_TYPE_PNG: PNG(not supported yet)
  • FILE_TYPE_JPEG: JPEG(not supported yet)
  • FILE_TYPE_JPG: JPG(not supported yet)
  • FILE_TYPE_HTML: HTML
  • FILE_TYPE_DOCX: DOCX
  • FILE_TYPE_DOC: DOC
  • FILE_TYPE_PPT: PPT
  • FILE_TYPE_PPTX: PPTX
  • FILE_TYPE_XLS: XLS
  • FILE_TYPE_XLSX: XLSX
  • FILE_TYPE_CSV: CSV
string
externalMetadata
object
string

objectUid in blob storage. user can upload to blob storage directly, then put objectUid here. then no need the base64 encoding for the file content.

string

Pipeline used for converting the file to Markdown if the file is a document (i.e., a file with pdf, doc[x] or ppt[x] extension). The value identifies the pipeline release and and MUST have the format {namespaceID}/{pipelineID}@{version}. The pipeline recipe MUST have the following variable and output fields:

variable:
  document_input:
    title: document-input
    description: Upload a document (PDF/DOCX/DOC/PPTX/PPT)
    type: file

The convert_result output should be a list of strings, one per page.

output:
 convert_result:
   title: convert-result
   value: ${merge-markdown-refinement.output.results[0]}

Other variable and output fields will be ignored.

The pipeline will be executed first, falling back to the catalog's conversion pipelines if the conversion doesn't yield a non-empty result (see the catalog creation endpoint documentation).

For non-document catalog files, the conversion pipeline is deterministic (such files are typically trivial to convert and don't require a dedicated pipeline to improve the conversion performance).

Responses

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