You're viewing legacy documentation for API Fortress (deployed via an on-premises container). To view documentation for the new SaaS version of API Fortress — now known as Sauce Labs API Testing and Monitoring (with Sauce Connect tunnels) — see API Testing on the Sauce Labs Cloud.
Replaces the upstream base URL if a certain condition is verified.
expression: a SpEL expression returning a boolean. The condition to be matched
upstream: the new upstream base URL
Labels the current request based on certain factors. The label is then stored within the request in a variable named callId. The use of this actor is to identify calls and take subsequent actions based on the findings.
The configuration looks like the following.
label: the label to assign
url: the regex to identify the URL
method(optional): the method of the call
Alters a textual payload in a message. If the transformer is placed before an Upstream actor, it modifies the request payload. If after, it modifies the response payload.
set: sets the payload with the given value
replace: replaces all the substrings matching a certain regular expression with the provided string. Example:
Deserialize data coming in form of string or array of bytes, to data structures (maps, arrays). The output of this operation is then stored into a
expression: a path to the piece of data you wish to deserialize. For example
#msg.request().payload()is the path to the request payload
contentType: the expected content type of the inbound data
meta: the key of the meta that will store the result of the deserialization
Adds a piece of meta information in the message.
name: the key of the meta
value: the value of the meta. If
evaluatedis set to
true, it can be a dynamic expression
evaluated: true if you need the value to be evaluated
Filters out any request that does not carry a valid API key in the headers or in the query string. This base actor loads the API keys from a YAML file.
When the API key is recognized, the ApiKey object is stored in the
key meta of the request.
filename: path to a file containing the API keys
query(expecting the key in the query string) or
header(expecting the key in the headers)
name: key of the field carrying the API key
The file format looks like the following:
- api_key: ABC123
app_id: John Doe
- api_key: DEF456
app_id: Jane Doe
Filters out any request that does not carry a valid basic authentication header. The valid users are stored in an htpasswd (md5, apr1) compatible file.
When the authentication succeeds, the username is stored in the
user meta of the request.
filename: path to a htpasswd-compatible file
Limits the number of requests/second the gateway will accept and pass through. Multiple counting buckets are present.
global: (int) the maximum number of requests per second globally for this flow
app_id: (int) maximum number of requests per second per App ID (as defined by API keys)
ip_address: (int) maximum number of requests per second per requesting IP address
- Module Actors: Read more about Bloodhound Modules