code to retrieve a list of project assigned to an account(admin>tempotimesheets>AccountManager)

Hi,

I have to retrieve a list a projects assigned to an account.How can i do that?Please suggest me any code which i can include in my script.

When i had to retrieve a list of groups assigned to a user i used a code which looks like this:

function getGroups(user)

{

var groups;

var fixedURL = "/rest/api/2/user?username=";

AJS.$.ajax({

url: fixedURL+user+"&expand=groups",

type: 'get',

dataType: 'json',

async: false,

success: function(data) {

groups = data.groups.items;

}

});

return groups;

}...

Can you please suggest me a code like this which brings me the list of projects assigned to an account?

Thanks in advance

Regards,

Asif

1 answer

1 accepted

0 vote
Timothy Chin Community Champion Jun 29, 2014

You can check Tempo's API using the REST Browser (https://developer.atlassian.com/display/DOCS/Using+the+REST+API+Browser).

Hi Timothy,

I have installed REST API browser. But iam not sure how tod the code i want.When I click on send aftr setting parameters in the browser, nothing happens. I expect browser to give me the code after clicking on send.

Thank You,

Asif

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

70 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you