Upload a file
Files are used to upload documents that can be used with features like Deployments.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Name to store for the uploaded file, including extension when available.
Base64-encoded file contents.
Intended usage category for the uploaded file. Defaults to retrieval when omitted.
FILE_PURPOSE_UNSPECIFIED, FILE_PURPOSE_RETRIEVAL, FILE_PURPOSE_KNOWLEDGE_DATASOURCE, FILE_PURPOSE_BATCH MIME type of the uploaded content, for example application/pdf.
Project the file is created in. Optional: project-scoped API keys default to the key's bound project; workspace-scoped callers default to the workspace's default project.
Response
OK
Newly created file.