For arlanix/api-monitor 1.0.1
Capture and sanitisation
API Monitor captures native REST, SOAP and GraphQL requests after sending the final response. Storefront and admin responses are excluded. Requests a CDN answers, requests rejected before Magento's API dispatch starts, and requests lost when the process dies leave no record. Logging failures do not change the API result or save a fallback body.
Duration covers API dispatch through response sending, excluding network delivery and later asynchronous work.
Failures
These failures affect anomaly counters and sampling:
- HTTP status 400 or higher counts as an error; 401 and 403 count as authentication or authorisation failures.
- GraphQL top-level
errorscount even with HTTP 200. Categoriesgraphql-authorizationandgraphql-authenticationcount as authentication failures. Responses over 1 MiB receive HTTP-only classification. - SOAP faults count as errors. A fault also counts as an authentication failure when its reason (SOAP 1.2
Reason/Text, SOAP 1.1faultstring) carries one of Magento's sign-in, consumer, two-factor, permission or locked-account messages. Other faults that mention authorization, such as a declined payment authorization, do not. Inspection covers the larger of 8 KiB and the body limit; a fault cut off after its reason is still classified. - REST classification uses HTTP status only.
Every logged request records whether it was an authentication failure, using the same rule as the authentication alert. Auth failure shows Yes or No in Request Logs and the request details. The column is hidden by default and available under Columns.
Cart
Cart contains the full 32-character alphanumeric guest cart ID. It comes from /guest-carts/<id> paths or GraphQL cart_id, source_cart_id and destination_cart_id arguments, input fields or variables, including GET requests. Oversized GraphQL bodies or GET queries leave Cart empty. See Cart reference and access risks.
Route
Route identifies the operation independently of values in the path:
| Protocol | Saved value |
|---|---|
| REST | Magento's matched route template, for example /V1/guest-carts/:cartId/items. |
| GraphQL | The valid operationName sent with the request, otherwise the name of the first named operation in the document. Batches use the first operation. Empty for an anonymous operation, or when the request body was not saved, for example over the body size limit. |
| SOAP | The request's services query value. |
When no route is known, Route is empty. A SOAP services value containing token, password or twoFactorAuth omits both bodies with the reason Sensitive endpoint.
Sanitisation
API Monitor sanitises structured JSON and XML before storage.
- Secrets become
[removed]. Field names match substrings, ignoring case and punctuation:password,passwd,secret,token,authorization,cookie,apikey,privatekey,confirmationkey,cardnumber,ccnumber,cccid,ccexp,ccss,additionaldata,cvv,cvc,securitycode,iban,payment,cryptogram,qrcodebase64. Keys named exactlyconfirmation(account confirmation keys) orotp(two-factor codes) are also removed. Confirmation status such asconfirmation_statusstays readable unless added to Additional sensitive field names. - When
attribute_code,attributeCode,code,field,keyorfieldNamenames a built-in or configured sensitive field, its siblingvalueandselected_optionsbecome[removed]. This covers custom attributes, search filters and error parameters, including nestedsearchCriteria, GraphQL aliases and SOAP collections that carryfieldNameandvaluein separate entries. The attribute or filter name stays readable unless its own field name is sensitive. Configured names also match substrings: addingcodeto Additional sensitive field names hidesattribute_codeitself. - API Monitor replaces plain values with
[removed]in JSON lists at the top level of a body, REST XML roots and their directitemchildren, and SOAP responseresultvalues. Lists nested under a field keep their values. XML comments and processing instructions are deleted, sensitive attributes are masked, and DTD or entity declarations are rejected. - Text and numbers written in a GraphQL query become
"REMOVED",REMOVEDor0. Variables and unknown request values become[removed];true,false,nulland a stringoperationNamestay. Unreadable queries show[unparseable GraphQL omitted], and the response body is omitted. Deeply nested content becomes[depth limit]in JSON,[removed]in XML. - Saved bodies keep
quoteId,cartIdandmaskedId. GraphQL responses keep cart IDs, including aliases and fragment selections; sensitive aliases are still masked. Add a key to Additional sensitive field names to hide it again. GraphQL request literals and variables follow the rule above. - GraphQL request errors show
GraphQL request error [removed]; variable errors showVariable "$<name>" got invalid value [removed]. Other messages have double-quoted values masked even without a closing quote, and single-quoted values only when the quote closes. Unquoted values and single-quoted values without a closing quote can remain; consider this when granting body access. Debug fieldsdebugMessage,trace,extensions.debugMessage,extensions.trace,extensions.fileandextensions.lineare removed. - REST error responses lose their
tracefield and SOAP faults theirTraceelement before the size limit applies. Developer mode adds them, and they can hold argument values. - Paths are stored in full without the query string, after decoding and collapsing repeated slashes. Guest cart IDs, SKUs, order IDs and customer IDs stay in the path, within the size limit below.
- A REST path whose matched route has an email parameter shows the parameter name, such as
:email, to admins withoutMagento_Customer::manage. This applies in Request Logs and the request details. For these admins, the Path filter excludes those requests, and sorting by Path uses their route templates instead of email addresses. If the path cannot be reliably matched to its route, the route template is shown. Admins with this permission see the full saved path. These display rules do not alter the stored path; when no route matched, email addresses can remain visible to everyone. - When Magento matched a REST route, a parameter whose name contains
tokenorpasswordis replaced by its name, for example/V1/customers/5/password/resetLinkToken/:resetPasswordLinkToken. Routes whose template containstokenorpasswordor starts with/V1/tfa/, including admin and customer token endpoints, password reset and two-factor authentication, keep the path with these replacements but omit both bodies with the reasonSensitive endpoint. - When no route matched, a path containing
token,passwordor/V1/tfa/becomes/[sensitive endpoint]and both bodies are omitted. Unparseable URIs are sensitive too. - Paths containing
paymentorcreditcardare stored with sanitised bodies. Payment fields such aspaymentMethod, including itsadditional_data, are removed. Card security codes, expiry and start dates, and paymentadditional_dataare removed wherever they appear, including in the selected payment method (PUT …/selected-payment-method). - REST and SOAP query values are kept and sanitised like bodies, including sensitive names, custom attributes and search filters. Nested values keep their structure, with up to 100 top-level query names. If the sanitised query exceeds the body size limit, only its names remain, with
[removed]values. GraphQL query values and query values on sensitive endpoints are removed. GraphQL GET queries show[query omitted; use POST for sanitized query capture].
API Monitor keeps only these request and response headers: content-type, content-length, accept, accept-encoding, user-agent, host, store, content-language, cache-control, retry-after, x-request-id.
Header values, paths, routes and user agents are limited to 1,024 bytes. Unreadable headers are skipped.
Oversized request and response bodies are omitted before parsing. Limits apply separately; shortened output shows Shortened to the size limit. See Configuration for limits.
The panel shows Not stored: with one of these reasons and a byte count when available:
Body exceeds configured limitScalar bodyUnsupported or malformed bodySensitive endpointGraphQL operation not parsed
Peer and forwarded addresses
IP uses validated REMOTE_ADDR, or an empty value. Only this peer feeds anomaly counters. Configure trusted proxy real-IP handling at the web server.
Forwarded IP takes the first valid address different from the peer, checking CF-Connecting-IP, True-Client-IP, X-Real-IP, X-Forwarded-For, then Forwarded. Lists are read left to right; IPv4-mapped IPv6 is compared as IPv4. If no address differs or a header is unreadable, it stays empty. Clients can forge it; it never replaces the peer.
Custom APIs and fields
Capture covers only Magento's native REST, SOAP and GraphQL controllers. Custom frontend controllers, third-party transports and replaced controllers are not captured. Check these, streaming responses and SOAP envelopes on your own store. Add custom secrets through Additional sensitive field names; built-in exclusions remain. Arbitrary text and cart IDs can remain; see Personal data in saved bodies.