Problems with the REST API post a new user Follow
I have automated creation a a couple of hundred users, using POST via the REST API. The accounts were created, and look ok, but we cannot login to them as we do not know the passwod.
Is there a default password?
here is some sample code, which creates the users without trouble.
// Tell curl to use HTTP POST
curl_setopt ($session, CURLOPT_POST, true);
$parts="test full name";
$url = "http://build2.fugro/youtrack/rest/admin/user?";
curl_setopt($session, CURLOPT_URL, $url);
$xml = "login=" . $parts . "&" . "fullName=" . $parts . "&" . "email=" . $parts;
curl_setopt ($session, CURLOPT_POSTFIELDS, $xml);
$response = curl_exec($session);
Please sign in to leave a comment.
Passwords are generated for the imported users. So users should request password restore e-mail from the login page. If the restore link is missing you should enable and configure e-mail on the /settings page of your YouTrack instance.