Transaction Log Endpoint

 

The Transaction Log endpoint can be used to inspect the system transaction log.

Fetch Module IDs

 

This method returns the list of available Transaction Log module IDs. This is useful for discovering which modules are configured and can be queried via the other Transaction Log endpoints.

To invoke:

GET http://localhost:9000/transaction-log/modules

The server will produce a response resembling the following:

["transaction_log", "broker_txlog"]

Fetch Event Type and Subtype Codes

 

This method returns the complete list of valid event type and subtype codes along with their human-readable descriptions. This is useful for programmatically discovering all available codes that can be used when configuring event whitelists and blacklists, or when filtering results from the Fetch Transaction Log endpoint.

To invoke:

GET http://localhost:9000/transaction-log/event-codes

The server will produce a response resembling the following:

{
  "eventTypes" : [ {
    "code" : "FHIR_REQUEST",
    "description" : "FHIR Request"
  }, {
    "code" : "HL7V2_INBOUND",
    "description" : "HL7 v2.x Inbound"
  } ],
  "eventSubTypes" : [ {
    "code" : "FHIR_READ",
    "description" : "FHIR Read"
  }, {
    "code" : "FHIR_SEARCH",
    "description" : "FHIR Search"
  } ]
}

For brevity only a few entries are shown; the actual response includes all available codes. See Event Types and SubTypes for the full reference list.

Fetch Transaction Log

 
This method requires the VIEW_TRANSACTION_LOG permission.

This method will return summary information about the transaction log, including timestamps, event types, connecting IP addresses, etc. – but without exposing specific details about the contents of requests and responses.


To invoke:

GET http://localhost:9000/transaction-log

You may also add the following URL parameters:

ParameterTypeRequiredDefaultDescription
fromdateNo-The inclusive start range time (in FHIR dateTime format)
todateNo-The inclusive end range time (in FHIR dateTime format)
pageIndexintNo0The page number to return (minimum: 0)
pageSizeintNo100The number of rows to return per page (maximum: 10000)
transactionIdstringNo-Filter by specific transaction ID
userNamestringNo-Filter by username
moduleIdstringNoFirst available moduleSpecify which Transaction Log module to query
completeUrlstringNo-Filter by complete URL
endpointstringNo-Filter by endpoint module ID
eventTypestringNo-Filter by event type code (e.g. FHIR_REQUEST); see Event Types for valid codes
eventSubTypestringNo-Filter by event subtype code (e.g. FHIR_READ); see Event SubTypes for valid codes. Multiple comma-delimited codes may be supplied (e.g. eventSubType=FHIR_OPERATION_SDH_CDA_TO_FHIR,FHIR_TRANSACTION) to match any of the listed subtypes
outcomestringNo-Filter by outcome code (e.g. SUCCESS); see Transaction Log Outcomes for valid codes

The server will produce a response resembling the following:

{
  "moduleId" : "transaction",
  "from" : "2016-12-15T00:00:00.000-05:00",
  "to" : "2016-12-23T00:00:00.000-05:00",
  "pageIndex" : 0,
  "pageSize" : 100,
  "totalRecords" : 1,
  "events" : [ {
    "id" : 1,
    "initialTimestamp" : "2016-12-21T15:51:15.571-05:00",
    "type" : "FHIR_REQUEST",
    "subType" : "FHIR_HISTORY_SYSTEM",
    "outcome" : "SUCCESS",
    "endpointNodeId" : "local",
    "endpointModuleId" : "fhir_endpoint",
    "processingTime" : 3831,
    "endpointLocalHost" : "192.168.0.19",
    "endpointLocalPort" : 8000,
    "endpointRemoteHost" : "192.168.10.132",
    "endpointRemotePort" : 49881,
    "userModuleId" : "local_security"
  } ]
}

For brevity only 1 event is shown but a real response might contain many more.

Note the following details:

  • "moduleId": "transaction" – the module ID of the module that stores the transaction records
  • "type": "FHIR_REQUEST" – this code gives the high level category of the interaction; see Transaction Log Event Types for possible codes
  • "subType" : "FHIR_HISTORY_SYSTEM" – this code gives the specific interaction for this event; see Transaction Log Event SubTypes for possible codes
  • "outcome" : "SUCCESS" – this code shows whether the transaction was completed successfully; see Transaction Log Outcomes for possible codes
  • "endpointModuleId": "fhir_endpoint" – the module ID of the endpoint module that received the request and generated the record
  • "userModuleId": "local_security" – the module ID of the module that manages the security for the user that generated the record

Fetch Individual Event (Deprecated)

 
This method requires the VIEW_TRANSACTION_LOG_EVENT permission.
Deprecated since 2023.05.R01 - Use /{moduleId}/event/{id} instead. See Fetch Individual Event by Module below.

This method will return the details of a given transaction, including request URL, detailed timing information, and request/response bodies for some transaction types. Note this information may have special privacy and security implications so you should consider carefully before exposing this data.


To invoke (substitute a transaction ID into the path below):

GET http://localhost:9000/transaction-log/event/{transaction_id}

You may also add the following URL parameter:

ParameterTypeRequiredDefaultDescription
includeBodybooleanNofalseInclude the request/response body in the response

The server will produce a response resembling the following:

{
  "id": 1,
  "initialTimestamp": "2016-12-21T15:51:15.571-05:00",
  "type": "FHIR_REQUEST",
  "subType": "FHIR_HISTORY_SYSTEM",
  "outcome": "SUCCESS",
  "endpointNodeId": "local",
  "endpointModuleId": "fhir_endpoint",
  "processingTime": 3831,
  "endpointLocalHost": "192.168.0.19",
  "endpointLocalPort": 8000,
  "endpointRemoteHost": "192.168.10.132",
  "endpointRemotePort": 49881,
  "events": [
    {
      "endpointLocalHost": "192.168.0.19",
      "endpointLocalPort": 8000,
      "endpointModuleId": "fhir_endpoint",
      "endpointNodeId": "local",
      "endpointRemoteHost": "192.168.10.132",
      "endpointRemotePort": 49881,
      "initialTimestamp": "2016-12-21T15:51:15.571-05:00",
      "requestUrl": "http://localhost:8000/_history",
      "requestVerb": "GET",
      "type": "ENDPOINT_RECEIVE",
      "userModuleId": "local_security"
    },
    {
      "endpointLocalHost": "192.168.0.19",
      "endpointLocalPort": 8000,
      "endpointModuleId": "fhir_endpoint",
      "endpointNodeId": "local",
      "endpointRemoteHost": "192.168.10.132",
      "endpointRemotePort": 49881,
      "initialTimestamp": "2016-12-21T15:51:19.402-05:00",
      "outcome": "SUCCESS",
      "type": "ENDPOINT_REPLY",
      "responseStatus": 200,
      "userModuleId": "local_security"
    }
  ]
}

Fetch Individual Event by Module

 
This method requires the VIEW_TRANSACTION_LOG_EVENT permission.

This method will return the details of a given transaction from a specific Transaction Log module, including request URL, detailed timing information, and request/response bodies for some transaction types. Note this information may have special privacy and security implications so you should consider carefully before exposing this data.

This is the current recommended method for fetching individual transaction events, replacing the deprecated endpoint that did not specify a module ID.


To invoke (substitute a module ID and transaction ID into the path below):

GET http://localhost:9000/transaction-log/{moduleId}/event/{transaction_id}

The following path elements are required:

ParameterTypeRequiredDescription
moduleIdstringYesThe Transaction Log module ID that stores the transaction records
transaction_idlongYesThe ID of the specific transaction event to retrieve

You may also add the following URL parameter:

ParameterTypeRequiredDefaultDescription
includeBodybooleanNofalseInclude the request/response body in the response

The server will produce a response resembling the following:

{
  "id": 1,
  "initialTimestamp": "2016-12-21T15:51:15.571-05:00",
  "type": "FHIR_REQUEST",
  "subType": "FHIR_HISTORY_SYSTEM",
  "outcome": "SUCCESS",
  "endpointNodeId": "local",
  "endpointModuleId": "fhir_endpoint",
  "processingTime": 3831,
  "endpointLocalHost": "192.168.0.19",
  "endpointLocalPort": 8000,
  "endpointRemoteHost": "192.168.10.132",
  "endpointRemotePort": 49881,
  "events": [
    {
      "endpointLocalHost": "192.168.0.19",
      "endpointLocalPort": 8000,
      "endpointModuleId": "fhir_endpoint",
      "endpointNodeId": "local",
      "endpointRemoteHost": "192.168.10.132",
      "endpointRemotePort": 49881,
      "initialTimestamp": "2016-12-21T15:51:15.571-05:00",
      "requestUrl": "http://localhost:8000/_history",
      "requestVerb": "GET",
      "type": "ENDPOINT_RECEIVE",
      "userModuleId": "local_security"
    },
    {
      "endpointLocalHost": "192.168.0.19",
      "endpointLocalPort": 8000,
      "endpointModuleId": "fhir_endpoint",
      "endpointNodeId": "local",
      "endpointRemoteHost": "192.168.10.132",
      "endpointRemotePort": 49881,
      "initialTimestamp": "2016-12-21T15:51:19.402-05:00",
      "outcome": "SUCCESS",
      "type": "ENDPOINT_REPLY",
      "responseStatus": 200,
      "userModuleId": "local_security"
    }
  ]
}