Entries are added to the Identity Panel History pane using the /api/histories endpoint.
Saving histories requires the "scheduler" license sku, and "Write|HistoryRecord" data permission which is normally only applied to the Admin and Writer roles.
The histories POST action accepts a ListWrap<HistoryRecord> object as application/bson. Technically the API will appear to accept application/json format, but a de-serialization errors may occur and it will not be possible to save objects with statistic counters.
History Record
The following is a sample invocation saving a HistoryRecord object:
helpers.rest.post('histories', { Count: 1, Data: [{ "Id": "638d0900-6966-4013-b573-ae327c81bb99", "Provider": "384f3c61-5902-4ddd-a328-da539f7267fe", "PanelService": "SRA5TA-IIDM02", "Result": "success", "$type": "SoftwareIDM.PanelModel.Models.HistoryRecord, SoftwareIDM.PanelModel", "RecordOf": "SQL Scanned", "Argument": "384f3c61-5902-4ddd-a328-da539f7267fe", "StartDate": "2020-04-26T21:46:49.695Z", "EndDate": "2020-04-26T21:46:58.555Z", "Errors": null, "Counters": { "3": 1 } }] }, function(r) { console.log(r);}, function(e) { console.log(e); });
NOTE:
The Provider value MUST match the Id of the Identity Panel provider associated to the object. The API will accept objects saved with an invalid Id, but when they are later viewed in the history pane the GUID will display instead of a provider name.
Valid values for RecordOf and Argument depend on the type of the HistoryRecord being saved.
Sub-types include:
Comments
0 comments
Please sign in to leave a comment.