Skip to main content
POST
Move a file asynchronously

Authorizations

Authorization
string
header
required

IDM-issued JWT. Obtain via the IDM authentication flow and pass as: Bearer

Headers

X-ActionId
string
default:""

A logging ID of the request. It is propagated through Phrase systems, making it easier to connect logs from various services. If no ActionId is sent with a request, one will be generated by Bifrost and returned with the response.

X-Webhook
string
default:""
required

Required on /async/... endpoints. Bifrost POSTs the operation result to this URL once the connector finishes processing. Omitting this header on an async endpoint returns 400.

Body

application/json

Request payload for moving one Google Drive file to another folder.

A move is a strict relocation: the same file (same fileId, same name) ends up in the destination folder. It is never replaced by a copy, and no other file is overwritten, replaced or deleted. A file with the same name already in the destination does not block the move. Authentication is provided via connectorUuid.

connectorUuid
string
default:""
required

UUID of a configured connector that holds stored Google Drive credentials.

Example:

"b9c06f76-4a44-4d2e-8a26-3d1e4b47e123"

source
object
required

The file to move, together with where you expect it to be.

fileId is required. The last element of parentChain must be the file's direct parent, with an id, exactly as returned by list-files (a file directly in My Drive has the parent { "id": "root", "name": "My Drive" }). An empty parentChain means the drive root. name is informational: the file keeps its name.

The move happens only if the file is in that expected parent. If it is already in the destination folder, the request succeeds without a change. Otherwise the request is rejected with MOVE_SOURCE_NOT_AT_EXPECTED_LOCATION.

destination
object
required

The folder to move the file into.

  • With folderId, that folder is used directly. It must be an accessible folder.
  • Without folderId, name is required. parentChain and name are resolved like the target of upload-raw-file: parents with an id are used directly, named parents are looked up by name, and a missing named folder is created (only when the file is actually going to be moved). When several folders have the same name, the oldest one (by creation time, then by id) is used.

The destination must be in the same drive as the file: My Drive, or the same shared drive. A destination in another drive is rejected with MOVE_UNSUPPORTED.

configuration
any
default:""

Connector configuration for this request. Currently unused, but reserved for future configuration flags.

Example:
{key}
any

Response

Successful operation. If X-ResponseType is set to 'ID' or no value is sent in the header, the file is saved and can be retrieved by sending a GET request to this endpoint. If X-ResponseType is set to 'OBJECT', the file is returned as a stream.

webhookUrl
string
default:""

Webhook URL you supplied in the request

requestId
string
default:""

Request ID you can use to retrieve the result

{key}
any