Manage datastore entries via Webservices - Javascript

This new method is more secure, so we advise to use this.

I have created several web services where the code is generic. So, you still make a web service call for each datastore parameter as before (because the fields are different per datastore parameter). I have created 5 possible web service calls that work with JavaScript.

Datastore - Address Book - Get

https://dev.ssp7.smt-x.com/common/Admin/WsCallAddEdit.aspx?genericid=418

In the script at the top, you adjust the parameter name variable to the parameter you want. The fields work as they did in the old version via SOAP, so the names start with "Filter" followed by the column you want to filter on. You can thus use these to replace existing SOAP web services, as the input and output remain the same.

Datastore - Address Book - Add

https://dev.ssp7.smt-x.com/common/Admin/WsCallAddEdit.aspx?genericid=419

In the script at the top, you adjust the parameter name variable to the parameter you desire. The fields operate as they did in the previous version via SOAP, where the names represent the columns of the data you wish to add. Thus, you can utilize these to replace existing SOAP web services, as the input and output remain consistent.

Datastore - Address Book - Update

https://dev.ssp7.smt-x.com/common/Admin/WsCallAddEdit.aspx?genericid=420

In the script at the top, you adjust the parameter name variable to the desired parameter. The fields operate similarly to the previous version via SOAP, where names beginning with "Filter" are used as keys for filtering, while names beginning with "Update" contain the data you want to update for the filtered records. Therefore, you can utilize these to replace existing SOAP web services, as the input and output remain consistent.

Datastore - Address Book - Delete

https://dev.ssp7.smt-x.com/common/Admin/WsCallAddEdit.aspx?genericid=421

In the script at the top, you adjust the parameter name variable to the desired parameter. The names beginning with "Filter" are used as keys for filtering to delete. As far as I recall, deletion wasn't available via SOAP, so replacement isn't applicable here.

Datastore - Address Book - Action

https://dev.ssp7.smt-x.com/common/Admin/WsCallAddEdit.aspx?genericid=422

In the script at the top, you adjust the parameter name variable to the desired parameter. This is a new generic one I've created. You always need a field named "Action" where you specify the action, with possible values being: add (or: create, insert), update, delete (or: remove), purge (or: truncate), save.

The other fields should start with "Key" or "Data". As you might guess, keys start with "Key" and the rest with "Data".

For "add", both the keys and the data are used to add the record.

For "update", keys are used as a filter and data as update data.

For "delete", keys are used as a filter (and the data is ignored).

For "purge", nothing is used (this removes all records from the datastore).

For "save", it first checks if there's already an entry in the datastore with a valid key. If yes, the action is set to update; if no, the action is set to add.

Last updated