Clockify API: Time Report for Project and aggregate by User - api

I would like to create a report for one Clockify project (I do know its ID) agregated by users.
The result would be like this:
Project XY
User 1: XX (grouped duration)
User 2: YY (grouped duration)
User 3: ZZ (grouped duration)
etc.
Is there any better way than iterating through all users calling this API?
/workspaces/{$workspace_id}/user/{$user_id}/time-entries?project={$project_id}&start={$start}&end={$end}
This is too slow and the request return only 50 time entries. Our projects have hundreds (some projects even thousends) of entries.

From the documentation if you go down to Find time entries for user on workspace you can see that the page-size parameter has a default value of 50. So if you change it to 10000 let's say, you can get away with just 1 query per user.

Related

GMail API search results using 'after' not returning full results

I'm having a bit of trouble with a GMail API implementation. I'm running a query that is returning only a partial data set of emails. (This is the first time that I am retrieving emails for this account, so I want to retrieve some deeper historic records as a base, before moving forward with a daily increment retrieval.)
I am using the 'after' operator, and using the Unix Epoch seconds as the value.
When I enter the same "after:" search into the Search bar on the Google website for this account, I get 598 emails (for 60 days back), and 292 emails (for 30 days back). When I use the API, I only get 103 (and this is after letting it paginate over all the results; the initial 'page' is only 100 email IDs; the 2nd Page then has 3.)
Here are a couple of the query URLs that I am hitting:
https://content.googleapis.com/gmail/v1/users/me/messages?q=after%3A1619045685
https://content.googleapis.com/gmail/v1/users/me/messages?q=after%3A1616453916
Any ideas? Is there an internal limit that I'm hitting? Is there some setting that I haven't set?
Thanks.

Find the user logged in to application how many times with different version

I have a Oracle table which has record of frequent logins with different versions of applications. for Version_1 there is one entry but for Version_2 there are 8 entries. These 8 entries are having different time stamps(different milli sec). I want to find out for each user howmany times he is logging in to the Version_2 application. Here we can take Minutes to remove duplicate records.
Here is the sample data with column names
I want to find out the each user has logged in how many time excluding the duplicate entry(these entries have different time stamps with change in milli seconds).
Try this query
SELECT count(emp_id) as log_number,app_version FROM YOUR_TABLE_NAME WHERE
app_version like 'VER_2';

Cross-project time-record filtering using Active Collab 5 API

For Active Collab team watching this tag.
I am working on a project that uses new Active Collab 5 API, I am having performance issue trying to run reports.
Example I try to build reports on date-range, and currently to achieve that I need to first run a call to get all projects.
Followed by a loop with this call:
API::get('/projects/'.$id.'/time-records/filtered-by-date?' . http_build_query(['from' => $from, 'to' => $to]))
However we have a large number of projects, in addition to high number of active projects we also need to filter Archived projects as well to get correct reports for billing.
Now I work with around 1500 projects in AC.
So I need to make 1500 API calls which takes a huge performance hit. Is there a way that you can possibly build something that would work along these lines.
API::get(/timerecords/filter-by-date);
with a possible passed parameter that will say (all, active, complited) project state.
Please let me know what you can do or if I have missed something in your documentation that already does this.
Thanks
What you need here is not a request that goes through all projects one by one, but a request that it tailored for cross-project reporting. Active Collab 5 has just the right API endpoint for that - /reports/run.
As an example, you can use this command to query time records and expenses from all active projects that were tracked today:
curl -H "X-Angie-AuthApiToken: YOUR-API-TOKEN" "http://your.activecollab.com/api/v1/reports/run?type=TrackingFilter&project_filter=active&tracked_on_filter=today"
Notice the route (/reports/run) and query arguments:
type - specify type of the report, in this case time and expense tracking report,
project_filter - specify project filter. Apart from active, other useful values of this filter are completed (for completed projects), selected_1,2,3,4 (selected projects with a list of project ID-s), client_1,2,3,4 (projects for clients with the given ID-s), category_1,2,3,4 (projects in categories with the given ID-s),
tracked_on_filter - filter by the date when records were tracked. To target a particular date use selected_date_YYYY-MM-DD and to target a date range use selected_range_YYYY-MM-DD:YYYY-MM-DD.
tracked_by_filter - filter by who tracked the time. It can have various values, like anybody, logged_user, selected_1,2,3.
To list only time records, set type_filter to time (or to expenses if you want only expenses to be listed).

Newest Twitter API to get followers handle

Using the latest Twitter API is there a way to get your followers handles? I don't know the correct term for this but I am referring to their name with that # symbol. For example: #MyTwitterHandle
The code I am looking for would do this.
///Necessary Twitter Code
Outputs:
Your followers are:
1. #IFollowYou
2. #MyTwitterHandle
etc...
35k more followers etc...
The most efficient way to do it is a two-step process:
Get all user IDs with followers/ids. This lets you get 5000 at a time.
Perform a users/lookup, which will give you the screen_name. This gives you 180 requests every 15 minutes for 100 users at a time.
This will take you about a half hour if everything is working well. The alternative, using followers/list, will take you over 3 hours because you only get 200 users in a 30 minute window (for app-only auth).

MS Access Combo Box Selections and Time Calculation

Hi currently i am making a Table with 21 Columns ("Task, Name, Time Taken") Each group, so total 7 groups.
Task combo consist of "WIP, HOLD, Quality Check"
Name combo consist of "Mark, John, Alex"
Time taken is a number field "only minutes" like 150, 200, 300 etc
At the end i have 3 columns which is for total time taken for "WIP, HOLD, Quality Check"
My Requirements:
a) When i select a Task (eg. WIP) auto the name should block with the user logged in "I have created a employee table with login form its working fine"
b) When the task selected as "WIP" and entered the "Time Taken" may be multipal times wit there groups. only the WIP total time should calculate and reflect on "TOTAL TIME TAKEN for WIP column"
Please help me ... it may be confusing but let me know if your unable to understand.
Thanks in advance.
What you're describing doesn't sound normalized at all. I'm not entirely clear on your situation but I believe you need to have two at least two tables. If you don't know what normalization is then
What is Normalisation (or Normalization)?
is a good place to start
As for the last 3 columns with the total time. You shouldn't put that in a table. Once you have a table you should always have a query total it up for you.
First of all, your table should have 5 columns. ID, Task, Name, TimeTaken, GroupName. Unless you have a need to show 7 groups simultaneously on the same form? You can filter the data at any time based on GroupName.
For part a, it sounds like your login form should be able to feed your Name combo? Just set ComboName.SelectedValue to whatever your user's name is.
For part b, I just don't understand what you're asking. Can you clarify?