Ana içeriğe geç

API Traffic Log Record Data Structure

Data Structure Fields​

Field NameData/Description Stored in FieldJava Mapping TypeField that must be enabled in settings to be included in message
@timestampTime StampInstantDefinition Information
aciApinizer Correlation IDStringDefinition Information
eiEnvironment IDStringDefinition Information
piProject IDStringDefinition Information
appiApplication IDStringAPI Proxy Information
appinApplication NameStringAPI Proxy Information
apiAPI Proxy IDStringAPI Proxy Information
apnAPI Proxy NameStringAPI Proxy Information
eatAPI TypeStringAPI Proxy Information
aprpAPI Proxy Relative PathStringAPI Proxy Information
apmiAPI Proxy Method IDStringAPI Proxy Information
apmnAPI Proxy Method NameStringAPI Proxy Information
xffX Forwarded ForStringRequest Information
hr1raHttp Request Remote AddressStringRequest Information
hr1hmHttp Request Http MethodStringRequest Information
hr1ctHttp Request Content TypeStringRequest Information
hr1piHttp Request Path InfoStringRequest Information
uokUsername or KeyStringRequest Information
ackAPI Client KeyStringRequest Information
cotClient Owner TypeStringRequest Information
coiClient Owner IdStringRequest Information
cooClient Organization IdStringRequest Information
hr1cpHttp Request Context PathStringRequest Information
hr1qsHttp Request Query StringStringRequest Information (Only when "Trace" is enabled)
hr1ruHttp Request Remote UserStringRequest Information (Only when "Trace" is enabled)
hr1rsiHttp Request Requested Session IdStringRequest Information (Only when "Trace" is enabled)
hr1r1uHttp Request Request URIStringRequest Information (Only when "Trace" is enabled)
hr1ceHttp Request Character EncodingStringRequest Information (Only when "Trace" is enabled)
hr1clHttp Request Content LengthIntegerRequest Information (Only when "Trace" is enabled)
hr1pHttp Request ProtocolStringRequest Information (Only when "Trace" is enabled)
hr1sHttp Request SchemeStringRequest Information (Only when "Trace" is enabled)
hr1snHttp Request Server NameStringRequest Information (Only when "Trace" is enabled)
hr1spHttp Request Server PortIntegerRequest Information (Only when "Trace" is enabled)
locLocationGeoLocation{Double lat, Double lon}Request Information
hr1rhHttp Request Remote HostStringRequest Information (Only when "Trace" is enabled)
hr1rpHttp Request Remote PortIntegerRequest Information (Only when "Trace" is enabled)
hr1lnHttp Request Local NameStringRequest Information (Only when "Trace" is enabled)
hr1laHttp Request Local AddressStringRequest Information (Only when "Trace" is enabled)
hr1lpHttp Request Local PortStringRequest Information (Only when "Trace" is enabled)
trqptTimeRequestPipelineTotalIntegerMetric Information
trsptTimeResponsePipelineTotalIntegerMetric Information
rrcRoutingRetryCountIntegerMetric Information
rfcRoutingFailoverCountIntegerMetric Information
trtTimeRoutingTotalIntegerMetric Information
taptTimeApiProxyTotalIntegerMetric Information
chCacheHitBooleanMetric Information
sr1tSizeRequestTotalIntegerMetric Information
sr2tSizeResponseTotalIntegerMetric Information
scStatus CodeIntegerResponse Information
rtResult TypeEnumResponse Information
etError TypeEnumResponse Information
petParent Error TypeEnumResponse Information
afrAuthentication Failure ReasonEnumResponse Information (LDAP authentication policy only)
fcrpFrom Client Read Only ParameterMap<String,String>Header from Client
fcrhFrom Client Read Only HeaderMap<String,String>Param from Client
fcrbFrom Client Read Only BodyStringBody from Client
tbapTo Backend API ParameterMap<String,String>Header to Backend API
tbahTo Backend API HeaderMap<String,String>Parameter to Backend API
tbaTo Backend API BodyStringBody to Backend API
fbarhFrom Backend API Read Only HeaderMap<String,String>Header from Backend API. Contains only the headers sent by the target API; headers added by the gateway (such as RateLimit-*, Retry-After, WWW-Authenticate) are not included
fbarbFrom Backend API Read Only BodyStringBody from Backend API
tchTo Client HeaderMap<String,String>Header to Client. Contains the response headers written to the client, including those added by the gateway
tcbTo Client BodyStringBody to Client
pxtPolicy Execution TimesNested<Object>Policy Execution Times
Note

The uok field carries only a resolved identity, never the credential the client presented. When an authentication policy rejects a request before any identity can be resolved, the field falls back to the identity resolved by the rate limiting policy, and to anonymous when there is none. You can therefore correlate rejected requests through the aci field instead of searching for a token or key value.

Why Was an API Request Rejected by LDAP Authentication?​

When an LDAP authentication policy rejects a request, the afr field records one of these reasons:

  • Sign-in failed: the credentials were rejected, or the account is locked, disabled, or expired in the directory.
  • User not found: the search for the user returned no result.
  • Role missing: the user was verified, but does not carry a role the policy requires.
  • Directory unreachable: the directory could not be reached at all — a network, TLS, or timeout problem.

The afr value is never returned to the client; it is only available in the traffic log for operators. When the directory is unreachable, the request is rejected with a service-unavailable error instead of the usual 401 authentication error, because the request could not be evaluated at all.

Warning

The order of fields may change.

Sparse Fields​

The fields below are written only when they apply to the request, for example only on AI traffic or only when a routing failure was recorded. Other records do not carry them, and the field groups in the table above do not control them.

Client and Subscription​

Field NameData/Description Stored in FieldJava Mapping Type
usubStable user ID: the sub claim of an IdP token, or the client itself for a client_credentials tokenString
uidsToken issuer (iss) of an IdP token; apinizer for a token issued by ApinizerString
ocidOAuth client the token was issued to (azp, otherwise client_id)String
subiSubscription IDString
subpSubscription product IDString
subplSubscription plan IDString
suboConsumer organization ID of the subscriptionString

Routing, Canary and Mirror​

Field NameData/Description Stored in FieldJava Mapping Type
aprAPI Proxy revisionString
raRouting addressString
icrWhether the request was routed as a canary requestBoolean
crsCanary routing statusEnum
mcNumber of mirror requests sentInteger
mscNumber of successful mirror requestsInteger
mfcNumber of failed mirror requestsInteger
mtdTotal duration of the mirror requestsLong
maMirror addressesList<String>

Routing Diagnostics​

Field NameData/Description Stored in FieldJava Mapping Type
rfrRouting failure reasonString
rcoConfidence of the failure reason (HIGH, MEDIUM, LOW)String
recException class nameString
redSanitized and truncated exception messageString
rdselUpstream selection time (ns)Long
rddnsDNS resolve time (ns)Long
rdtcpTCP connect time (ns)Long
rdtlsTLS handshake time (ns)Long
rdttfbTime to first byte (ns); -1 when there was no responseLong
rdbrdResponse body read time (ns)Long
rdpwTime spent waiting for a connection from the pool (ns)Long
uscRaw status code returned by the backend (separate from the status returned to the client)Short
uipUpstream ip:port actually connected toString
crfWhether a pooled connection was reusedBoolean
rtrWhether the request reached a backend that respondedBoolean
gwWorker pod/host that processed the requestString
pllConnections leased in the poolShort
plpPending connection requests in the poolShort
plaAvailable connections in the poolShort
plmMaximum connections in the poolShort
cctConfigured connect timeout (ms)Integer
crtConfigured read timeout (ms)Integer
ccrtConfigured connection-request (pool lease) timeout (ms)Integer
cwmsTime spent writing the response to the client (ms); -1 for streaming responsesInteger

MCP​

Field NameData/Description Stored in FieldJava Mapping Type
mcptnName of the MCP tool called by the requestString
mcpjridJSON-RPC correlation IDString
mcprcOutcome class of a tools/call: OK, TOOL_ERROR, JSONRPC_ERROR, TRANSPORT, POLICY_REJECTString
mcpapApproval state of a tools/call held for approvalString
mcptnoDistinct names of the outbound MCP tools called during the request, comma-separated (cut at 256 characters, marked with ,…)String
mcptcoTotal number of outbound tool calls during the requestInteger

A2A​

Field NameData/Description Stored in FieldJava Mapping Type
a2atkA2A task IDString
a2actA2A context ID (multi-turn correlation)String
a2atsLatest A2A task state, for example COMPLETED or FAILEDString
a2asnoDistinct names of the outbound agent skills called during the request, comma-separated (cut at 256 characters)String
a2aacoTotal number of outbound agent calls during the requestInteger

AI​

Field NameData/Description Stored in FieldJava Mapping Type
aipLLM provider type (for example openai, anthropic)String
aipidID of the LLM provider record that served the requestString
aimModel nameString
aidtDeployment type: CLOUD, ON_PREM, or OTHERString
aitiPrompt (input) tokensLong
aitoCompletion (output) tokensLong
aitcCached prompt tokensLong
aicmCost in micro USD (cost × 1,000,000)Long
aicimInput token cost in micro USDLong
aicomOutput token cost in micro USDLong
aiccmCached token cost in micro USDLong
aittftTime to first token (ms)Long
aitpotAverage time per output token (ms)Long
ailatTotal latency (ms)Long
aigtmsTotal time of the guardrail stage (ms)Long
aiinfUpstream LLM HTTP latency (ms)Long
aiovhGateway overhead: total minus guardrail minus inference (ms)Long
aischWhether the semantic cache returned a hitBoolean
aighGuard that was triggeredString
aigcCategory of the triggered ruleString
aigvVerdict of the external guardrail: SAFE, UNSAFE, TIMEOUT, ERROR, or SKIPString
aipdWhether PII was detectedBoolean
aifrFinish reason (stop, length, tool_use, content_filter)String
aistrWhether the response was streamedBoolean
aivkIdentity of the authenticated caller (the principal, not a record ID)String
aitidAI trace record referenceString
aiffPrimary provider that failed overString
aiqscSoft-cap percentage that was crossed (for example 80)Integer
aiqaoWhether an ALERT_ONLY overflow fired and the request proceededBoolean
airclLabel returned by the route classifierString
aircsRoute classifier outcome: MATCHED, NONE, UNKNOWN_LABEL, TIMEOUT, ERROR, TRUNCATED, BACKOFF, NO_PROVIDER, or NO_INPUTString
aircmsRoute classifier call latency (ms)Long
airctiRoute classifier prompt tokensLong
airctoRoute classifier completion tokensLong
airccmRoute classifier cost in micro USD (not included in aicm)Long
aivsWhy the request continued without the vector layer (RAG, semantic cache, or Topic Guard)String

Example JSON Data​

Example JSON data created:

{
"@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,
"loc" : {
"lat" : 45.405,
"lon" : 11.1617
},
"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>"
}
Info

You can examine the list of values in the "rt" field in the "Result Type Values" table on the Error Messages page.

You can examine the list of values in the "pet" field in the "Parent Error Type Values" table on the Error Messages page.

You can examine the list of values in the "et" field in the "Error Type Values" table on the Error Messages page.

Policy Execution Times (pxt)​

pxt is written only when Policy execution times is enabled on the log target (off by default). It is a nested array; each item describes one policy execution on that request.

KeyFieldTypeDescription
oOrderIntegerExecution order. Also encodes the pipeline region: 0-9999 request, 10000-19999 response, 20000+ error. The position within the region is o % 10000.
tPolicy TypeStringPolicy type slug, for example jwt-auth, content-filter, ai-semantic-cache.
dDurationIntegerPolicy duration in milliseconds.
fFlagStringSingle character, absent on ordinary records. S stream end, K skipped (condition not met), X skipped stream end, T list truncated.

The policy name is not stored: it is usually an auto-generated identifier and carries no meaning. No body, header or parameter content is written to pxt — for that level of detail use Trace.

"pxt": [
{ "o": 1, "t": "jwt-auth", "d": 12 },
{ "o": 2, "t": "rate-limit", "d": 3 },
{ "o": 10001, "t": "content-filter", "d": 41 },
{ "o": 10002, "t": "ai-semantic-cache", "d": 8, "f": "S" }
]

On a relational (SQL/JDBC) log target the same data is written to the policy_exec_times column as a single capped CSV of order:type:duration triplets:

1:jwt-auth:12|2:rate-limit:3|10001:content-filter:41|10002:ai-semantic-cache:8[S]

If a request runs an unusually large number of policies, the list is cut off instead of growing without bound, and the cut is marked rather than silent — the two representations mark it differently. On Elasticsearch and MongoDB a final item is appended with t set to +truncated, f set to T, no o, and d holding the count of policies that were left out (not a duration). On the policy_exec_times CSV the string itself is cut and |+N is appended at the end (N = the number of triplets omitted) — a value ending in …|+12 means 12 policy records did not fit in the column.

The policy_exec_times column does not exist in installations upgraded from an earlier version; it must be added once per environment database with the ALTER script on the 2026.09.1 — Log Table ALTER Scripts page. New installations already get the column from the Apinizer Log Table Creation Commands page. Which policies are recorded and on which targets is configured on the API Traffic Settings page.