Is there any way to use Microsoft Graph to query for the last modified information for Planner tasks?
The delta query doesn't seem to support task resources yet.
Unfortunately no, there isn't a "modified date" property in plannerTask object. The best you could do here would be sort by createdDateTime to see which tasks were added after a given date/time.
Related
I am querying ms graph for planner tasks https://graph.microsoft.com/v1.0/Planner/Plans/PlanID/tasks
This returns all the tasks in planner. I am hoping to filter these tasks by 'createdDateTime' greater than equals to last month. OR 'percentComplete' is less than 100.
New to querying data, so I am unsure what syntax to use. I was hoping to use $top= x would be based on createdDateTime. but if I use this
https://graph.microsoft.com/v1.0/Planner/Plans/planID/tasks?$Top=20
it still returns all of the tasks.
Thank you
Unfortunately, Planner doesn't support filters at this time. The recommended approach is for the client to read the data and filter on the client side.
For general filtering and query parameters, this documentation should help: https://learn.microsoft.com/en-us/graph/query-parameters?view=graph-rest-1.0
I need to use microsoft graph api, more in detail the calendar one, to retrieve some events of the users (up to 1000 entries).
I need to filter out the events that the user have declined.
That information is stored in the assignee resource, or conveniently in the 'responseStatus' property.
The issue that I'm having is that anytime I try to retrieve the assignee resource, the query takes 10x time to perform (from 1.2s without the assignees to 12-14s with).
(https://graph.microsoft.com/v1.0/me/events?select=id,subject,start,end,sensitivity,assignee&top=1000)
So i've tried to get the responseStatus instead and...guess what, the performance are always 10x worst (https://graph.microsoft.com/v1.0/me/events?select=id,subject,start,end,sensitivity,responseStatus&top=1000)
I've then decided to try to filter them directly (https://graph.microsoft.com/v1.0/me/events?select=id,subject,start,end,sensitivity,responseStatus&top=1000&filter=responseStatus/response ne 'declined') but I receive an error message stating that "The property 'responseStatus' does not support filtering."
And I'm having an hard time filtering the assignee resource.
So...is there a simple way to filter declined events without having such performance issues?
You can use the extended property pidlidresponsestatus https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/pidlidresponsestatus-canonical-property to filter those out eg
https://graph.microsoft.com/v1.0/me/events?$select=subject,body,bodyPreview,organizer,attendees,start,end,location,responsestatus&$filter=singleValueExtendedProperties/any(ep:ep/id eq 'Integer {00062002-0000-0000-C000-000000000046} Id 0x8218' and cast(ep/value, Edm.Int32) ne 4)
Suppose I have the following JIRA filter.
project = XXX AND resolution = Unresolved AND assignee in (EMPTY) ORDER BY Type asc, priority desc
I use it to see all unassigned issues in a certain project and pull from for triage.
Every now-and-then, I need to know how many are in each Type, i.e., I actually want a count for each.
How could I modify this query to do that or write a new one that accomplishes the same thing?
Remember that JQL isn't SQL - it just operates on tickets and returns lists of them for other parts of JIRA to consume, and doesn't really have a mechanism for counting results.
That said, you can use the JIRA REST API's /search endpoint along with maxResults=0 to construct JQL queries for each Type you care about, and the endpoint will give you a total value for that ticket Type:
https://jira.url/rest/api/latest/search?jql=project%20=%20XXX%20AND%20resolution%20=%20Unresolved%20AND%20assignee%20in%20%28EMPTY%29%20AND%20Type%20=%20Task&maxResults=0
Results in this output for Type=Task:
{
"startAt":0,
"maxResults":0,
"total":123,
"issues":[]
}
I'm trying to filter on the sharepoint lists, but the semantics seems to be different to the default semantics.
What I already tried was (with $ and without; single quotes and no quotes):
https://graph.microsoft.com/v1.0/sites/root/lists?filter=name eq 'Something'
https://graph.microsoft.com/v1.0/sites/root/lists?$filter=name eq 'Something'
https://graph.microsoft.com/v1.0/sites/root/lists?filter=id eq 'CFFF1460-B4D7-419C-A921-61B5279BBDDC'
https://graph.microsoft.com/v1.0/sites/root/lists?$filter=id eq 'CFFF1460-B4D7-419C-A921-61B5279BBDDC'
https://graph.microsoft.com/v1.0/sites/root/lists?filter=id eq CFFF1460-B4D7-419C-A921-61B5279BBDDC
https://graph.microsoft.com/v1.0/sites/root/lists?$filter=id eq CFFF1460-B4D7-419C-A921-61B5279BBDDC
But everything returns an array containing all lists and not only the subset matching the desired criteria.
So how can I filter on sharepoint lists?
If you know the id of the list you want to filter and get a response for.
YOu can run a graph API query like this.
https://graph.microsoft.com/v1.0/sites/root/lists/{list-id}
This will give you data about that list.
Let me know if you need further details on this.
Unfortunately (like Marc already mentioned in the comments) it is not possible to filter on SharePoint lists. If you need to, you have to do it on the client side, by reading the list without any filter and make a LINQ statement (or something similar) on the received collection. Be aware that (like all collections in Graph) you don't get always all elements at once. Potentially you have to call the next link request from the last response and wade through more requests and elements till you find what you need.
So when you found what you need, it is a good idea to store the list id within a memory cache or Redis cache for faster lookups the next time, you need this information.
Is there any way to implement optimistic concurrency during updating and creating neo4j nodes using the REST API? I'd like to create a user node with a unique name only if that name doesn't exist. Don't want two users to accidentally overwrite each other if they pick the same username at the same time.
Additionally, I'd could also have something like an incrementing version number to check for concurrency on the node. In SQL I would normally have an update with a where clause that checks for id and version number. Is there something similar I can do with cypher that would be easy to implment and wouldn't require me to type all the property names out into a long query?
You could try a unique index: http://docs.neo4j.org/chunked/stable/rest-api-unique-indexes.html
Cypher "CREATE UNIQUE" syntax may also be a help: http://docs.neo4j.org/chunked/stable/query-create-unique.html