Files

A File object represents a file or folder on your Files.com site. The type field is file for files and directory for folders.

Download File

XML Element

<filescom:download-file />

Authorization Requirement

Available to all authenticated keys or sessions.

ParameterDescription
path
String
Required
Path to operate on.

Example Operation

<filescom:download-file config-ref="FilesCom" path="path" />

Upload File

XML Element

<filescom:upload-file />

Authorization Requirement

Available to all authenticated keys or sessions.

ParameterDescription
path
String
Required
Path to operate on.
content
Content
Required
Content to be written into the file.

Example Operation

<filescom:upload-file config-ref="FilesCom" path="path" />

The above example uses the payload as the content. You can also specify the content explicitly in the operation:

Example Operation

<filescom:upload-file config-ref="FilesCom" path="path">
  <filescom:content><![CDATA[File content]]></filescom:content>
</filescom:upload-file>

Example Response Payload

{
  "path": "path/file.txt",
  "createdById": 1,
  "createdByApiKeyId": 1,
  "createdByAs2IncomingMessageId": 1,
  "createdByAutomationId": 1,
  "createdByBundleRegistrationId": 1,
  "createdByInboxId": 1,
  "createdByRemoteServerId": 1,
  "createdBySyncId": 1,
  "customMetadata": {
    "department": "finance"
  },
  "displayName": "file.txt",
  "type": "file",
  "size": 1024,
  "createdAt": "2000-01-01T01:00:00Z",
  "lastModifiedById": 1,
  "lastModifiedByApiKeyId": 1,
  "lastModifiedByAutomationId": 1,
  "lastModifiedByBundleRegistrationId": 1,
  "lastModifiedByRemoteServerId": 1,
  "lastModifiedBySyncId": 1,
  "mtime": "2000-01-01T01:00:00Z",
  "providedMtime": "2000-01-01T01:00:00Z",
  "crc32": "70976923",
  "md5": "17c54824e9931a4688ca032d03f6663c",
  "sha1": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
  "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "mimeType": "application/octet-stream",
  "region": "us-east-1",
  "permissions": "rwd",
  "subfoldersLocked?": true,
  "isLocked": true,
  "downloadUri": "https://mysite.files.com/...",
  "directConnectionInfo": {
    "version": 1,
    "serverName": "example",
    "addresses": [
      "example"
    ],
    "directUri": "example",
    "caPem": "example"
  },
  "priorityColor": "red",
  "previewId": 1,
  "preview": {
    "id": 1,
    "status": "complete",
    "downloadUri": "https://mysite.files.com/...",
    "type": "image",
    "size": "large"
  }
}

Find File/Folder by Path

XML Element

<filescom:show-file />

Authorization Requirement

Available to all authenticated keys or sessions.

ParameterDescription
path
String
Required
Path to operate on.

Example Operation

<filescom:show-file config-ref="FilesCom" path="path" />

Example Response Payload

{
  "path": "path/file.txt",
  "createdById": 1,
  "createdByApiKeyId": 1,
  "createdByAs2IncomingMessageId": 1,
  "createdByAutomationId": 1,
  "createdByBundleRegistrationId": 1,
  "createdByInboxId": 1,
  "createdByRemoteServerId": 1,
  "createdBySyncId": 1,
  "customMetadata": {
    "department": "finance"
  },
  "displayName": "file.txt",
  "type": "file",
  "size": 1024,
  "createdAt": "2000-01-01T01:00:00Z",
  "lastModifiedById": 1,
  "lastModifiedByApiKeyId": 1,
  "lastModifiedByAutomationId": 1,
  "lastModifiedByBundleRegistrationId": 1,
  "lastModifiedByRemoteServerId": 1,
  "lastModifiedBySyncId": 1,
  "mtime": "2000-01-01T01:00:00Z",
  "providedMtime": "2000-01-01T01:00:00Z",
  "crc32": "70976923",
  "md5": "17c54824e9931a4688ca032d03f6663c",
  "sha1": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
  "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "mimeType": "application/octet-stream",
  "region": "us-east-1",
  "permissions": "rwd",
  "subfoldersLocked?": true,
  "isLocked": true,
  "downloadUri": "https://mysite.files.com/...",
  "directConnectionInfo": {
    "version": 1,
    "serverName": "example",
    "addresses": [
      "example"
    ],
    "directUri": "example",
    "caPem": "example"
  },
  "priorityColor": "red",
  "previewId": 1,
  "preview": {
    "id": 1,
    "status": "complete",
    "downloadUri": "https://mysite.files.com/...",
    "type": "image",
    "size": "large"
  }
}

List Folders by Path

XML Element

<filescom:list-folders />

Authorization Requirement

Available to all authenticated keys or sessions.

ParameterDescription
path
String
Required
Path to operate on.

Example Operation

<filescom:list-folders config-ref="FilesCom" path="path" />

Example Response Payload

[
  {
    "path": "path/file.txt",
    "createdById": 1,
    "createdByApiKeyId": 1,
    "createdByAs2IncomingMessageId": 1,
    "createdByAutomationId": 1,
    "createdByBundleRegistrationId": 1,
    "createdByInboxId": 1,
    "createdByRemoteServerId": 1,
    "createdBySyncId": 1,
    "customMetadata": {
      "department": "finance"
    },
    "displayName": "file.txt",
    "type": "file",
    "size": 1024,
    "createdAt": "2000-01-01T01:00:00Z",
    "lastModifiedById": 1,
    "lastModifiedByApiKeyId": 1,
    "lastModifiedByAutomationId": 1,
    "lastModifiedByBundleRegistrationId": 1,
    "lastModifiedByRemoteServerId": 1,
    "lastModifiedBySyncId": 1,
    "mtime": "2000-01-01T01:00:00Z",
    "providedMtime": "2000-01-01T01:00:00Z",
    "crc32": "70976923",
    "md5": "17c54824e9931a4688ca032d03f6663c",
    "sha1": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
    "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "mimeType": "application/octet-stream",
    "region": "us-east-1",
    "permissions": "rwd",
    "subfoldersLocked?": true,
    "isLocked": true,
    "downloadUri": "https://mysite.files.com/...",
    "directConnectionInfo": {
      "version": 1,
      "serverName": "example",
      "addresses": [
        "example"
      ],
      "directUri": "example",
      "caPem": "example"
    },
    "priorityColor": "red",
    "previewId": 1,
    "preview": {
      "id": 1,
      "status": "complete",
      "downloadUri": "https://mysite.files.com/...",
      "type": "image",
      "size": "large"
    }
  }
]

Create Folder

XML Element

<filescom:create-folder />

Authorization Requirement

Available to all authenticated keys or sessions.

ParameterDescription
path
String
Required
Path to operate on.

Example Operation

<filescom:create-folder config-ref="FilesCom" path="path" />

Example Response Payload

{
  "path": "path/file.txt",
  "createdById": 1,
  "createdByApiKeyId": 1,
  "createdByAs2IncomingMessageId": 1,
  "createdByAutomationId": 1,
  "createdByBundleRegistrationId": 1,
  "createdByInboxId": 1,
  "createdByRemoteServerId": 1,
  "createdBySyncId": 1,
  "customMetadata": {
    "department": "finance"
  },
  "displayName": "file.txt",
  "type": "file",
  "size": 1024,
  "createdAt": "2000-01-01T01:00:00Z",
  "lastModifiedById": 1,
  "lastModifiedByApiKeyId": 1,
  "lastModifiedByAutomationId": 1,
  "lastModifiedByBundleRegistrationId": 1,
  "lastModifiedByRemoteServerId": 1,
  "lastModifiedBySyncId": 1,
  "mtime": "2000-01-01T01:00:00Z",
  "providedMtime": "2000-01-01T01:00:00Z",
  "crc32": "70976923",
  "md5": "17c54824e9931a4688ca032d03f6663c",
  "sha1": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
  "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "mimeType": "application/octet-stream",
  "region": "us-east-1",
  "permissions": "rwd",
  "subfoldersLocked?": true,
  "isLocked": true,
  "downloadUri": "https://mysite.files.com/...",
  "directConnectionInfo": {
    "version": 1,
    "serverName": "example",
    "addresses": [
      "example"
    ],
    "directUri": "example",
    "caPem": "example"
  },
  "priorityColor": "red",
  "previewId": 1,
  "preview": {
    "id": 1,
    "status": "complete",
    "downloadUri": "https://mysite.files.com/...",
    "type": "image",
    "size": "large"
  }
}

Delete File/Folder

XML Element

<filescom:delete-file />

Authorization Requirement

Available to all authenticated keys or sessions.

ParameterDescription
path
String
Required
Path to operate on.

Example Operation

<filescom:delete-file config-ref="FilesCom" path="path" />

Copy File/Folder

XML Element

<filescom:copy-file />

Authorization Requirement

Available to all authenticated keys or sessions.

ParameterDescription
path
String
Required
Path to operate on.
destination
String
Required
Copy destination path.

Example Operation

<filescom:copy-file config-ref="FilesCom"
 path="path"
 destination="destination"
/>

Example Response Payload

{
  "status": "pending",
  "fileMigrationId": 1
}

Move File/Folder

XML Element

<filescom:move-file />

Authorization Requirement

Available to all authenticated keys or sessions.

ParameterDescription
path
String
Required
Path to operate on.
destination
String
Required
Move destination path.

Example Operation

<filescom:move-file config-ref="FilesCom"
 path="path"
 destination="destination"
/>

Example Response Payload

{
  "status": "pending",
  "fileMigrationId": 1
}