I am trying to use the UCS REST API to move an existing user from one OU to another.
For testing, I am using this cURL command:
curl -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -H 'If-Match: "4ec61010c15aef4d59e3746aa6bdfb531f88b9e9"' 'https://user:password@ucs-server.org/univention/udm/users/user/uid%3Dusername%2Cou%3DSOURCE%2Cou%3Dtwo%2Cou%3Dthree%2Cdc%3Dcity%2Cdc%3Dorg%2Cdc%3Dde' --data @mydata.json
and mydata.json
contains the following text:
{
"dn": "uid=username,ou=source,ou=two,ou=three,dc=city,dc=org,dc=de",
"position": "ou=target,ou=three,dc=city,dc=org,dc=de",
"properties": {
}
}
The “dn” describes the user as it is now, and “position” is adjusted to reflect the new location where the user should be moved to.
Unfortunately, this does not work (user is not moved) and this is what I get as response:
{"finished": false, "errors": false, "_links": {"curies": [{"href": "https://ucs-server.org/univention/udm/relation/{rel}", "name": "udm", "templated": true}]}, "id": "42465069-d8b6-4315-81a4-f42d91d47ffc"}
So…
First question: what is it this response is trying to tell me?
And second question: How do I move a user instead?
Thanks!