Forge API: Get all changed items - autodesk-forge

I need to get a list of all changed items in my project in BIM 360. Can I do this using forge-api.

Ho, regarding with the latest question [If my service is not available and I will miss some webhook events, how can I get all the changes that were made after the last webhook event received] :
If your requirement is to know which items are changed in one folder of Docs, Search API with filter can be of use. e.g. the endpoint below will return all items which are updated since a certain time.
https://developer.api.autodesk.com/data/v1/projects/{{project_id_with_b}}/folders/{{one_folder_id}}/search?filter[attributes.lastModifiedTime]-ge=2019-10-15
More filters options are described at
https://forge.autodesk.com/en/docs/data/v2/developers_guide/filtering/
While if you wanted to know all updates in one call, I do not see currently the way is available. While, Activity API is on the way, it might be helpful to know all activities during a certain dates, then you could filter out what you are interested in and locate the corresponding module>>files/resources etc.. but Activities may probably be categorized with specific scopes e.g. admin activities, project actives, issue activities etc. so it is not one call knows all updates.. And these APIs may not be exposed in the same time.

Related

Export the join date for members in a group

Is it possible to export a member's join date to a google group? When you manually export a .csv from a group it gives information on the join date. However, in google app script, I don't see the option for this in the Groups Service. This is the information that is in the .csv:
Any help or resources would be appreciated!
Short answer:
No, you cannot do that programmatically.
Long answer:
Google Groups functionality is mainly handled by Directory API, in its Groups and Members resources. That's what the Apps Script Groups Service is using behind the scenes, and you could use its methods directly by enabling the Admin SDK Directory Service in your script (the APIs —and, as a result, the advanced services— usually have greater functionalities than the Apps Script built-in classes).
If you look at the properties of any of these resources (Groups and Members), you won't find anything close to a join date property, so it doesn't seem to be part of the open API, and can only be accessed through the UI.
The same can be said of Groups Settings API, which can be used to manage group settings: no join date can be found in its resources.
Because of this, you have no way to programmatically store and retrieve the group member's join dates.
Workaround (of a sort):
If you are adding members to a group programmatically, with the API method Members: insert, you could make your application store the date in which each member was added, and retrieve it later. This is not possible, though, if members are added through the UI.
Filing a Feature Request:
Since this resource does seem to exist already (it can be accessed through the UI), I'd suggest you to file a feature request in this Issue Tracker component to make this available to the API. If you do that, please make sure that you explain the usefulness of this functionality (explain how this could help you and, potentially, other users).
Reference:
Directory API: Groups
Directory API: Members
Directory API: Manage Groups

Increasing quota limits - conditions to meet

We'd like to extend our quota limit from 1kk to around 20kk. We were already hitting limits, so we lowered frequency of our requests, and submitted https://services.google.com/fb/forms/ytapiquotarequest/. We have filled the from thoroughly and sent it three times, always with negative response from google:
Your quota extension application cannot be processed at this time
because of the following reasons:
Bad data (invalid project number)
As it says in the form:
The project number is a series of digits that can be found alongside
the Project ID in your Google Cloud Console. Please comma separate
the project numbers without additional spaces
There is only one numeric Project ID we have. When I tried fill in the alphabetic one, we received :
Project ID supplied does not exist.
When contacted Google Cloud Support, they told us that it is probably some bot who is answering this request, hence the generic answer. As well they directed us here: maybe someone of you had similar problem?
Perhaps they wish you to use the item the arrow is pointing at in the image below.
Go to Iam & Admin >> Settings

Get list of deleted onenote notebooks/sections/pages

My appplication periodically sync data with Onenote. If some content is deleted after syncing for the first how I can get list of names of pages/sections/notebooks that are deleted. Currently I am comparing id's of pages/sections/notebooks that are present in my system and one the which I receive from onenote syncing everytime. But this process takes too long and specially if I have large data.
Is there any MS-Graph/OneNote API which can provide me list(id's) of these deleted entities ?
There's no API to retrieve the list of deleted entities, unfortunately. The best way you can achieve this today with the API is to set up webhook integration, keep state on your side and the querying when you receive a webhook notification saying something changed - it looks like you're doing something similar.
If you believe the API should have this functionality, I encourage you to create and upvote an item in uservoice:
https://onenote.uservoice.com/forums/245490-onenote-developer-apis

Google Places API reference field

When I make an API request to Google places API one of the fields I get back is "reference".
It is not documented in the API documents. The value appears like a long hash code.
Is this versioning for the places details? For instance, does this reference stay the same until something like phone number or name is changed?
I am looking for a way to cache results. I was going to do it by date of request but if this value is for versioning of the record then it will be ideal to check against the cache.
I can't find any mention of it on developer site but value appears to be consistent so I figured this might be the case.
Does anyone know for sure one way or the other?
From the web service documentation (same is true for the Google Maps Javascript API v3):
Note: The id and reference fields are deprecated as of June 24, 2014. They are replaced by the new place ID, a textual identifier that uniquely identifies a place and can be used to retrieve information about the place. The usual deprecation period of one year has been extended, as we’re looking into ways of ensuring this change will not break existing code. We’ll update this page with a final notice at least 90 days before we change the way the API handles the id and reference fields. We recommend that you update your code to use the new place ID instead of id and reference as soon as possible.

Issue with Google Drive API and group sharing

I'm facing an issue with an application I'm developing using Google Drive.
I have a Google group with some users inside, and I share a collection with this group.
When I try to find this collection using Google Drive API (files().list()), as one of the users of this group, the collection shows up properly.
However, if I add another user to the group (either using API or Google CPanel), and try to find the collection using Google Drive API as this user, the collection doesn't show up, as if the user is not able to see it even though he is in a group allowed to see the collection.
If I manually open once the collection through my browser, then the collection is showing through Drive API.
Is this a normal behaviour ? In my use case I cannot expect from the users to open in their browser each and every collection shared with them in order for the application to work.
Any insight?
I opened a Google Support case about this and apparently this behavior is "expected". Here are some excerpts from my exchange with "Angel" from
Google Enterprise Support (typos corrected and emphasis mine):
After reviewing the stackoverflow question, we need to clarify to you that the behavior shown is expected. When adding a user to a group, this group must be added again for any files that it has been shared with.
and
All information previously provided is from internal documentation for Drive UI; however the functionality is the same for SDK, therefore, group must be deleted and added back to the list of users that have access to files/folders after adding a new member.
So, there you have it. Not sure if #Burcu will ever come back and confirm.
<EDIT> It gets worse. According to this Google document, groups with more than 200 members will never see files shared with them, even if you delete and add the group back. </EDIT>
Useless post-answer rant follows:
This behavior, even if it is "expected" by Google, does not seem to be properly documented, and it is neither expected nor usable by clients of the service. How are we supposed to know when a user has been added to a group that has items shared with it? Are we supposed to constantly monitor group memberships as well as maintain a list of all things shared with the group and then *re*share them with the group when the membership changes, just to get consistent behavior? It makes me wonder why Google doesn't already do this on the back end; it can't be that expensive to register a list of callbacks with a group that are triggered upon membership changes. And the requirement that we actually unshare is even more bizarre, since it necessitates a short period of time during which nobody in the group can access the resource.