-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I have been able to retrieve some actions when the only actions returned are paths read or updated. But I am getting exception when the action has a target. The library seems to be able to retrieve data from the endpoint, but the exception seems to happen when attempting to map the Action class to the data.
Here is my code that works sometimes:
var since = DateTime.Now.AddHours(-12);
var config = new FilesCom.FilesConfiguration()
{
BaseUrl = filesDotComApiSettings.Url,
ApiKey = filesDotComApiSettings.ApiKey
};
_=new FilesCom.FilesClient(config);
var paramters = new Dictionary<string, object>
{
{ "start_at", since.ToUniversalTime().ToString("u") }
};
var actions = Folders
.SelectMany(f =>
History.ListForFolder(f, paramters).ListAutoPaging()
.ToList())
.ToList();
I have had the same issue when using History.List(parameters)
System.AggregateException: One or more errors occurred. (Unexpected data received from uri:
Here is an example of a successful action retrieval where he data in tags is our data:
[
{
"id": 16565950247,
"path": "<path>",
"when": "2024-11-14T14:57:04-05:00",
"destination": <path>",
"ip": "<ip>",
"user_id": null,
"username": null,
"user_is_from_parent_site": null,
"action": "update",
"interface": "restapi"
}
]
Here is an example of an UNsuccessful example:
[
{
"id": 16565514079,
"when": "2024-11-14T14:24:29-05:00",
"ip": "<ip>",
"targets": {
"user": {
"id": <ip>,
"username": "<username>"
}
},
"user_id": <userId>,
"username": "<username>",
"user_is_from_parent_site": true,
"action": "user_update",
"interface": "web"
}
]
Metadata
Metadata
Assignees
Labels
No labels