Fetch Historical Troubleshooting Data

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Fetch webhooks troubleshooting data based on timestamp information.

Security: Requires a valid admin user.

Usage: GET event/api/v1/troubleshooting?start=<start timestamp>&end=<end timestamp>&count=<number of records>

The start parameter includes data reported since the provided timestamp and the end parameter includes data reported before the provided timestamp.

If you provide the start parameter and do not provide the count or end parameter, the stream will be live and provides the new data as and when it comes in.

You cannot use the end and count parameters without the start parameter. The values of the start and end paramters should be in Unix timestamp. You can also use subscription and node filter parameters to narrow down your results.

Produces: application/json

Sample Output

GET event/api/v1/troubleshooting?start=14354677650&end=14354677680&count=5
{
   "timestamp": 14354677655,
   "elapsed_millis": 208,
   "errors": [
       "error executing webhook: unexpected HTTP response status"
   ],
   "request": {
       "method": "POST",
       "url": "https://webhook-target/a9736bc8",
       "headers": {
           "Content-Type": "application/json"
       },
       "payload": "{\"domain\":\"artifact\",\"event_type\":\"deployed\",\"data\":{\"repo_key\":\"example-repo-local\",\"path\":\"some.log\",\"name\":\"some.log\",\"sha256\":\"069092736c73613a25917f582f8a2621b8495cb723914c85dc570761ce0846f8\",\"size\":353178},\"subscription_key\":\"test\",\"source\":\"jfrog/jfrt@01h9mspg5atsp402qqxm071zjv\"}",
       "retries_attempted": 0
   },
   "response": {
       "status": 404,
       "headers": {
           "Cache-Control": "no-cache, private",
           "Content-Type": "application/json",
           "Date": "Tue, 12 Sep 2023 12:08:48 GMT",
           "Server": "nginx",
           "Vary": "Accept-Encoding"
       },
       "body": "{\"success\":false,\"error\":{\"message\":\"Alias a9736bc8 not found\",\"id\":null}}"
   },
   "event": {
       "id": "01HA4MPK6XVKTD0XMS9SVM1GER",
       "subscription_key": "test",
       "domain": "artifact",
       "event_type": "deployed",
       "data": "{\"repo_key\":\"example-repo-local\",\"path\":\"some.log\",\"name\":\"some.log\",\"sha256\":\"069092736c73613a25917f582f8a2621b8495cb723914c85dc570761ce0846f8\",\"size\":353178}",
       "source": "jfrog/jfrt@01h9mspg5atsp402qqxm071zjv"
   }
}

{
   "timestamp": 14354677669,
   "elapsed_millis": 228,
   "errors": [
       "error executing webhook: unexpected HTTP response status"
   ],
   "request": {
       "method": "POST",
       "url": "https://webhook-target/a9736bc8",
       "headers": {
           "Content-Type": "application/json"
       },
       "payload": "{\"domain\":\"artifact\",\"event_type\":\"deployed\",\"data\":{\"repo_key\":\"example-repo-local\",\"path\":\"some.log\",\"name\":\"some.log\",\"sha256\":\"069092736c73613a25917f582f8a2621b8495cb723914c85dc570761ce0846f8\",\"size\":353178},\"subscription_key\":\"test\",\"source\":\"jfrog/jfrt@01h9mspg5atsp402qqxm071zjv\"}",
       "retries_attempted": 0
   },
   "response": {
       "status": 404,
       "headers": {
           "Cache-Control": "no-cache, private",
           "Content-Type": "application/json",
           "Date": "Tue, 12 Sep 2023 12:18:48 GMT",
           "Server": "nginx",
           "Vary": "Accept-Encoding"
       },
       "body": "{\"success\":false,\"error\":{\"message\":\"Alias a9736bc8 not found\",\"id\":null}}"
   },
   "event": {
       "id": "01HA4MPK6XVKTD0XMSSVM1GSR",
       "subscription_key": "test",
       "domain": "artifact",
       "event_type": "deployed",
       "data": "{\"repo_key\":\"example-repo-local\",\"path\":\"some.log\",\"name\":\"some.log\",\"sha256\":\"069092736c73613a25917f582f8a2621b8495cb723914c85dc570761ce0846f8\",\"size\":353178}",
       "source": "jfrog/jfrt@01h9mspg5atsp402qqxm071zjv"
   }
}

Fetch Earliest Data in Storage

Use the following API call to fetch all the data from the earliest data available in Redis.

GET event/api/v1/troubleshooting?start=0

You can use the count parameter the limit the number of results or the end parameter to specify an ending timestamp. Otherwise, all the records will appear and the stream will be live capturing the new events.

Note

Redis stores the last 10000 records and records prior to the 10000 records stored are cleared automatically every 30 seconds.

Fetch All Data in Between two timestamps

Use the following API call to fetch all the data between two timestamps.

GET event/api/v1/troubleshooting?start=14354677669&end=15354677800

Live Stream Data from a Past Timestamp

Use the following API call to live stream data starting from a timestamp in the past.

GET event/api/v1/troubleshooting?start=14354677669