Problems with the REST API post a new user


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[1]="test full name";


$url = "http://build2.fugro/youtrack/rest/admin/user?";

curl_setopt($session, CURLOPT_URL, $url);

$xml = "login=" . $parts[0] . "&" . "fullName=" . $parts[1] . "&" . "email=" . $parts[2];

curl_setopt ($session, CURLOPT_POSTFIELDS, $xml);

$response = curl_exec($session);

echo $response."\n\n";

1 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.


Please sign in to leave a comment.