Contact Us 1-800-596-4880

APIkit for REST Module Reference

Learn the fundamentals about dependency, namespace, schema, and other information about APIkit for REST.

APIkit for REST Dependency Information

<dependency>
  <groupId>org.mule.modules</groupId>
  <artifactId>mule-apikit-module</artifactId>
  <version>LATEST_VERSION</version> (1)
  <classifier>mule-plugin</classifier>
</dependency>
1 Check APIkit release notes to get the LATEST_VERSION.

APIkit for REST Configuration and Operations

Element Name Description Required

apikit:config

APIkit configuration

Yes

apikit:console

Property of config-ref in the http:listener element in the api-console flow that defines the API console URL

No

apikit:router

REST routing message processor nested in the flow element

Yes

apikit:config Attributes

The apikit:config attributes are of NonBlankString`type.

Attribute Name Required Description

outboundHeadersMapName

No

Name of the map that contains response headers.

httpStatusVarName

No

Name of the variable that stores the HTTP status code in the response.

keepRamlBaseUri

No

Alias for the equivalent keepApiBaseUri attribute.

This attribute is deprecated as of version APIkit 1.2.0. Included to provide compatibility with APIkit 1.1.x.
Use keepApiBaseUri instead of keepRamlBaseUri in your API implementations.

name

Yes

Configuration name that other elements, such as apikit:router, reference.

raml

Yes

Alias for the equivalent api attribute.

This attribute is deprecated as of version APIkit 1.2.0. Included to provide compatibility with APIkit 1.1.x.
Use api instead of raml in your API implementations.

parser

No

Parser used to validate requests.

Attribute valid for APIkit 1.2.0 and later.

Possible values are:

  • AUTO

    APIkit Router starts by using AMF. If it has errors, it starts by using the RAML parser.

  • AMF

    APIkit Router uses AMF to read the API and validate incoming requests.

  • RAML

    APIkit Router starts by using AMF, and if it has errors, it starts by using the RAML parser.

Default Value: AUTO.

api

No

Root API file location.

This attribute is valid for APIkit 1.2.0 and later.

The api attribute can be any URL, the relative path to a file located under src/main/resources/api, or the API Sync resource path.

keepApiBaseUri

No

Attribute valid for APIkit 1.2.0 and later.

When set to false, APIkit rewrites the baseUri in the RAML definition of the API.
If set to true, APIkit does not rewrite the baseUri field.

If you use APIkit behind a reverse proxy and set keepRamlBaseUri to true, use API Console to put the URL of a proxy in the baseUri property.

apikit:router Attributes

Attribute Name Required Description

disableValidations

No

Disables validations of requests.

headerStrictValidation

No

Validates that request headers are defined in the RAML file or belong to a well-known set of headers.

queryParamsStrictValidation

No

Validates that request query parameters are defined in the RAML file.

APIkit for REST Namespace and Schema

xmlns:apikit="http://www.mulesoft.org/schema/mule/mule-apikit"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/mule-apikit http://www.mulesoft.org/schema/mule/mule-apikit/current/mule-apikit.xsd"

APIkit for REST System Properties

System Property Default Description Since

mule.xml.expandExternalEntities

false

Allows parser to expand XML external entities. The default value is false to prevent attacks.

1.3.7

mule.xml.expandInternalEntities

false

Allows parser to expand XML internal entities. The default value is false to prevent attacks.

1.3.7

apikit.console.disabled

false

Disables console.

1.3.7

apikit.console.stream.amf.model

true

Streams AMF parser model to the console.

1.5.0

raml.json_schema.fail_on_warning

false

Fails when there is a warning while validating a payload when the RAML parser is configured.

1.1.15

yagi.json_duplicate_keys_detection

true

Checks no duplicate JSON object field names are encountered when the RAML parser is configured.

1.1.15

yagi.json_block_unsafe_polymorphic_base_types

true

Blocks the use of unsafe base types when the RAML parser is configured.

1.5.0

mule.apikit.parser

AUTO

Overrides parser type. Possible values are:

  • AMF

  • RAML

  • AUTO

1.3.7

apikit.multipart.size.limit

268435456

Limits the size of the multipart payload to be validated by throwing InvalidFormParameterException if the incoming multipart payload exceeds the limit (expressed in bytes).

1.8.0

fullDomain

localhost

Overrides the console URL.

1.1.15