Hi Reece,
I did some more digging, and I’ve found that the database does contain the events, but the UI/API is not retrieving them. Human error isn’t entirely ruled out yet, so feel free to double check what I did :).
I used the chrome developer tools to get the URL that was being hit by the browser:
https://OCTOPUS_SERVER/api/events?from=2018-05-20T00%3A00%3A00-04%3A00&to=2018-06-20T00%3A00%3A00-04%3A00&documentTypes=ActionTemplates
I used the time span from last month (2018-05-20) until today (2018-06-19). We’ve modified the action templates a number of times between those dates, but I did some testing on 2018-06-18 as well, so those should show up (see DB results further below).
The result was the following with 0 results (same as I saw in the UI)
{
"ItemType": "Event",
"TotalResults": 0,
"ItemsPerPage": 30,
"NumberOfPages": 1,
"LastPageNumber": 0,
"Items": [],
"Links": {
"Self": "/api/events?user=",
"Template": "/api/events{?skip,regarding,regardingAny,user,users,projects,environments,eventGroups,eventCategories,tags,tenants,from,to,internal,fromAutoId,toAutoId,documentTypes,asCsv,take,ids}",
"Page.All": "/api/events?skip=0&from=2018-05-20T00%3A00%3A00-04%3A00&to=2018-06-20T00%3A00%3A00-04%3A00&documentTypes=ActionTemplates&take=2147483647",
"Page.Current": "/api/events?skip=0&from=2018-05-20T00%3A00%3A00-04%3A00&to=2018-06-20T00%3A00%3A00-04%3A00&documentTypes=ActionTemplates&take=30",
"Page.Last": "/api/events?skip=0&from=2018-05-20T00%3A00%3A00-04%3A00&to=2018-06-20T00%3A00%3A00-04%3A00&documentTypes=ActionTemplates&take=30"
}
}
I ran the following query on the DB, which I got from another post:
SELECT * from dbo.[event]
where RelatedDocumentIds like '%actiontemplates%'
order by occurred desc
The following results were returned (only pasting in the first block of entries)
Changed database context to 'OctopusDeploy'.
Id RelatedDocumentIds ProjectId EnvironmentId Category UserId Username Occurred Message JSON TenantId AutoId
-------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- --------------------
Events-8319 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-18 20:58:17.9244433 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 8120
Events-8318 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-18 20:56:03.7897649 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 8119
Events-8317 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-18 20:55:55.7146815 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 8118
Events-8316 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-18 20:52:51.7369271 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 8117
Events-8315 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-18 20:32:40.5817432 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 8116
Events-8311 |ActionTemplates-381| NULL NULL Modified Users-1 apixley 2018-06-18 16:21:21.9035677 +00:00 ActionTemplate Test Template was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-381","StartIndex":15,"Length":13}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-381\",\r¶<br> \"Name\": \"Test Template\",\r¶<br> \"Description\": \"TES NULL 8112
Events-8310 |ActionTemplates-381| NULL NULL Created Users-1 apixley 2018-06-18 16:21:01.6550588 +00:00 ActionTemplate Test Template was created {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-381","StartIndex":15,"Length":13}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-381\",\r¶<br> \"Name\": \"Test Template\",\r¶<br> \"Description\": \"TES NULL 8111
Events-8298 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-18 15:54:54.1179082 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 8099
Events-8188 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-15 21:00:16.1991449 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 7989
Events-8187 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-15 20:39:44.8477458 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 7988
Events-8186 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-15 20:06:32.6708567 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 7987
Events-8185 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-15 20:05:48.1083349 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 7986
Events-8184 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-15 20:03:04.1959893 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 7985
Events-8183 |ActionTemplates-364| NULL NULL Modified Users-1 apixley 2018-06-15 20:00:38.9479059 +00:00 ActionTemplate RunScript was modified {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r¶<br> \"Id\": \"ActionTemplates-364\",\r¶<br> \"Name\": \"RunScript\",\r¶<br> \"Description\": \"Runs the NULL 7984
Any help is appreciated.
Thank you!
Andrew