OCS Rest API
Available Capabilities
Request Path | Method | Content Type |
---|---|---|
|
|
|
To retrieve a list of your ownCloud server’s available capabilities, you
need to make an authenticated GET
request, as in the example below.
curl --silent -u admin:admin \ 'http://localhost/ocs/v1.php/cloud/capabilities?format=json' | json_pp
The example uses json_pp to make the response easier to read, and omits some content for the sake of brevity.
This will return a JSON response, similar to the example below, along with a status of: HTTP/1.1 200 OK
.
{
"ocs" : {
"data" : {
"capabilities" : {
"notifications" : {
"ocs-endpoints" : [
"list",
"get",
"delete"
]
},
"files" : {
"blacklisted_files" : [
".htaccess"
],
"bigfilechunking" : true,
"privateLinks" : true,
"privateLinksDetailsParam": true,
"undelete" : true,
"versioning" : true
},
"checksums" : {
"preferredUploadType" : "SHA1",
"supportedTypes" : [
"SHA1"
]
},
"files_sharing" : {
"default_permissions" : 31,
"user" : {
"send_mail" : false
},
"federation" : {
"incoming" : true,
"outgoing" : true
},
"resharing" : true,
"user_enumeration" : {
"enabled" : true,
"group_members_only" : false
},
"api_enabled" : true,
"group_sharing" : true,
"share_with_group_members_only" : true,
"public" : {
"enabled" : true,
"password" : {
"enforced" : {
"read_only" : true,
"read_write" : true,
"upload_only" : true
},
"enforced" : true
},
"multiple" : true,
"social_share" : true,
"send_mail" : false,
"upload" : true,
"expire_date" : {
"enabled" : false
},
"supports_upload_only" : true
}
},
"dav" : {
"chunking" : "1.0"
},
"core" : {
"webdav-root" : "remote.php/webdav",
"status" : {
"edition" : "Community",
"installed" : "true",
"needsDbUpgrade" : "false",
"versionstring" : "10.0.3",
"productname" : "ownCloud",
"maintenance" : "false",
"version" : "10.0.3.3"
},
"pollinterval" : 30000
}
}
}
},
"meta": {
"itemsperpage": "",
"message": "OK",
"status": "ok",
"statuscode": 200,
"totalitems": ""
}
}
In the example, in the capabilities
element, you can see that the
server lists six capabilities, along with their settings, sub-settings,
and their values.
Core
Stored under the core
capabilities element, this returns the server’s
core status settings, the interval to poll for server side changes in milliseconds, and
it’s WebDAV API root.
Checksums
Stored under the checksums
capabilities element, this returns the
server’s supported checksum types, and preferred upload checksum type.
Files
Stored under the files
capabilities element, this returns the server’s support for the following capabilities:
Capability | Response Key |
---|---|
Big file chunking |
|
File versioning |
|
Can provide a private link to a file or folder in a DAV response |
|
Its ability to undelete files; and |
|
The list of files that are currently blacklisted. |
|
Files Sharing
Stored under the files_sharing
capabilities element, this returns the
server’s support for file sharing, re-sharing (by users and groups),
federated file support, and public link shares (as well as whether
passwords and expiry dates are enforced), and also whether the sharing
API is enabled.