Viewing Subscriber History

This documentation explains how to view subscriber history from the Subscriber History Record (ALTRANHD) table by defining a *range on the PENDING_TIME field. It covers two use cases: continuously following (“tailing”) live history as it is written, and searching for history within a specific time frame. Because history is stored in monthly files, this documentation also covers how to target an earlier month.

This guide builds on the *range paging mechanics described in the Introduction to MADE Query API documentation and returns rows from the Subscriber History Record (ALTRANHD) table. See those documents for the full parameter list and field definitions.

Date formats

NTD is a timestamp format used by DICE. NTD dates are used when defining time frames within endpoint calls. See the Date Format documentation for information on converting NTD to UNIX and vice versa if needed.

Using Pending Time

Each history event is written with a PENDING_TIME value, an NTD timestamp that only moves forward as new events occur. Rather than paging on the table’s primary key, subscriber history is retrieved by ranging on the PENDING_TIME field.

A request ranged on pending_time returns the events at or after the supplied NTD timestamp, in chronological order, up to the defined *limit. The sections below apply this to two use cases: following live history as it is written, and searching for history within a specific time frame.

Following live history

By repeatedly requesting the events that occur after the last one received, a program can stay up to date with new history as it is written.

  • Setting pending_time to the PENDING_TIME of the last record from the previous request means each new request returns only the events that followed it.
  • Repeating the request on an interval keeps the results current, as any history written since the last request is returned by the next one.

Example requests

  1. The first request establishes the starting point to follow history from.
    • The following request returns up to 100 events at or after the supplied pending_time. To begin tailing from the current moment, set pending_time to the present time converted to NTD.
curl --request GET \
--url 'https://example.securemcloud.com/rest/rest.php?dataSource=dice&*view=altranhd&*limit=100&*range=pending_time&pending_time=739807.56560' \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--header 'X-DICE-APPKEY: {{X-DICE-APPKEY}}' \
--header 'X-DICE-USERNAME: {{X-DICE-USERNAME}}' \
--header 'X-DICE-DATE: {{X-DICE-DATE}}' \
--header 'X-DICE-NONCE: {{X-DICE-NONCE}}' \
--header 'X-DICE-DIGEST: {{X-DICE-DIGEST}}' \
  1. The second (and each subsequent) request sets pending_time to the PENDING_TIME of the last record returned by the previous request, so the system knows where to resume.
    • Please note: like all *range requests, the response begins with the last row of the previous request. If applicable, users may want to have their program discard the extraneous duplicate row.
curl --request GET \
--url 'https://example.securemcloud.com/rest/rest.php?dataSource=dice&*view=altranhd&*limit=100&*range=pending_time&pending_time=739807.56892' \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--header 'X-DICE-APPKEY: {{X-DICE-APPKEY}}' \
--header 'X-DICE-USERNAME: {{X-DICE-USERNAME}}' \
--header 'X-DICE-DATE: {{X-DICE-DATE}}' \
--header 'X-DICE-NONCE: {{X-DICE-NONCE}}' \
--header 'X-DICE-DIGEST: {{X-DICE-DIGEST}}' \
  1. Continue running requests in this manner to tail live history. Because history is constantly updating, there is no end to reach. A request that returns fewer rows than the defined limit simply means the results are caught up to the present moment. Keep issuing requests at the desired interval; as new history is written, each subsequent request returns the new events.

Example response

The following is the response to the first request above. Five events are returned, at or after the supplied pending_time. The PENDING_TIME of the last record (739807.56892) is the value the second request uses to resume.

{
  "ALTRANHD": [
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56560",
      "INCIDENT_NUMBER": "!!06565.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Contact Call List",
      "PENDING_TIME": "739807.56560",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56560",
      "INCIDENT_NUMBER": "!#06565.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Responding Parties",
      "PENDING_TIME": "739807.56560",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56674",
      "INCIDENT_NUMBER": "!!47665.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Contact Call List",
      "PENDING_TIME": "739807.56674",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56694",
      "INCIDENT_NUMBER": "!!49665.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Contact Call List",
      "PENDING_TIME": "739807.56694",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56892",
      "INCIDENT_NUMBER": "!229865.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Account Authorities",
      "PENDING_TIME": "739807.56892",
      "PR_CHECKSUM": 0
    }
  ],
  "totalRecords": 5
}

Searching for a specific time

To retrieve history from within a specific time frame rather than following it forward, add an upper bound to the range with the *to parameter. The request returns the events from the pending_time start value through the *to end value, letting you target a defined window. Both values are NTD timestamps.

Example request

The following request returns the events with a PENDING_TIME between 739807.56560 and 739807.56900.

curl --request GET \
--url 'https://example.securemcloud.com/rest/rest.php?dataSource=dice&*view=altranhd&*limit=100&*range=pending_time&pending_time=739807.56560&*to=739807.56900' \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--header 'X-DICE-APPKEY: {{X-DICE-APPKEY}}' \
--header 'X-DICE-USERNAME: {{X-DICE-USERNAME}}' \
--header 'X-DICE-DATE: {{X-DICE-DATE}}' \
--header 'X-DICE-NONCE: {{X-DICE-NONCE}}' \
--header 'X-DICE-DIGEST: {{X-DICE-DIGEST}}' \

Example response

The following is the response to the request above. Every event with a PENDING_TIME within the defined window is returned, in chronological order.

{
  "ALTRANHD": [
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56560",
      "INCIDENT_NUMBER": "!!06565.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Contact Call List",
      "PENDING_TIME": "739807.56560",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56560",
      "INCIDENT_NUMBER": "!#06565.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Responding Parties",
      "PENDING_TIME": "739807.56560",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56674",
      "INCIDENT_NUMBER": "!!47665.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Contact Call List",
      "PENDING_TIME": "739807.56674",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56694",
      "INCIDENT_NUMBER": "!!49665.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Contact Call List",
      "PENDING_TIME": "739807.56694",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56892",
      "INCIDENT_NUMBER": "!229865.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Account Authorities",
      "PENDING_TIME": "739807.56892",
      "PR_CHECKSUM": 0
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739807.56894",
      "INCIDENT_NUMBER": "!249865.",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "HIST_TEXT": "AUDIT DETAILS FOR Account Authorities",
      "PENDING_TIME": "739807.56894",
      "PR_CHECKSUM": 0
    }
  ],
  "totalRecords": 6
}

Viewing a previous month

Subscriber history is stored in monthly files, and a request reads the current month by default. To view history from an earlier month, add the *year and *month parameters to target that month’s file.

ParameterDefinition
*yearThe two-digit year of the month to view. For example, 26 for 2026.
*monthThe two-digit month to view. For example, 06 for June.
  • Both parameters are used together to target a month. If either is omitted, the current year or month is used in its place.
  • When targeting a previous month with a range, the pending_time (and *to) values should fall within the selected month.

Example request

The following request returns history from June 2026.

curl --request GET \
--url 'https://example.securemcloud.com/rest/rest.php?dataSource=dice&*view=altranhd&*limit=5&*year=26&*month=06&*blanks=all' \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--header 'X-DICE-APPKEY: {{X-DICE-APPKEY}}' \
--header 'X-DICE-USERNAME: {{X-DICE-USERNAME}}' \
--header 'X-DICE-DATE: {{X-DICE-DATE}}' \
--header 'X-DICE-NONCE: {{X-DICE-NONCE}}' \
--header 'X-DICE-DIGEST: {{X-DICE-DIGEST}}' \

Example response

{
  "ALTRANHD": [
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739784.67856",
      "INCIDENT_NUMBER": "  739784",
      "SEIA_CODE": "",
      "ZONE_CODE_1": "",
      "ZONE_CODE_2": "",
      "AREA": "",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "",
      "PRIORITY": "",
      "HIST_TEXT": "C ADDED TO GROUP NEWG - NEW GROUP",
      "ALARM_RESOLUTION": "",
      "AM_NOTIFY": "",
      "DUPLICATE_SIGS": "",
      "PENDING_TIME": "739784.67856",
      "PR_CHECKSUM": 202020,
      "SECOND_ZONE_IS": ""
    },
    {
      "ACCOUNT_NUMBER": "        C",
      "HISTORY_EVENT_NTD": "739784.67856",
      "INCIDENT_NUMBER": "#v65876.",
      "SEIA_CODE": "",
      "ZONE_CODE_1": "",
      "ZONE_CODE_2": "",
      "AREA": "",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "PRIORITY": "",
      "HIST_TEXT": "AUDIT DETAILS FOR Grouping",
      "ALARM_RESOLUTION": "",
      "AM_NOTIFY": "",
      "DUPLICATE_SIGS": "",
      "PENDING_TIME": "739784.67856",
      "PR_CHECKSUM": 0,
      "SECOND_ZONE_IS": ""
    },
    {
      "ACCOUNT_NUMBER": "       00",
      "HISTORY_EVENT_NTD": "739784.67861",
      "INCIDENT_NUMBER": "  739784",
      "SEIA_CODE": "",
      "ZONE_CODE_1": "",
      "ZONE_CODE_2": "",
      "AREA": "",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "",
      "PRIORITY": "",
      "HIST_TEXT": "00 ADDED TO GROUP NEWG - NEW GROUP",
      "ALARM_RESOLUTION": "",
      "AM_NOTIFY": "",
      "DUPLICATE_SIGS": "",
      "PENDING_TIME": "739784.67861",
      "PR_CHECKSUM": 202020,
      "SECOND_ZONE_IS": ""
    },
    {
      "ACCOUNT_NUMBER": "       00",
      "HISTORY_EVENT_NTD": "739784.67861",
      "INCIDENT_NUMBER": "#v16876.",
      "SEIA_CODE": "",
      "ZONE_CODE_1": "",
      "ZONE_CODE_2": "",
      "AREA": "",
      "TYPE": "AUDIT",
      "OPR": "NW",
      "ALARM_CATEGORY": "N",
      "PRIORITY": "",
      "HIST_TEXT": "AUDIT DETAILS FOR Grouping",
      "ALARM_RESOLUTION": "",
      "AM_NOTIFY": "",
      "DUPLICATE_SIGS": "",
      "PENDING_TIME": "739784.67861",
      "PR_CHECKSUM": 0,
      "SECOND_ZONE_IS": ""
    },
    {
      "ACCOUNT_NUMBER": "       00",
      "HISTORY_EVENT_NTD": "739786.43679",
      "INCIDENT_NUMBER": "  096155",
      "SEIA_CODE": "EXPIR",
      "ZONE_CODE_1": "EXPIR",
      "ZONE_CODE_2": "",
      "AREA": "",
      "TYPE": "NOTIFY",
      "OPR": "SYS",
      "ALARM_CATEGORY": "N",
      "PRIORITY": "J",
      "HIST_TEXT": "TESTING HAS EXPIRED",
      "ALARM_RESOLUTION": "",
      "AM_NOTIFY": "N",
      "DUPLICATE_SIGS": "",
      "PENDING_TIME": "739786.43747",
      "PR_CHECKSUM": 16388,
      "SECOND_ZONE_IS": ""
    }
  ],
  "totalRecords": 5
}