The API Fortress connector allows you to send API payloads to API Fortress for testing

Additional Info

Requires Mule Enterprise License

Yes  

Requires Entitlement

No  

Mule Version

3.8.0 or higher

Configs


Configuration

<api-fortress:config>

Configuration The global configuration

Attributes

Name Java Type Description Default Value Required

name

String

The name of this configuration. With this name can be later referenced.

x 

totalConnections

int

Max number of simultaneous connections

2

 

connectTimeout

int

Timeout during connection in seconds

5

 

socketTimeout

int

Socket timeout in seconds

30

 

threshold

int

The threshold multiplier. The connector counts the test requests and accepts them only when the counter is a multiple of this value. This is done to relax the sampling rate

1

 

silent

boolean

When set to true, no notification will be triggered

false

 

dryRun

boolean

When set to true, events won't be saved in API Fortress

false

 

Processors


Single test synchronous

<api-fortress:single-test-synchronous>

Runs a single test in a synchronous flavor. The connector will wait for the result of the test and set it as payload

XML Sample

<api-fortress:single-test-synchronous config-ref="API_Fortress__Configuration" hook="https://mastiff.apifortress.com/app/api/rest/v3/55a33b1e-4c54-48f2-a60a-ab55550f28b696"  testId="57ad92d81ed1aa212dd978bf" />

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

payload

Object

The payload, either in the form of string or object. The valid string formats are JSON, XML or plain text. The object can be anything that can be converted into a JSON

#[payload]

 

hook

String

The API Hook URL. You can retrieve this in your API Fortress company account

x 

testId

String

The test id. It can be found in the test interstitial page, on the API Fortress dashboard

x 

headers

Map<String,Object>

The response headers of the payload it's being tested. 'content-type' is the only mandatory header

#[message.inboundProperties]

 

variables

Map<String,Object>

Extra variables to be injected in the scope of the test. Ie. server name, flow name, geographic location, local time

 

Returns

Return Java Type Description

TestExecutionResponse

A TestExecutionResponse object, containing the test result information, such as failures count, warnings count and critical failures


Single test passthrough

<api-fortress:single-test-passthrough>

Runs a single test in an asynchronous flavor. The input payload will be put back in the flow untouched once the operation is done, so that further actions can be done on it by the rest of the flow.

XML Sample

<api-fortress:single-test-passthrough config-ref="API_Fortress__Configuration" hook="https://mastiff.apifortress.com/app/api/rest/v3/55a33b1e-4c54-48f2-a60a-ab55550f28b696"  testId="57ad92d81ed1aa212dd978bf" />

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

payload

Object

The payload, either in the form of string or object. The valid string formats are JSON, XML or plain text. The object can be anything that can be converted into a JSON

#[payload]

 

hook

String

The API Hook URL. You can retrieve this in your API Fortress company account

x 

testId

String

The test id. It can be found in the test interstitial page, on the API Fortress dashboard

x 

headers

Map<String,Object>

The response headers of the payload it's being tested. 'content-type' is the only mandatory header

#[message.inboundProperties]

 

variables

Map<String,Object>

Extra variables to be injected in the scope of the test. Ie. server name, flow name, geographic location, local time

 

failOnError

boolean

When set to true, the operation will fail when an I/O exception is raised. Set it to 'false' if the connector is placed in a critical flow

true

 

Returns

Return Java Type Description

Object

The original payload passed to this operation


Automatch synchronous

<api-fortress:automatch-synchronous>

Runs an automatch testing suite in a synchronous way. The connector will wait for the test results from the API Fortress service and return it in the flow as payload. The automatch system will determine which tests need to run based on the automatch pattern.

XML Sample

<api-fortress:automatch-synchronous config-ref="API_Fortress__Configuration" hook="https://mastiff.apifortress.com/app/api/rest/v3/55a33b1e-4c54-48f2-a60a-ab55550f28b696"  automatch="/products/5127" />

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

payload

Object

The payload, either in the form of string or object. The valid string formats are JSON, XML or plain text. The object can be anything that can be converted into a JSON

#[payload]

 

hook

String

The API Hook URL. You can retrieve this in your API Fortress company account

x 

automatch

String

An automatch pattern is a slash separated string, using "*" as wildcard, that describes the endpoint being tested. It will allow the API Fortress system to determine which tests need to run.

x 

headers

Map<String,Object>

The response headers of the payload it's being tested. 'content-type' is the only mandatory header

#[message.inboundProperties]

 

variables

Map<String,Object>

Extra variables to be injected in the scope of the test. Ie. server name, flow name, geographic location, local time

 

Returns

Return Java Type Description

TestExecutionResponses

A TestExecutionResponses object, a collection representing all the test execution results for this automatch operation

APIDoc Reference

http://apifortress.com/doc/automatch/


Automatch passthrough

<api-fortress:automatch-passthrough>

Runs an automatch testing suite in an asynchronous way. the API Fortress service will not return the tests result and run them in background. The connector will leave the payload untouched for further operations. The automatch system will determine which tests need to run based on the automatch pattern.

XML Sample

<api-fortress:automatch-passthrough config-ref="API_Fortress__Configuration" hook="https://mastiff.apifortress.com/app/api/rest/v3/55a33b1e-4c54-48f2-a60a-ab55550f28b696"  automatch="/product/15" />

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

payload

Object

The payload, either in the form of string or object. The valid string formats are JSON, XML or plain text. The object can be anything that can be converted into a JSON

#[payload]

 

hook

String

The API Hook URL. You can retrieve this in your API Fortress company account

x 

automatch

String

An automatch pattern is a slash separated string, using "*" as wildcard, that describes the endpoint being tested. It will allow the API Fortress system to determine which tests need to run

x 

headers

Map<String,Object>

The response headers of the payload it's being tested. 'content-type' is the only mandatory header

#[message.inboundProperties]

 

variables

Map<String,Object>

Extra variables to be injected in the scope of the test. Ie. server name, flow name, geographic location, local time

 

failOnError

boolean

When set to true, the operation will fail when an I/O exception is raised. Set it to 'false' if the connector is placed in a critical flow

true

 

Returns

Return Java Type Description

Object

The original payload passed to this operation

APIDoc Reference

http://apifortress.com/doc/automatch/