Polling Info API

Polling Info API

The Polling Info API provides real-time status information about the background polling service that synchronizes data from CIB seven.

Base Path: /poll-info


Endpoint

GET /poll-info

Returns the current polling status and timestamps.

Purpose: Monitor the data synchronization status between CIB ins7ght and CIB seven.

Parameters: None

Response Example:

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "fetchFrom": "2025-01-29T10:00:00.000Z",
    "fetchedUntil": "2025-01-29T10:30:00.000Z",
    "isPollingSince": "2025-01-29T10:30:15.000Z"
  }
]

Response Fields:

Field Type Description
id string Unique polling status record ID (UUID)
fetchFrom string Timestamp from which data was last fetched (ISO 8601)
fetchedUntil string Timestamp until which data was fetched (ISO 8601)
isPollingSince string Timestamp when the current polling cycle started (ISO 8601)

Understanding the Fields

fetchFrom

The starting timestamp for the last polling operation. This indicates from which point in time process data was retrieved from CIB seven.

fetchedUntil

The ending timestamp for the last polling operation. This indicates up to which point in time data has been successfully imported.

isPollingSince

The timestamp when the current polling cycle started. This is the key field for monitoring polling health.

Checking Polling Health: Compare isPollingSince to the current time:

  • If the difference is small (e.g., < 30 seconds), polling is active and working
  • If the difference is large (e.g., > 1-2 minutes), polling may be stuck or have errors

Usage Examples

Check Polling Status

curl -X GET "http://localhost:8899/pollinfo"

Response:

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "fetchFrom": "2025-01-29T10:00:00.000Z",
    "fetchedUntil": "2025-01-29T10:30:00.000Z",
    "isPollingSince": "2025-01-29T10:30:15.000Z"
  }
]

Check if Polling is Working

Compare isPollingSince to current time:

# Get the isPollingSince timestamp
POLLING_SINCE=$(curl -s http://localhost:8899/pollinfo | jq -r '.[0].isPollingSince')
echo "Polling started at: $POLLING_SINCE"

# If this timestamp is very old (more than a minute or two), polling might be stuck

Interpretation:

  • Recent timestamp (seconds or <1 minute ago): ✅ Polling is active
  • Old timestamp (several minutes ago): ⚠️ Polling may be stuck, check logs

Notes

  • Returns an array with typically one element (single polling status record)
  • All timestamps are in ISO 8601 format with UTC timezone
  • The polling interval is configured in application.yaml (default: 10 seconds)
  • Check isPollingSince against current time to verify polling is working
  • If polling is stuck, check application logs for errors
  • This endpoint does not require authentication
  • For detailed polling configuration, see Configuration Guide

On this Page: