.json
file or from the API Designer in the Tyk Dashboard.
If you’re using the legacy Tyk Classic APIs, then check out the Tyk Classic page.
operationId
defined in the OpenAPI Document that declares both the path and method for which the middleware should be added. The path
can contain wildcards in the form of any string bracketed by curly braces, for example {user_id}
. These wildcards are so they are human readable and do not translate to variable names. Under the hood, a wildcard translates to the “match everything” regex of: (.*)
.
The do-not-track middleware (doNotTrackEndpoint
) can be added to the operations
section of the Tyk OAS Extension (x-tyk-api-gateway
) in your Tyk OAS API Definition for the appropriate operationId
(as configured in the paths
section of your OpenAPI Document).
The doNotTrackEndpoint
object has the following configuration:
enabled
: enable the middleware for the endpointGET /anything
endpoint. Any such calls will not generate transaction records from the Gateway and so will not appear in the analytics.
The configuration above is a complete and valid Tyk OAS API Definition that you can import into Tyk to try out the do-not-track middleware.
.json
file or from the API Designer in the Tyk Dashboard.
If you’re using the newer Tyk OAS APIs, then check out the Tyk OAS page.
If you’re using Tyk Operator then check out the configuring the middleware in Tyk Operator section below.
do_not_track
field in the root of your API definition.
true
: no transaction logs will be generated for requests to the APIfalse
: transaction logs will be generated for requests to the APIdo_not_track_endpoints
object to the extended_paths
section of your API definition.
The do_not_track_endpoints
object has the following configuration:
path
: the endpoint pathmethod
: the endpoint HTTP methodpath
can contain wildcards in the form of any string bracketed by curly braces, for example {user_id}
. These wildcards are so they are human readable and do not translate to variable names. Under the hood, a wildcard translates to the “match everything” regex of: (.*)
.
For example:
GET /anything
endpoint. Any such calls will not generate transaction records from the Gateway and so will not appear in the analytics.
do_not_track
field in the root of your API definition as follows:
true
: no transaction logs will be generated for requests to the APIfalse
: transaction logs will be generated for requests to the APIdo_not_track_endpoints
list to the extended_paths section of your API definition.
This should contain a list of objects representing each endpoint path
and method
that should have tracking disabled:
do_not_track_endpoints
list is configured so that requests to GET /headers
will have tracking disabled.