Hello
I need to get all worklogs for period for all users and projects via REST API (for PivotGrid and some charts)
If I am setting up project key, I'm getting data for all users:
/rest/tempo-timesheets/3/worklogs?dateFrom=2016-02-07&dateTo=2016-02-21&projectKey=AIPUDJ
But if I'm using url without projectKey (/rest/tempo-timesheets/3/worklogs?dateFrom=2016-02-07&dateTo=2016-02-21), I'm getting data for all projects, but only for user, whos credentials are in use. This user is granted as much permissions as possible - he is admin, he is granted Permission to View Project worklogs and added as default user into all projects. But still can't retriev info about other users. Is it possible to retriev all users for all projects?
Community moderators have prevented the ability to post new answers.
Hi Yaroslav,
when you need to get all the worklogs for a period, for all users and projects, we recommend using the Tempo Servlet (xml export). This will return all worklogs and you can set additional parameters or filters for the export.
Please take a look at https://tempoplugin.jira.com/wiki/display/TEMPO0716/Tempo+Servlet+Manual for more information.
Regards,
Susanne
The API's are a work in progress and with new features, new functionality gets added. As all the Tempo API´s are private and subject to change, it might cause problems when you use them to integrate with other systems.
The Servlet is currently the only public API, so it needs no maintenance when you upgrade Tempo to a new version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello. Is API of Tempo timesheet is working now? From yesterday I get 404 page always in my query url. Could you help me, please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Dmytro, have you found any alternate. I am also facing the same problem.
I have generated the token, but I don't know where I should include that in the api. Please help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for this tip. Tempo Servlet contains everything what I need. Do you have in plans to add same functionality ino rest API? (JSON a bit simple in use in javascript)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sadly, the servlet is not currently working for me so I need an alternative way of doing exactly what this user requested. How can I get the time for all users for a period using the REST API? I tried adding the jira-users group to a team and then specifying the team id but all I got was an empty set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
GET https://YOURDOMAIN.atlassian.net/rest/tempo-timesheets/3/timesheet-approval is not documented at http://tempo.io/doc/timesheets/api/rest/latest/ (
but to get a list of tempo usernames in C#
string json = RestClient.MakeWebClientRequest("https://YOURDOMAIN.atlassian.net/rest/tempo-timesheets/3/timesheet-approval ", encodedCredentials);
Approvals _approvals = new Approvals();
_approvals = Newtonsoft.Json.JsonConvert.DeserializeObject<Approvals>(json);
List<string> names = new List<string>();
foreach (Approval A in _approvals .approvals) // get the list of usernames
{
names.Add(A.user.name);
}
return names;
}
public class Period
{
public string periodView { get; set; }
public string periodId { get; set; }
public string dateFrom { get; set; }
public string dateTo { get; set; }
}
public class User
{
public string self { get; set; }
public string name { get; set; }
public string displayName { get; set; }
public string avatar { get; set; }
}
public class Worklogs
{
public string href { get; set; }
}
public class Approval
{
public User user { get; set; }
public string status { get; set; }
public int workedSeconds { get; set; }
public int submittedSeconds { get; set; }
public int requiredSeconds { get; set; }
public int requiredSecondsRelativeToday { get; set; }
public period { get; set; }
public string smartDateString { get; set; }
public Worklogs worklogs { get; set; }
}
public class Approvals
{
public Period period { get; set; }
public IList<Approval> approvals { get; set; }
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.