JIRA 4.4.3
Making a call to the REST Api via:
http://jira.composersconcordance.com/rest/api/2.0.alpha1/user?username=lcobo
returns results that show the correct number of groups but a consistently empty group names list:
{"self":"http://jira.composersconcordance.com/rest/api/2.0.alpha1/user?username=lcobo","name":"lcobo","emailAddress":"webmaster@composersconcordance.com","avatarUrl":"http://jira.composersconcordance.com/secure/useravatar?size=large&ownerId=lcobo","displayName":"Luis Andrei Cobo","active":true,"timeZone":"America/New_York","groups":{"size":4,"items":[]},"expand":"groups"}
Notice how the groups size = 4, but items is blank. I read the documentation and it says I should be getting back the names of the groups. This is the call I am making via PHP:
<?php
header("Content-Type: application/json");
$username = $_REQUEST["username"];
$password = $_REQUEST["password"];
$url2 = "http://jira.composersconcordance.com/rest/api/2.0.alpha1/user?username=".$username;
$ch = curl_init();
$headers = array(
'Accept: application/json',
'Content-Type: application/json'
);
curl_setopt($ch,CURLOPT_HEADER, $headers);
curl_setopt($ch,CURLOPT_URL,$url2);
curl_setopt($ch,CURLOPT_USERPWD,$username.":".$password);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.