Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
8.9.0, 8.9.7, 8.19.1
-
1
-
Severity 3 - Minor
-
1
-
Description
Issue Summary
The Webhooks REST API endpoint, /rest/api/latest/projects/<PROJ>/repos/<REPO>/webhooks*, is returning incorrect timestamps for the createdDate and updatedDate fields. The issue is that the epoch timestamp returned for these fields is being updated to the current timestamp at the time the API is called. As a result, each time we access this endpoint, both of these values reflect the current time, rather than the actual creation or update times of the webhook.
This is reproducible on Data Center: yes
Steps to Reproduce
- Invoke the webhook API endpoint, either for a specific webhook or for all webhooks.
- Observe the values of createdDate and updatedDate.
Expected Results
The createdDate and updatedDate fields should accurately reflect the timestamp for when the webhook was originally created and last updated, respectively.
Actual Results
The createdDate and updatedDate fields are displaying the timestamp for when the API call was made. This is demonstrated in the following examples:
First call:
{ "id": 1, "name": "calibration webhook", "createdDate": 1709896932275, "updatedDate": 1709896932275, "events": [ "pr:opened", "repo:refs_changed" ], "configuration": { "createdBy": "bitbucket" }, "url": "https://webhook.site/a44dc0db-d73a-40d6-b1b6-1bd801ad3371", "active": true, "scopeType": "repository", "sslVerificationRequired": true }
Second call, a few moments after the first:
{ "id": 1, "name": "calibration webhook", "createdDate": 1709897074546, "updatedDate": 1709897074546, "events": [ "pr:opened", "repo:refs_changed" ], "configuration": { "createdBy": "bitbucket" }, "url": "https://webhook.site/a44dc0db-d73a-40d6-b1b6-1bd801ad3371", "active": true, "scopeType": "repository", "sslVerificationRequired": true }
Workaround
To obtain the correct creation date of the webhook, use the alternative endpoint /rest/auditing/1.0/events?search=webhook.
Attachments
Issue Links
- mentioned in
-
Page Loading...