How to list all running workitems in Forge - Design Automation for Revit? - autodesk-forge

I would like to get running workitems to track progress of the posted workitems.
It is possible to get details to a given workitem by providing an ID, like this:
https://developer.api.autodesk.com/da/us-east/v3/workitems/{{workitemId}}
but I have posted multiple jobs, and using postman, only the last ID gets saved to an environment variable.
I tried getting the generic /workitems endpoints without query strings, but the result was that "The requested resource does not exist."
It would be nice to get a bit more documentation about the specific endpoints, I have read
The developers_guide
but could not find an answer.
I would expect a rest api to give back a list of workitems, just like it does it for activites or appbundles.

Design Automation doesn't have an API to list WorkItems. We only keep WorkItem's reports for 3 days.
You can use this API to get details of a given workitem by providing its id.

Related

Talend Open Studio: Authenticate to REST API

I am currently building an ETL job in Talend Open Studio, that calls a banking API in order to retrieve customer data. The API works with OAuth 2.0. Using Postman, I can easily get an Access Token, which I then use in Talend to retrieve the customer data in JSON format. However, before I get the access token, the customer whose data I want to pull from the API, has to grant me permission for doing so. Using Postman, this is easy enough, as I get redirected to a page where the customer enters his/her credentials and then gives my App permission to pull the data:
My plan was, to setup the Talend job in a way, that this gets done automatically. My current approach is to use a tRESTClient component which calls the page on above screenshot and enters the credentials. Now there are several options with the tRESTClient component, but none of it works. First I tried to make a GET call with "Use Authentication Basic HTTP", parsing username and password of the user. That does not end with an error, but the response is just the html of the login page itself. When I try to make a POST call parsing the customer credentials to the TRESTClient component in JSON format, I am getting a 400 Bad Request. This is how my component looks in this case:
I also asked that question in the Talend Community forum, but so far no one replied to it. I dont know if I am completely off-trail here?! Any hint would be greatly appreciated, I am struggling with that task for 3 days now...
EDIT: to be more straightforward:Is it possible to perform these 2 steps in Talend alone:

Forge API: Get all changed items

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.

Facebook Graph Api returns empty array on gorup feed call

I'm trying to get the feed from a closed group which I am an administrator using facebook Graph Explorer API, so I followed the instructions in this documentation
But the response json is just an empty array like this
{"data": []}
Here is my request image
First I gave the token only the permission described in the documentation, then i gave all permissons and yet it doesn't work
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#groups-4-4:
Groups API
App Review — All apps, including formerly approved apps, must undergo App Review in order to gain access to the API.
Until you submit your app for review and get it approved, this will only work if you put your app in “dev” mode. As soon as you set it “live”, you will only get an empty result if you did not get your app reviewed yet.

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

Problems with addSiteAccount1

I'm following the Quick Start Guide, as I've just received my credentials. I went through the coblogin and user (consumer) creation successfully. For test purposes, I was able to search and list sites and infos.
When I try to invoke addSiteAccount1 using the user session token for the consumer that I create, I get an HTTP 200 response and no apparent error, no exceptions or messages. The JSON response is basically the same as the one listed in the API documentation page, however there's no ID I can use to list transactions. I'm using a real login/password account information on Chase (site ID 643).
By the way, if I use random strings for credentialFields[0].value (username) and credentialFields[1].value (password), I get the same JSON response.
Please help me clarify what is not working here.
addSiteAccount1 API will give you a response which should contain "siteAccountId" field this is the identifier for that particular user's Chase bank site.
This siteAccountId will have itemIDs which resembles different 'container'(in Yodlee terminology) like, all saving and checking accounts comes under bank container,while credit card comes under credit's container similarly loan and mortgages are other containers.
Now even under a specific container you might have multiple accounts for e.g., Chase Bank container you might have 1 saving's account and 1 checking account, for each there will be an itemAccountId available. This uniquely identifies that specific account and you can pass this itemAccountId (which you can get from getItemSummariesForSite API) in executeUserSearchRequest API to get the transactions belongs to this specific account.
For further help here is the link for the API flow which will give you an idea about how and when to use different APIs.
OK, I think I got it working, but maybe some documentation clarification is needed. Provided that all mandatory parameters in the addSiteAccount1 are present and contain no errors, the method call will be successful for a given consumer.
I then visited the getAllSiteAccounts method, which would show me all account aggregation for that user/consumer. I was able to see all accounts added, some had a message like "REFRESH_COMPLETE" and others would have "AUTH_FAILED". It seems that once one adds an account, the Yodlee robots will try to login and then synchronize the data for a given account. Makes sense?
I was only able to verify if the bank credentials were OK by calling another method.