API Traffic Log Data Structure
The API Traffic Log Data Structure fields, which include API Traffic request and response messages, and various metadata information are given below.
A log connector in an environment sends a log data with these fields.
Field Name | Field Description | Java Mapping Type | The field that needs to be activated in the settings to be included in the message |
---|---|---|---|
@timestamp | Time Stamp | Instant | Identification Metadata |
aci | Apinizer Correlation ID | String | Identification Metadata |
ei | Environment ID | String | Identification Metadata |
pi | Project ID | String | Identification Metadata |
appi | Application ID | String | API Proxy Metadata |
appin | Application Name | String | API Proxy Metadata |
api | API Proxy ID | String | API Proxy Metadata |
apn | API Proxy Name | String | API Proxy Metadata |
eat | API Type | String | API Proxy Metadata |
aprp | API Proxy Relative Path | String | API Proxy Metadata |
apmi | API Proxy Method ID | String | API Proxy Metadata |
apmn | API Proxy Method Name | String | API Proxy Metadata |
xff | X Forwarded For | String | Request Metadata |
hr1ra | Http Request Remote Address | String | Request Metadata |
hr1hm | Http Request Http Method | String | Request Metadata |
hr1ct | Http Request Content Type | String | Request Metadata |
hr1pi | Http Request Path Info | String | Request Metadata |
uok | Username or Key | String | Request Metadata |
hr1cp | Http Request Context Path | String | Request Metadata |
hr1qs | Http Request Query String | String | Request Metadata (Only when "Trace" is enabled) |
hr1ru | Http Request Remote User | String | Request Metadata (Only when "Trace" is enabled) |
hr1rsi | Http Request Requested Session Id | String | Request Metadata (Only when "Trace" is enabled) |
hr1r1u | Http Request Request URI | String | Request Metadata (Only when "Trace" is enabled) |
hr1ce | Http Request Character Encoding | String | Request Metadata (Only when "Trace" is enabled) |
hr1cl | Http Request Content Length | Integer | Request Metadata (Only when "Trace" is enabled) |
hr1p | Http Request Protocol | String | Request Metadata (Only when "Trace" is enabled) |
hr1s | Http Request Scheme | String | Request Metadata (Only when "Trace" is enabled) |
hr1sn | Http Request Server Name | String | Request Metadata (Only when "Trace" is enabled) |
hr1sp | Http Request Server Port | Integer | Request Metadata (Only when "Trace" is enabled) |
hr1rh | Http Request Remote Host | String | Request Metadata (Only when "Trace" is enabled) |
hr1rp | Http Request Remote Port | Integer | Request Metadata (Only when "Trace" is enabled) |
hr1ln | Http Request Local Name | String | Request Metadata (Only when "Trace" is enabled) |
hr1la | Http Request Local Address | String | Request Metadata (Only when "Trace" is enabled) |
hr1lp | Http Request Local Port | String | Request Metadata (Only when "Trace" is enabled) |
trqpt | TimeRequestPipelineTotal | Integer | Metrics |
trspt | TimeResponsePipelineTotal | Integer | Metrics |
rrc | RoutingRetryCount | Integer | Metrics |
rfc | RoutingFailoverCount | Integer | Metrics |
trt | TimeRoutingTotal | Integer | Metrics |
tapt | TimeApiProxyTotal | Integer | Metrics |
ch | CacheHit | Boolean | Metrics |
sr1t | SizeRequestTotal | Integer | Metrics |
sr2t | SizeResponseTotal | Integer | Metrics |
sc | Status Code | Integer | Response Metadata |
rt | Result Type | Enum | Response Metadata |
et | Error Type | Enum | Response Metadata |
pet | Parent Error Type | Enum | Response Metadata |
fcrp | From Client Read Only Parameter | Map<String,String> | Header from Client |
fcrh | From Client Read Only Header | Map<String,String> | Param from Client |
fcrb | From Client Read Only Body | String | Body from Client |
tbap | To Backend API Parameter | Map<String,String> | |
tbah | To Backend API Header | Map<String,String> | |
tba | To Backend API Body | String | |
fbarh | From Backend API Read Only Header | Map<String,String> | Header from |
fbarb | From Backend API Read Only Body | String | Body from |
tch | To Client Header | Map<String,String> | Header to Client |
tcb | To Client Body | String | Body to Client |
Order of the fields can change.
The resulting sample JSON data:
{
"@timestamp" : "2023-10-16T14:48:07.662Z",
"aci" : "<correlation id>",
"ei" : "<environment id>",
"pi" : "<project id>",
"appi" : "<api proxy group id>",
"appin" : "<api proxy group name>",
"api" : "<api proxy id>",
"apn" : "<api proxy name>",
"eat" : "REST",
"aprp" : "<api proxy relative path>",
"apmi" : "<api proxy method id>",
"apmn" : "<api proxy method name>",
"xff" : "<x-forwarded-for>",
"hr1ra" : "<client address>",
"hr1hm" : "<HTTP Method>",
"hr1ct" : "<Content-Type>",
"hr1pi" : "<http request path info>",
"uok" : "<username or key>",
"hr1cp" : "<http request context path>",
"ra" : "<backend api address>",
"rrc" : 0,
"rfc" : 0,
"trqpt" : 20,
"trspt" : 30,
"trt" : 100,
"tapt" : 150,
"sr1t" : 100,
"sr2t" : 250,
"ch" : false,
"sc" : 200,
"et" : "APIPROXY",
"pet" : "API_PROXY",
"rt" : "SUCCESS",
"hr1qs" : "<Http Request Query String>",
"hr1ru" : "<Http Request Remote User>",
"hr1rsi" : "<Http Request Requested Session Id>",
"hr1r1u" : "<Http Request Request URI>",
"hr1ce" : "<Http Request Character Encoding>",
"hr1cl" : 100,
"hr1p" : "<Http Request Protocol>",
"hr1s" : "<Http Request Scheme>",
"hr1sn" : "<Http Request Server Name>",
"hr1sp" : 443,
"hr1rh" : "<Http Request Remote Host>",
"hr1rp" : 8443,
"hr1ln" : "<Http Request Local Name>",
"hr1la" : "<Http Request Local Addr>",
"hr1lp" : 443,
"fcrp" : [ {
"k" : "key1",
"v" : "value1"
}, {
"k" : "key2",
"v" : "value2"
}, {
"k" : "key3",
"v" : "value3"
} ],
"fcrh" : [ {
"k" : "key1",
"v" : "value1"
}, {
"k" : "key2",
"v" : "value2"
}, {
"k" : "key3",
"v" : "value3"
} ],
"fcrb" : "<request body from client>",
"tbap" : [ {
"k" : "key1",
"v" : "value1"
}, {
"k" : "key2",
"v" : "value2"
}, {
"k" : "key3",
"v" : "value3"
} ],
"tbah" : [ {
"k" : "key1",
"v" : "value1"
}, {
"k" : "key2",
"v" : "value2"
}, {
"k" : "key3",
"v" : "value3"
} ],
"tba" : "<request body to backend api>",
"fbarh" : [ {
"k" : "key1",
"v" : "value1"
}, {
"k" : "key2",
"v" : "value2"
}, {
"k" : "key3",
"v" : "value3"
} ],
"fbarb" : "<body response from backend api>",
"tch" : [ {
"k" : "key1",
"v" : "value1"
}, {
"k" : "key2",
"v" : "value2"
}, {
"k" : "key3",
"v" : "value3"
} ],
"tcb" : "<body response to client>"
}
You can view the list of values in the "rt" field in the "Result Type Enum Values" table on the Error Messages page.
You can view the list of values in the "pet" field in the "Parent Error Type Values" table on the Error Messages page.
You can view the list of values in the "et" field in the "Error Type Values" table on the Error Messages page.