You are reading an outdated version of this documentation. Please check out the latest version of the developer manual.


This document provides a quick overview of the OCS API endpoints supported in Nextcloud.

All requests need to provide authentication information, either as a Basic Auth header or by passing a set of valid session cookies, if not stated otherwise.

Testing requests with curl

All OCS requests can be easily tested out using curl by specifying the request method (GET, PUT, etc) and setting a request body where needed.

For example: you can perform a GET request to get information about a user:

curl -u username:password -X GET '' -H "OCS-APIRequest: true"

User metadata

Since: 11.0.2, 12.0.0

This request returns the available metadata of a user. Admin users can see the information of all users, while a default user only can access it’s own metadata.

GET /ocs/v1.php/cloud/users/USERID
<?xml version="1.0"?>