Files

The File object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists.

The File object

Properties


idString
Required

remote_idString
Optional
The third-party API ID of the matching object.

nameString
Optional
The file's name.

file_urlString
Optional
The URL to access the file.

sizeInteger
Optional
The file's size, in bytes.

mime_typeString
Optional
The file's mime type.

descriptionString
Optional
The file's description.

folderString
Optional
The folder that the file belongs to.

remote_created_atString
Optional
When the third party's file was created.

remote_updated_atString
Optional
When the third party's file was updated.

field_mappingsObject
Optional

remote_dataArray
Optional

The File object
JSON
{
"id": "45ce474c-dhcj-43a6-754r-629f799f7d68",
"remote_id": "12",
"name": "omg_common_model_scope.docx",
"file_url": "https://drive.com/1234",
"size": 254,
"mime_type": ".docx",
"description": "This file is OP",
"folder": "56ce474c-asdf-34a2-754r-629f799f7d31",
"remote_created_at": "2022:02:02T00:00:00Z",
"remote_updated_at": "2022:02:03T00:00:00Z",
Show advanced fields
}

GET

/files

Returns a list of File objects.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


created_afterString
Optional
If provided, will only return objects created after this datetime.

created_beforeString
Optional
If provided, will only return objects created before this datetime.

cursorString
Optional
The pagination cursor value.

expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

folder_idString
Optional
If provided, will only return files in this folder. If null, will return files in root directory.

include_deleted_dataBoolean
Optional
Whether to include data that was marked as deleted by third party webhooks.

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.

modified_afterString
Optional
If provided, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

nameString
Optional
If provided, will only return files with this name.

page_sizeInteger
Optional
Number of results to return per page.

remote_idString
Optional
The API provider's ID for the given object.

Response
JSON
{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"id": "45ce474c-dhcj-43a6-754r-629f799f7d68",
"remote_id": "12",
"name": "omg_common_model_scope.docx",
"file_url": "https://drive.com/1234",
"size": 254,
"mime_type": ".docx",
"description": "This file is OP",
"folder": "56ce474c-asdf-34a2-754r-629f799f7d31",
"remote_created_at": "2022:02:02T00:00:00Z",
"remote_updated_at": "2022:02:03T00:00:00Z",
Show advanced fields
}
]
}
Field support by platform

Box

Box

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

Dropbox

Dropbox

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_urlString

folderString

mime_typeString

nameString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

Google Drive

Google Drive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

OneDrive

OneDrive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

SharePoint

SharePoint

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger
Hint: Use the /linked-accounts endpoint to pull platform support information.
POST

/files

Creates a File object with the given values.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


is_debug_modeBoolean
Optional
Whether to include debug fields (such as log file links) in the response.

run_asyncBoolean
Optional
Whether or not third-party updates should be run asynchronously.

Body Parameters


modelObject
Required
Find available fields below under “Model Parameters”.

Model Parameters

View app-specific writable fields under “Field support by platform” in this section.

nameString
The file's name.

file_urlString
The URL to access the file.

sizeInteger
The file's size, in bytes.

mime_typeString
The file's mime type.

descriptionString
The file's description.

folderString
The folder that the file belongs to. Must pass in a valid Merge ID, which can be obtained from the id field in the Folder table.

integration_paramsObject

linked_account_paramsObject

POST v1/files
JSON
{
"model": {
"name": "omg_common_model_scope.docx",
"file_url": "https://drive.com/1234",
"size": 254,
"mime_type": ".docx",
"description": "This file is OP",
"folder": "56ce474c-asdf-34a2-754r-629f799f7d31"
}
}
Response
JSON
{
"model": {
"id": "45ce474c-dhcj-43a6-754r-629f799f7d68",
"remote_id": "12",
"name": "omg_common_model_scope.docx",
"file_url": "https://drive.com/1234",
"size": 254,
"mime_type": ".docx",
"description": "This file is OP",
"folder": "56ce474c-asdf-34a2-754r-629f799f7d31",
"remote_created_at": "2022:02:02T00:00:00Z",
"remote_updated_at": "2022:02:03T00:00:00Z",
Show advanced fields
}
}
Field support by platform

Box

Box

Merge supports Passthrough Requests to this platform's API

Supported POST Model Parameters


descriptionString
Optional

file_urlString
Required

folderString
Optional

mime_typeString
Optional

nameString
Required

remote_created_atString
Optional

remote_idString
Optional

remote_updated_atString
Optional

sizeInteger
Optional

Dropbox

Dropbox

Merge supports Passthrough Requests to this platform's API

Supported POST Model Parameters


file_urlString
Required

folderString
Optional

mime_typeString
Optional

nameString
Required

remote_idString
Optional

remote_updated_atString
Optional

sizeInteger
Optional

Google Drive

Google Drive

Merge supports Passthrough Requests to this platform's API

Supported POST Model Parameters


file_urlString
Required

folderString
Optional

mime_typeString
Required

nameString
Required

remote_created_atString
Optional

remote_idString
Optional

remote_updated_atString
Optional

sizeInteger
Optional

OneDrive

OneDrive

Merge supports Passthrough Requests to this platform's API

Supported POST Model Parameters


file_urlString
Required

folderString
Optional

mime_typeString
Required

nameString
Required

remote_created_atString
Optional

remote_idString
Optional

remote_updated_atString
Optional

sizeInteger
Optional

SharePoint

SharePoint

Merge supports Passthrough Requests to this platform's API

Supported POST Model Parameters


file_urlString
Required

folderString
Optional

mime_typeString
Required

nameString
Required

remote_created_atString
Optional

remote_idString
Optional

remote_updated_atString
Optional

sizeInteger
Optional

Additional POST Parameters


integration_paramsObject
Required
drive_merge_idString
Required
Hint: Use the /linked-accounts endpoint to pull platform support information.
GET

/files/{id}

Returns a File object with the given id.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

idString
Required

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.
Response
JSON
{
"id": "45ce474c-dhcj-43a6-754r-629f799f7d68",
"remote_id": "12",
"name": "omg_common_model_scope.docx",
"file_url": "https://drive.com/1234",
"size": 254,
"mime_type": ".docx",
"description": "This file is OP",
"folder": "56ce474c-asdf-34a2-754r-629f799f7d31",
"remote_created_at": "2022:02:02T00:00:00Z",
"remote_updated_at": "2022:02:03T00:00:00Z",
Show advanced fields
}
Field support by platform

Box

Box

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

Dropbox

Dropbox

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_urlString

folderString

mime_typeString

nameString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

Google Drive

Google Drive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

OneDrive

OneDrive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

SharePoint

SharePoint

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger
Hint: Use the /linked-accounts endpoint to pull platform support information.
GET

/files/meta/post

Returns metadata for FileStorageFile POSTs.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Response
JSON
{
"request_schema": {},
"remote_field_classes": {},
"status": {
"linked_account_status": "string",
"can_make_request": true
},
"has_conditional_params": true,
"has_required_linked_account_params": true
}
Field support by platform

Box

Box

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

Dropbox

Dropbox

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_urlString

folderString

mime_typeString

nameString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

Google Drive

Google Drive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

OneDrive

OneDrive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


descriptionString

file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger

SharePoint

SharePoint

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_urlString

folderString

mime_typeString

nameString

remote_created_atString

remote_dataArray

remote_idString

remote_updated_atString

sizeInteger
Hint: Use the /linked-accounts endpoint to pull platform support information.