Preview. This site is still being built. Features, prices and terms may change, and nothing here is a binding offer. Read the preview notice

Preview. Still being built; nothing here is a binding offer. Details

Drive sync

16 routes. Paths are relative to https://api.intersink.com/v1.

All groups

Your shared links (?target_id)

GET/drive/shares

Needs a signed-in user (Bearer token or access_token cookie).

Response

200. The payload in data is not described in the spec yet.

Share: { target_type: file|sync_file|asset, target_id, expires_in (s) | expires_at, max_downloads?, password?, label? } → token once

POST/drive/shares

Needs a signed-in user (Bearer token or access_token cookie).

Response

201. The payload in data is not described in the spec yet.

Revoke a link now

DELETE/drive/shares/{id}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Response

200. The payload in data is not described in the spec yet.

Open a shared link (anyone with it): { password? } → signed URLs

POST/drive/shares/open/{token}

Public: no sign-in needed.

Parameters

NameTypeDescription
tokenrequiredstring, path

Response

200. The payload in data is of type object.

Store one block (application/octet-stream, ≤ 16 MiB). Plain: id = SHA-256 of the bytes. Encrypted: X-Block-Encrypted: 1 and X-Block-Sha256 of the ciphertext.

PUT/drive/sync/v1/blocks/{id}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Response

200. The payload in data is of type object.

Which of these blocks the server lacks: { blocks: [id…] } → { missing } (≤ 2000)

POST/drive/sync/v1/blocks/check

Needs a signed-in user (Bearer token or access_token cookie).

Response

200. The payload in data is not described in the spec yet.

Signed download links for blocks you hold: { blocks: [id…] } (≤ 2000)

POST/drive/sync/v1/blocks/urls

Needs a signed-in user (Bearer token or access_token cookie).

Response

200. The payload in data is not described in the spec yet.

Changes after ?cursor (0 = from the start), oldest first: { changes, cursor, has_more }

GET/drive/sync/v1/changes

Needs a signed-in user (Bearer token or access_token cookie).

Response

200. The payload in data is not described in the spec yet.

Current files (?prefix=/folder/, ?limit, ?offset)

GET/drive/sync/v1/files

Needs a signed-in user (Bearer token or access_token cookie).

Response

200. The payload in data is not described in the spec yet.

One file with its block list

GET/drive/sync/v1/files/{id}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Response

200. The payload in data is of type object.

The file's block list and the blocks you lack: { have: [block ids you hold] }

POST/drive/sync/v1/files/{id}/diff

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Response

200. The payload in data is of type object.

Restore a kept version as the newest one: { version }

POST/drive/sync/v1/files/{id}/restore

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Response

200. The payload in data is of type object.

Kept versions (the last 20)

GET/drive/sync/v1/files/{id}/versions

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
idrequiredstring, path

Response

200. The payload in data is not described in the spec yet.

Commit a version: { path, base_version (0 = new), blocks, size?, content_hash?, encrypted?, enc_header?, client_mtime? }; 409 on a conflict

POST/drive/sync/v1/files/commit

Needs a signed-in user (Bearer token or access_token cookie).

Response

200. The payload in data is of type object.

Delete: { path, base_version }

POST/drive/sync/v1/files/delete

Needs a signed-in user (Bearer token or access_token cookie).

Response

200. The payload in data is of type object.

Move or rename: { from, to, base_version }

POST/drive/sync/v1/files/move

Needs a signed-in user (Bearer token or access_token cookie).

Response

200. The payload in data is of type object.