POST https://cloud.seafile.com/api2/repos/public/
Request parameters
r
or rw
, default r
.Sample request, create an encrypted public repo with rw
permission
curl -X POST -d "name=test-public-repo&permission=rw&passwd=password" -H 'Authorization: Token f2210dacd9c6ccb8133606d94ff8e61d9b477fd' -H 'Accept: application/json; indent=4' https://cloud.seafile.com/api2/repos/public/
Sample response
{
"owner_nickname": "lian",
"permission": "rw",
"encrypted": true,
"mtime_relative": "<time datetime=\"2016-05-31T12:01:49\" is=\"relative-time\" title=\"Tue, 31 May 2016 12:01:49 +0800\" >1 second ago</time>",
"mtime": 1464667309,
"owner": "lian@lian.com",
"id": "6553fd8b-bf3e-41ad-a481-90c8523d3b4a",
"size": 0,
"name": "test-public-repo",
"desc": "",
"size_formatted": "0 bytes"
}
Errors
PUT https://cloud.seafile.com/api2/shared-repos/{repo-id}/?share_type=public
Request parameters
public
r
or rw
.Sample request, create an encrypted public repo with rw
permission
curl -X PUT -H 'Authorization: Token f2210dacd9c6ccb8133606d94ff8e61d9b477fd' -H 'Accept: application/json; indent=4' 'https://cloud.seafile.com/api2/shared-repos/2deffbac-d7be-4ace-b406-efb799083ee9/?share_type=public&permission=rw'
Sample response
success
Errors
DELETE https://cloud.seafile.com/api2/shared-repos/{repo-id}/?share_type=public
Request parameters
Sample request
curl -X DELETE -H 'Authorization: Token f2210dacd9c6ccb8133606d94ff8e61d9b477fd' -H 'Accept: application/json; indent=4' https://cloud.seafile.com/api2/shared-repos/dae8cecc-2359-4d33-aa42-01b7846c4b32/?share_type=public
Success
"success"
Errors