Sets the owner of the document or folder at the specified path.
/srv.asmx/SetOwner
/srv.asmx/SetOwner?authenticationTicket=...&Path=...&NewOwnerUserName=...&ApplytoTree=.../srv.asmx/SetOwner (form data)http://tempuri.org/SetOwner| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
Path |
string | Yes | Full path to the document or folder. |
NewOwnerUserName |
string | Yes | The username of the new owner. |
ApplytoTree |
bool | Yes | If true and the path is a folder, recursively sets the owner on all subfolders and documents. Ignored for documents. |
<response success="true" error="" />
When ApplytoTree=true and some items could not be updated, a multi-status response is returned:
<response success="false" error="Some items could not be updated">
<logitem path="/Finance/Reports/locked.pdf" error="Document is locked" />
<logitem path="/Finance/Reports/subfolder" error="Access denied" />
</response>
<response success="false" error="[ErrorCode] Error message" />
Change ownership permission (ActionId 10) on the target document or folder.
GET /srv.asmx/SetOwner
?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&Path=/Finance/Reports/Q4Report.pdf
&NewOwnerUserName=jsmith
&ApplytoTree=false
HTTP/1.1
GET /srv.asmx/SetOwner
?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&Path=/Finance/Reports
&NewOwnerUserName=jsmith
&ApplytoTree=true
HTTP/1.1
POST /srv.asmx/SetOwner HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&Path=/Finance/Reports/Q4Report.pdf
&NewOwnerUserName=jsmith
&ApplytoTree=false
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://tempuri.org/">
<soap:Body>
<tns:SetOwner>
<tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>
<tns:Path>/Finance/Reports/Q4Report.pdf</tns:Path>
<tns:NewOwnerUserName>jsmith</tns:NewOwnerUserName>
<tns:ApplytoTree>false</tns:ApplytoTree>
</tns:SetOwner>
</soap:Body>
</soap:Envelope>
ApplytoTree parameter.ApplytoTree=true on a folder, the operation attempts to update every subfolder and document. If some items fail (e.g., due to locks or permissions), a multi-status response with <logitem> details is returned.GetOwner.TransferUser* family of APIs.| Error | Description |
|---|---|
[900] Authentication failed |
Invalid or missing authentication ticket. |
[901] Session expired or Invalid ticket |
The ticket has expired or does not exist. |
| Path is required | The Path parameter was empty or null. |
| NewOwnerUserName is required | The NewOwnerUserName parameter was empty or null. |
| Path not found | The specified document or folder does not exist. |
| User not found | The specified NewOwnerUserName does not exist. |
| Access denied | The calling user lacks permission to change ownership. |
SystemError:... |
An unexpected server-side error occurred. |