Last active
August 29, 2015 14:06
-
-
Save pcdinh/b63a60e285707a1a84ef to your computer and use it in GitHub Desktop.
FileString file sharing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /2.0/file | |
{ | |
"file": { | |
"id": "<string>", | |
"location": { | |
"proto": "file", | |
"name": "<string>", | |
"path": "<string>", | |
"is_dir": false | |
}, | |
"content": { | |
"file_format": 4, | |
"checksum": { | |
"origin": "<string>", | |
"encrypted": null|"<string>", | |
"converted": null|"<string>" | |
}, | |
"size": { | |
"origin": <int>, | |
"encrypted": null|<int>, | |
"converted": null|<int> | |
} | |
}, | |
"created_time": "<string>", | |
"modified_time": "<string>" | |
}, | |
"loc": { | |
"lat": <float>|null, | |
"lon": <float>|null | |
}, | |
"action": { | |
"share": { | |
"recipients": { | |
"filestring": ["<uid>", ...], | |
"emails": ["<string>", ...], | |
"groups": ["<group-id>", ...] | |
}, | |
"sharing": { | |
"key": "<string>", | |
"file": { | |
"printable": true|false, | |
"watermarked": true|false, | |
"expired_time": null|"<string>", | |
"perms": ['reshare', 'view'] | |
} | |
} | |
} | |
} | |
} | |
Response: | |
{ | |
"meta": {}, | |
"body": { | |
"rev": <int>, | |
"results": { | |
"<file-id-1>": { | |
"status": { | |
"code": 1, | |
"message": null | |
}, | |
"performed": { | |
"<uid-1>": { | |
"change": "shared"|null, | |
"identity": "<string>", | |
"status": { | |
"code": <int>, | |
"message": null|"<string>" | |
} | |
}, | |
"<uid-2>": { | |
"change": "shared"|null, | |
"identity": "<string>", | |
"status": { | |
"code": <int>, | |
"message": null|"<string>" | |
} | |
} | |
} | |
}, ... | |
} | |
} | |
} | |
Sample | |
{ | |
"body":{ | |
"rev":1, | |
"results":{ | |
"4093eab6-449c-11e4-acef-00155de2e332":{ | |
"status":{ | |
"message":null, | |
"code":1 | |
}, | |
"performed":{ | |
"6cf77769-d5d3-39fa-96f2-20dd9219250d":{ | |
"status":{ | |
"message":null, | |
"code":2 | |
}, | |
"change":"shared", | |
"identity":"[email protected]" | |
}, | |
"97f430c0-5ab7-3d92-a6be-c3baa1d4c840":{ | |
"status":{ | |
"message":null, | |
"code":2 | |
}, | |
"change":"shared", | |
"identity":"[email protected]" | |
}, | |
"2a25af76-d579-354c-8d76-6fd2722d1865":{ | |
"status":{ | |
"message":null, | |
"code":2 | |
}, | |
"change":"shared", | |
"identity":"[email protected]" | |
}, | |
"4c0137b2-17e4-3fe0-87ed-ab4f3e185606":{ | |
"status":{ | |
"message":null, | |
"code":2 | |
}, | |
"change":"shared", | |
"identity":"[email protected]" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment