Access Inbox items from the API? - asana

Is there a way to access the items in a workspace's inbox via the API? I'm primarily interested in the unread count, but could make good use out of any unhidden items as well.

At the moment you can't do this with a simple API call.
You might be able to do it by pulling down all projects, and then pulling down all the tasks for each project, storing that in a local database, and then search for tasks with assignee_status set to "inbox" (https://asana.com/developers/api-reference/tasks). But that is probably not the answer you want!

Related

How to get total workspace (team) user count via Slack API?

I am trying to get the total number of users within a Slack workspace. Just the count.
Things I've considered:
Iterating over the users.list
Unnecessarily heavy on the API and gets me waaaay more data than I need (the less I know about the users, the better imo)
Includes inactive users (so cannot get a proper indication without iterating over everything)
Using conversations.info
Requires a scope that I currently don't use (channels:read). Getting read access to channels seems like a very intrusive permission (even though my app doesn't use it and I don't want to scare off users by requesting this sort of information).
Is there an easier way to getting this information or any ideas I have not considered yet? Let me know!
You could make a call to [conversations.members][1] for the #general channel. It won't return a total number of users but it will return a list of all user ids pertaining to members of that channel, you'd just need count the ids on your end. Every user on a workspace is automatically added to the #general channel. No one can leave that channel nor can it be deleted or archived so it's sure to have the most accurate count of total workspace users. The conversations.members method does require the channels:read scope though so that's something to keep in mind.

Best ways to fetch files/folders that shared by different people with same name using 'SharedWithMe' Microsoft Graph API

I can fetch all the Shared Items by making a GET request.
Get https://graph.microsoft.com/v1.0/me/drive/sharedWithMe
However, if two different people shared two items with the same name I'm just getting one item.
I can modify the names of the items using C# before fetching them but I want to know if there's a better way to get the duplicated items using Microsoft Graph API.

Trying to get analytics on Microsoft teams calls

I am trying to put together analytics on Microsoft teams calls. I would like to get hold times, number of transfers, call time, etc. I came across this call https://graph.microsoft.com/beta/communications/callRecords and it gives me a list of calls with call times, but I can't find a way to get hold times, what line it came in on, etc. Greatly appreciate any pointers.
First of all, this end point https://graph.microsoft.com/beta/communications/callRecords only allows you to query a single call record using its ID, it does not support querying a list of call records for the whole tenant or for a specific user.
The only way currently to find this ID to query the call record is by setting up a web hook to receive change notifications. Refer to the following documentation for more info on change notifications.
To directly address your question, i am not one hundred percent sure but i believe the information you're looking for could be found inside the list of sessions and segments inside a call record.

How to list the deleted contacts by Microsoft Graph API

I want to do a sync action in my client side, so need to know how to get all deleted contact list.
By the api (GET /me/contacts), I could get all contact list
But it wastes much time when the user has large contacts.
This api (GET /me/contacts/{id}) tell us the contact is exist or not.
it is inefficient to check every contacts are deleted or not for me.
Which apis do I use? thanks for your help.
Why not use the delta query preview in the /beta endpoint? That should do what you want.
More efficient way for you to check which contacts were removed is getting just the list of contact ID's and then doing the diff between list of ID's returned by graph, and local list.
You can use query parameters to retrieve just the ID's of the contacts, instead of getting the whole objects.
Method url:
https://graph.microsoft.com/v1.0/me/contacts?$select=id

Query for open tasks in Asana

We're looking at using Asana to combine CRM, administration and issue tracking in a web dev firm. The key feature we need is a view of the "next actions" or "top [1|2|3] priorities" across all projects in a workspace, irrespective of who they are assigned to. It seems Asana does not provide this out of the box (is that right?) so I am looking into writing API queries to pull this out into a dashboard of our own.
I understand you don't want to let people pull ALL tasks in one workspace, as it may grow, but is there a way to pull out the top few open tasks in each project, without having to specify the assignee?
(I work for Asana)
Currently, the API allows you to grab all tasks in a project, see https://asana.com/developers/api-reference/projects. It will return them in ranked order (the same as they would show up in the Asana UI), however it won't limit them to some number; you'll have to get them all. Limits and pagination are on our roadmap to enable developers to work more efficiently with larger projects and workspaces.
So, it seems like you'd want to grab all projects, then iterate through them and query all tasks - this will give you their name and ID by default. If you want more detail for the ones you're going to show, then I recommend querying the details on each of those tasks individually.

Resources