Is there any way to get deleted row data from smartsheet using webhooks - smartsheet-api

To notify the events on smartsheet, I have created a webhook. Using I am able to get all events performing on sheet. If I delete a record manually, I am getting the deleted event with rowid, but not the total deleted row data. Is there any way to get the deleted row data?
Thanking you in advance

The callbacks that you receive via webhooks are simply intended to notify you when events occur -- i.e., by design, each callback contains only enough data to identify the event that triggered the callback.
Update 10/19/2020:
Unfortunately, you won't be able to use the Get Row operation to retrieve data for row after it's been deleted. Therefore, seems like you'd need to somehow write/save sheet data elsewhere as the sheet is modified (e.g., perhaps in response to webhook notifications that indicate row data was added/modified?), then you could query this saved sheet data to get row data as rows that are deleted from the actual sheet (i.e., in response to 'row deleted' webhook notifications).

Related

How to retrieve unchanged value on OPC UA Subscribe

I want to retrieve data per Publishing Interval, even data changed or not. As I read OPC documentation, I can only get DateChangeFilter to retrieve the values on OnChange.
Is there any way to do that?
If creating your item with a DataChangeTrigger of StatusValueTimestamp doesn't get you all the changes you want there is nothing you can do.
Alternatives would be periodically calling the Read service instead of using a MonitoredItem or maybe calling the ResendData method every time you want to force the subscription to send the last value for all its items.

Preventing fetching all the data from Firebase using .childAdded in Swift

When we call. childAdded function initially it fetches all the records from the given link. And then after that it fetches the only newly added record.
Is there any way to prevent fetching all the data from Firebase initially.
I want to show a popup whenever a new record is added in Firebase and i want to fetch only the latest record but .childAdded first fetches all the data in Firebase.
It's not possible unless you put a timestamp value in each record. If you have a timestamp, then you can query for only the children that have a timestamp greater than the current time. Typically one uses ServerValue.timestamp() as the value of a child to automatically get the server's sense of time into that field.

The correct HTTP method for resetting data

I want to "reset" certain data in my database tables using a RESTful method but I'm not sure which one I should be using. UPDATE because I'm deleting records and updating the record where the ID is referenced (but never removing the record where ID lives itself), or DELETE because my main action is to delete associated records and updating is tracking those changes?
I suppose this action can be ran multiple times but the result will be the same, however the ID will always be found when "resetting".
I think you want the DELETE method

RESVT Bulk Update

I had a question last month about POSTing to Workfront's RESVT field. Since then, I've completed my database to pull all of our department's Leave Calendar data and feed it into Workfront's API as POST methods; however, I've discovered a new problem.
Every time I add a new RESVT event to a user with an existing RESVT event, it deletes the previous event before it saves the new event. I've looked into submitting a bulk edit using the bulk editing format to get all of the events for a user online all at once like this:
https://sosprojects.preview.workfront.com/attask/api/v9.0
/5b6b72b5007d93b00b00dda361398cad?method=put&updates=
[
{
objCode:”RESVT”,
startDate:”2018-08-20T00:00:00:000-0700”,
endDate:”2018-08-23T00:00:00:000-700”
},
{
objCode:”RESVT”,
startDate:”2018-09-20T00:00:00:000-0700”,
endDate:”2018-09-23T00:00:00:000-0700”
}
]
&sessionID=209055d209f94662b32ac50175b34bc7
Which Workfront "accepts" (it doesn't spit out an error code), but it still only saves the last RESVT event (e.g. 9/20 - 9/23).
I've tried using PUT to edit an existing RESVT event, but each RESVT event will only accept one start and one end date so it collapses those attempts into one extra long event.
I know the time-off calendar can manually create multiple RESVT events per user, but I can't figure out how to replicate that feat with my http methods. The calendar always creates new RESVT events for every event logged whenever I add a new event to it; so I think it is doing something like the bulk POST I tried at the top, so why can't my method do the same thing?
The API docs don't show update as a valid method for the RESVT object. Just modify the fields directly for the specific object you want to update. Do you know its ID?
PUT https://<url>.my.workfront.com/attask/api/v9.0/RESVT/<ID of the reserved time you want to edit>?userID=abc1234,startDate=<date>,endDate=<date>

Why JsonStore provides a commitchanges method

The extjs Jsonstore class has a method commitchanges().
Now considering that the javascript code will send an AJAX request to a servlet and not to a db directly, what do we need a commitchanges() method?
Whenever user changes anything in the form panel's or UI components that data is changed in record, but at this time record will maintain a list of modified properties in the record and store maintains a list of modified records in the store
So whenever you send a request to save the data to server, after successful save you will get back a success response, on this response store need to make sure that the saved record will be removed from the list of records that are modified in the store and also remove list of modifications from the record instance to indicate that save operation was successful
So the operations of removing list of modified properties from record instance is performed by record.commit method and operations of removing saved record from list of modified records from store is performed by store.commitChanges method which in turn will call record.commit for every record which is saved correctly on server