createExternalFile

Create external file. Requires project.integrations.connect.

Arguments

  • projectReferenceString!required

    Project ID or slug. Requires project.integrations.connect through the caller's own personal provider connection.

  • providerExternalFileProvider!required

    Storage 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!required

  • input.folderIdString!required

    Parent folder item ID or root.

  • input.nameString!required

    Creates 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!required

    File content, at most 10,000,000 characters as sent.

  • input.contentEncodingExternalFileContentEncoding

    utf8 (default) or base64. One of utf8, base64.

  • input.mimeTypeString

    MIME type; derived from the name when omitted.

  • input.idempotencyKeyString

    1-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.