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

asif khan June 29, 2014

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 votes
Answer accepted
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2014

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

asif khan June 30, 2014

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