Create external file. Requires project.integrations.connect.
Arguments
projectReferenceString!requiredProject ID or slug. Requires project.integrations.connect through the caller's own personal provider connection.
providerExternalFileProvider!requiredStorage provider accessed through the caller's own personal connection. A human caller is required; agent, run, and service-account credentials are refused. One of
onedrive,sharepoint,drive.inputCreateExternalFileInput!requiredinput.folderIdString!requiredParent folder item ID or root.
input.nameString!requiredCreates a new file without replacing an existing one. OneDrive and SharePoint return conflict for an existing name; Google Drive creates a new item with the same name. File name, 1-255 characters without a slash.
input.contentString!requiredFile content, at most 10,000,000 characters as sent.
input.contentEncodingExternalFileContentEncodingutf8 (default) or base64. One of
utf8,base64.input.mimeTypeStringMIME type; derived from the name when omitted.
input.idempotencyKeyString1-128 characters without whitespace. A retry with the same key and input within 24 hours returns the first file instead of creating another.
Responses
mutation CreateExternalFile($projectReference: String!, $provider: ExternalFileProvider!, $input: CreateExternalFileInput!) { createExternalFile(projectReference: $projectReference, provider: $provider, input: $input) { id provider name path mimeType sizeBytes kind parentId modifiedAt etag thumbnailUrl webUrl }}{ "data": { "createExternalFile": { "id": "string", "provider": "string", "name": "string", "path": "string", "mimeType": "string", "sizeBytes": 0, "kind": "string", "parentId": "string", "modifiedAt": "string", "etag": "string", "thumbnailUrl": "https://example.com", "webUrl": "https://example.com" } }}The ExternalStorageFile! in data.createExternalFile.