OCS User Sync API

Introduction

This endpoint triggers user-sync for a specific user.

  • Path: ocs/v2.php/cloud/user-sync/<userid>

  • Method: POST

Requirements

This endpoint can only be executed by a user with admin privileges. We suggest creating a technical user who is in the admin group to run this command with.

Request Parameters

Attribute Type Description

userid

string

The id of the user to trigger a sync for.

Returns

The request returns the following status codes.

Status Code When…​

HTTP 200 OK

The user sync was executed.

HTTP 404 Not Found

The supplied user id is unknown.

HTTP 409 Conflict

Multiple users have been found for the given user id.

Example Responses

<?xml version="1.0"?>
<ocs>
    <meta>
        <status>ok</status>
        <statuscode>200</statuscode>
        <message/>
        <totalitems></totalitems>
        <itemsperpage></itemsperpage>
    </meta>
    <data/>
</ocs>

Code Example