# mulesoft APIkit - Full Documentation --- product: APIkit version: 4.x is-latest-version: true --- # APIkit Compatibility > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit modules support Mule 4. Review protocol and language coverage in the tables on this page when you plan AsyncAPI, gRPC, GraphQL, OData, REST, or SOAP APIs. For APIkit versions that align with [FIPS 140-2](https://docs.mulesoft.com/mule-runtime/latest/fips-140-2-compliance-support) expectations, see [APIkit Release Notes](https://docs.mulesoft.com/apikit/latest/apikit-release-notes). ## APIkit for SOAP Module Versions and Mule Runtime APIkit for SOAP 1.7.0 provides broad Mule runtime compatibility. APIkit for SOAP 2.0.0 is the major successor to 1.6.10 and requires JDK 17 and Mule runtime 4.9.11 or later. APIkit for SOAP 1.6.5 through 1.6.10 are deprecated. ### APIkit for SOAP Versions
LineVersionMinimum PlatformUse Cases

Legacy compatibility

1.7.0

JDK 8, 11, or 17; Mule runtime 4.1.x and later

You must keep existing deployments on earlier Mule or Java stacks without adopting the 2.x requirements.

Modern major

2.0.0 (successor to 1.6.10)

JDK 17 only; Mule runtime 4.9.11 and later

You standardize on current Mule and Java 17. You choose the version that receives new features.

Deprecated

1.6.5 – 1.6.10

Don’t adopt or standardize on these releases.

Migrate to 1.7.0 or 2.0.0 using the version selection guide.

See [Choose the APIkit for SOAP module version](https://docs.mulesoft.com/apikit/latest/apikit-4-for-soap#choose-the-apikit-for-soap-module-version) and [Before You Begin Using APIkit for SOAP](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-prerequisites-task) when you plan upgrades. ## Language and Protocol Support
Language/protocolVersion

AsyncAPI spec

2.6

Protocol Buffers (gRPC)

3

OData

2.0 and 4.0

OpenAPI Specification (OAS)

2.0, 3.0, and 3.1

RESTful API Modeling Language (RAML)

1.0 and 0.8

SOAP

1.1 and 1.2

## Next Steps Depending on the language and protocols you want to use to develop your Mule application, choose the APIkit module that best suits your needs. - [APIkit for AsyncAPI](https://docs.mulesoft.com/apikit/latest/apikit-for-asyncapi) - [APIkit for gRPC](https://docs.mulesoft.com/apikit/latest/apikit-for-grpc) - [APIkit for GraphQL](https://docs.mulesoft.com/apikit/latest/apikit-4-for-graphql) - [APIkit for OData V2](https://docs.mulesoft.com/apikit/latest/apikit-4-for-odatav2) - [APIkit for OData V4](https://docs.mulesoft.com/apikit/latest/apikit-4-for-odatav4) - [APIkit for REST](https://docs.mulesoft.com/apikit/latest/apikit-4-for-rest) - [APIkit for SOAP](https://docs.mulesoft.com/apikit/latest/apikit-4-for-soap) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for AsyncAPI > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for AsyncAPI implements event-driven APIs from AsyncAPI specifications that use asynchronous messaging protocols. Add and configure module operations in Mule flows so you publish and consume messages through your chosen bindings. AsyncAPI models reliable, event-based integration among systems; the APIkit scaffolder produces a minimal Mule implementation you import from [Anypoint Exchange](https://docs.mulesoft.com/exchange/) and re-scaffold in [Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/imp-asyncapi) or [Anypoint Studio](https://docs.mulesoft.com/studio/import-api-specification-exchange#implement-asyncapi-specifications). With [message validation](https://docs.mulesoft.com/apikit/latest/apikit-asyncapi-module-reference#validation-of-messages) enabled, the module validates `listener` and `publish` payloads against your schemas. > [!NOTE] APIkit for AsyncAPI supports the > [AsyncAPI 2.6 spec](https://www.asyncapi.com/blog/release-notes-2.6.0). ## See Also - [APIkit for AsyncAPI Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-asyncapi-module-reference) - [APIkit for AsyncAPI Error Handling Reference](https://docs.mulesoft.com/apikit/latest/apikit-asyncapi-error-handling-reference) - [AsyncAPI Specifications](https://docs.mulesoft.com/design-center/design-async-api) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for AsyncAPI Error Handling Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for AsyncAPI maps runtime failures to typed errors that cover validation, publishing, routing, and internal faults. Use the table to diagnose which phase failed and adjust your AsyncAPI implementation or flow configuration.
Error TypeDescription

INTERNAL_SERVER_ERROR

Internal error.

VALIDATION_ERROR

The payload doesn’t meet the schema of the API spec.

PUBLISHING_ERROR

APIkit fails to publish messages on the selected channel.

ROUTING_ERROR

APIkit fails to route messages to the flows.

## APIkit for AsyncAPI Error Handling The APIkit for AsyncAPI scaffolder does not generate error-handling code. Add `on-error` components and scopes in your Mule application as needed. ## Kafka Limitations If you enable content validation, the Source Message Listener (the component that consumes messages from Kafka topics) doesn’t throw an exception for invalid messages. Consequently, you can’t implement the DLQ/DLT pattern for Kafka in this scenario. Instead, the consumer must route invalid messages to DLQ/DLT topics. --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for AsyncAPI Module Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Integrate AsyncAPI specifications into Mule with the APIkit for AsyncAPI module: add the Maven dependency, declare the module namespace, and apply the XML schema when you configure generated scaffolding. This reference documents coordinates, namespaces, schema locations, and configuration elements you use to implement event-driven APIs. ## Dependencies org.mule.modules mule-asynckit-module LATEST\_VERSION **(1)** mule-plugin
1Check the APIkit Release Notes to get the LATEST_VERSION.
## Namespace and Schema xmlns:apikit-asyncapi="http://www.mulesoft.org/schema/mule/apikit-asyncapi" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/apikit-asyncapi http://www.mulesoft.org/schema/mule/apikit-asyncapi/current/mule-apikit-asyncapi.xsd"> ## Configurations ### Config Default configuration #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

None

Yes

Api Definition

String

API definition.

None

Yes

Disable Content Validation

Boolean

Disable payload content validation.

false

No

Kafka Configs

Array of Kafka Config

List of Kafka server configurations. One for each Kafka server listed in the specification that is scaffolded to create the app.

None

No

Anypoint MQ Configs

Array of Anypoint MQ Config

List of AMQ configurations.

None

No

Solace Configs

Array of Solace Config

List of Solace configurations.

None

No

Salesforce Pub/Sub Configs

Array of Salesforce Pub/Sub Connector Config

List of SalesforcePubSub configurations.

None

No

Name

String

Identifier of this element used to reference it in other components.

None

Yes

### Supported Message Brokers
Message BrokerDescriptionSupported ProtocolsConfiguration Details

Anypoint MQ

Supports asynchronous messaging with Anypoint MQ.

anypointmq

Anypoint MQ configurations are specified in the server object of the AsyncAPI specification. Supports Message Listener for consuming messages from channels declared in AsyncAPI subscribe operations.

Kafka

Supports asynchronous messaging with Apache Kafka.

kafka, kafka-secure

Kafka configurations are specified in the server object of the AsyncAPI specification. Supports Message Listener for consuming messages from channels declared in AsyncAPI subscribe operations.

Salesforce platform events

Allows implementing an Async API specification using Anypoint Connector for Salesforce Pub/Sub (Salesforce Pub/Sub Connector).

salesforcepubsub*

Connection details are available in the properties file. Supports Message Listener for subscribe operations and Publish for publish operations.

In the Message Listener operation, the AsyncAPI spec defaultContentType must be application/JSON.

In the Publish operation, the payload must be JSON. The APIkit for AsyncAPI module transforms the JSON payload to the array-of-objects type.

Solace Pub/Sub+

Supports the implementation of an Async API specification using Solace PubSub+ Connector.

solace

Connection details are available in the properties file. Supports Message Listener for subscribe operations and Publish for publish operations.

\* You must use Anypoint Connector for Salesforce Pub/Sub Connector 1.0.15 or later. ### Configuration Details by Operation APIkit for AsyncAPI supports two runtime operations in Mule flows: **Message Listener** and **Publish**. In AsyncAPI semantics, `subscribe` channels map to the **Message Listener** source, and `publish` channels map to the **Publish** operation. #### Message Listener Use **Message Listener** (``) to consume events from AsyncAPI channels, trigger flow execution, and validate incoming payloads against the channel message schema. These message brokers are available for the **Message Listener** operation: - Anypoint MQ - Kafka - Salesforce Pub/Sub - Solace PubSub+ ##### Configuration Options Core listener parameters:
ParameterDescription

Configuration (config-ref)

Reference to the APIkit for AsyncAPI configuration

Channel Name

AsyncAPI channel to consume

Servers

Optional list of server names to listen to

Disable Content Validation

Disables payload validation against the AsyncAPI schema

Output MIME Type and Output Encoding

Optional output format controls

Primary Node Only

Runs only on the primary node in a cluster

Streaming Strategy

repeatable-in-memory-stream, repeatable-file-store-stream, or non-repeatable-stream

Redelivery Policy

Redelivery behavior for failed processing

Broker-specific configuration in `Config`:
BrokerConfiguration details

Anypoint MQ

Configure Anypoint MQ Configs with Server Key and optional Config Ref

Kafka

Configure Kafka Configs with Server Key, optional Producer Config Ref, and optional Consumer Config Ref

Salesforce Pub/Sub

Configure Salesforce Pub/Sub Configs with Server Key and optional Config Ref

Solace PubSub+

Configure Solace Configs with Server Key and optional Config Ref

#### Publish Use **Publish** (``) to send events to AsyncAPI channels defined for publishing. The operation validates outgoing payloads when validation is enabled. These message brokers are available for the **Publish** operation: - Salesforce Pub/Sub - Solace PubSub+ ##### Configuration Options Core publish parameters:
ParameterDescription

Configuration (config-ref)

Reference to the APIkit for AsyncAPI configuration

Channel Name

AsyncAPI channel to publish to

Server Name

Server alias from the AsyncAPI spec

Content

Payload to publish (#[payload] by default)

Disable Content Validation

Disables payload validation against the AsyncAPI schema

Target Variable and Target Value

Optional output capture

Error Mappings

Optional mapping of operation errors

Broker-specific configuration in `Config`:
BrokerConfiguration details

Salesforce Pub/Sub

Configure Salesforce Pub/Sub Configs with Server Key and optional Config Ref

Solace PubSub+

Configure Solace Configs with Server Key and optional Config Ref

#### Associated Operations - [Publish](#Publish) #### Associated Sources - [Message Listener](#MessageListener) ## Validation of Messages Unless explicitly restricted, the JSON schema validation allows omitting and adding fields. Check the message validation against the schema in the following table:
Schema DefinitionMessageValid

{ A: integer, B: string }

{A, B}

Yes

{ A: integer, B: string }

{C, D}

Yes

{ A: integer, B: string } required [A, B]

{C, D}

No

{ A: integer, B: string } required [A, B]

{A, B, C}

Yes

{ A: integer, B: string } required [A, B] additionalProperties = false

{A, B, C}

No

{ A: integer, B: string } required [A, B] additionalProperties = false

{A, B}

No

- The `required` field specifies the list of fields that are mandatory in the JSON object. - The `additionalProperties` field specifies if you can include additional properties to the JSON object. The schemas must specify `required` and `additionalProperties` in the API specification. > [!NOTE] The field value is checked against the type specified in the schema as part of the > validation. If an operation has multiple message schemas associated in the specification, the validation adheres to these principles: - Messages are validated against every schema. - If it’s compliant with at least one schema, the message is considered valid. - If the message doesn’t adhere to at least one schema, the message is considered invalid. ### Example
Schema DefinitionMessageValid

{ A: integer, B: string } required [A, B] additionalProperties = false { C: integer, D: string } required [C, D] additionalProperties = false

{A, B}

Yes

{ A: integer, B: string } required [A, B] additionalProperties = false { C: integer, D: string } required [C, D] additionalProperties = false

{B, C}

No

{ A: integer, B: string } required [A, B] additionalProperties = false { C: integer, D: string } required [C, D] additionalProperties = false

{A, B, C}

No

{ A: integer, B: string } required [A, B] additionalProperties = false { C: integer, D: string } required [C, D] additionalProperties = false

{C, D}

Yes

## Operations ## Publish `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

None

Yes

Content

Binary

The binary content to be processed

#[payload]

No

Disable Content Validation

Boolean

Indicates if validation of the content is disabled

False

No

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component

None

Yes

Channel Name

String

Channel name

None

Yes

Server Name

String

Server name

None

Yes

Target Variable

String

Name of a variable in which the operation output is placed

None

No

Target Value

String

Expression that is evaluated against the operation output and the result of that expression is stored in the target variable

#[payload]

No

Error Mappings

Array of Error Mapping

Set of error mappings

None

No

### Output
FieldDescription

Type

Publish Response

### For Configurations - [Config](#Config) ### Throws - APIKIT-ASYNCAPI:INTERNAL\_SERVER\_ERROR - APIKIT-ASYNCAPI:PUBLISHING\_ERROR - APIKIT-ASYNCAPI:VALIDATION\_ERROR ## Sources ## Message Listener `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

None

Yes

Disable Content Validation

Boolean

Disable payload content validation

None

No

Channel Name

String

Channel name

None

Yes

Servers

Array of String

List of servers to listen to

None

No

Output MIME Type

String

MIME type of the payload that this operation generates

None

No

Output Encoding

String

Encoding of the payload that this operation generates

None

No

Primary Node Only

Boolean

Specifies if this source must be executed on the primary node when running in a cluster

None

No

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component

None

Yes

Streaming Strategy

Specify and configure repeatable streams

None

No

Redelivery Policy

Redelivery Policy

Policy for processing the redelivery of the same message

None

No

### Output
FieldDescription

Type

Any type

Attributes Type a

One of:

* Kafka Message Attributes * Anypoint MQ Message Attributes * Solace Message Attributes * Salesforce Pub/Sub Attributes

### For Configurations - [Config](#Config) ## Types ### Kafka Config
FieldTypeDescriptionDefault ValueRequired

Server Key

String

Identifier for the server configuration within the AsyncAPI configuration

None

Yes

Producer Config Ref

String

Reference to the Kafka Producer configuration

None

No

Consumer Config Ref

String

Reference to the Kafka Consumer configuration

None

No

> [!NOTE] The Server Key is required to uniquely identify the server configuration. The references > for Producer and Consumer configurations are optional and depend on the specific setup and > requirements of the Kafka implementation. ### Anypoint MQ Config
FieldTypeDescriptionDefault ValueRequired

Server Key

String

Identifier for the server configuration in AsyncAPI

None

Yes

Config Ref

String

Reference to the Anypoint MQ configuration details

None

No

> [!NOTE] The Server Key is required to uniquely identify the server configuration. Config Ref is > optional and used to specify additional configuration details. ### Solace Config
FieldTypeDescriptionDefault ValueRequired

Server Key

String

Server key set in the AsyncAPI spec

None

Yes

Config Ref

String

Reference to the configuration name of the Solace connection

None

No

> [!NOTE] The Server Key is required to uniquely identify the server configuration. Config Ref is > optional and used to specify additional configuration details. ### Limitations of Solace PubSub+ Connector Solace PubSub+ Connector in APIkit for AsyncAPI has these limitations: - The Solace PubSub+ Connector supports `queue` and `topic` for `destinations` in the **message listener** and **publish** operations. But the APIkit for AsyncAPI implementation only supports using `queue` as the value of `destination`. - Only one operator of the same type must be mapped to the same `queue` of `destination`. ### Salesforce Pub/Sub Connector Config
FieldTypeDescriptionDefault ValueRequired

Server Key

String

Server key set in the AsyncAPI spec

None

Yes

Config Ref

String

Reference to the name of the Salesforce Pub/Sub Connector configuration

None

No

> [!NOTE] The Server Key is required to uniquely identify the server configuration. Config Ref is > optional and used to specify additional configuration details. ### Repeatable In Memory Stream
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Amount of memory allocated to consume the stream and provide random access to it. If the stream data is larger than the buffer capacity, it expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.

None

No

Buffer Size Increment

Number

How much the buffer size expands if it exceeds its initial size. A value of zero or lower specifies that the buffer doesn’t expand. When the buffer is full, a STREAM_MAXIMUM_SIZE_EXCEEDED error occurs.

None

No

Max Buffer Size

Number

Maximum amount of memory used. If more is used, a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower or equal to zero means no limit.

None

No

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

These attributes are expressed in this unit.

None

No

### Repeatable File Store Stream
FieldTypeDescriptionDefault ValueRequired

In Memory Size a

Number

Defines the maximum memory that the stream uses to keep data in memory. If it consumes more, the stream buffers the content on the disk.

None

No

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit for expressing maxInMemorySiz.

None

No

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message

None

No

Message Digest Algorithm

String

Secure hashing algorithm

SHA-256

No

Message Identifier

Redelivery Policy Message Identifier

Strategy used to identify the messages

None

No

Object Store

ObjectStore

Object store where the redelivery counter for each message is stored

None

No

### Redelivery Policy Message Identifier
FieldTypeDescriptionDefault ValueRequired

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

None

No

Id Expression

String

Expression used to determine if a message has been redelivered. You can set this property if useSecureHash is false.

None

No

### Publish Response
FieldTypeDescriptionDefault ValueRequired

Response Data

Object

Data the server returns in response to a request

None

No

### Error Mapping
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Type of error encountered during the operation

None

Yes

Target a

String

The specific component or module where the error needs to be addressed

None

Yes

### Kafka Message Attributes
FieldTypeDescriptionDefault ValueRequired

Channel Name

String

Name of the Kafka channel (topic) where the message is published or consumed

None

Yes

Channel Parameters

Object

Additional parameters or settings specific to the channel

None

No

Creation Timestamp

DateTime

Timestamp when the message was created

None

No

Headers a

Object

Metadata associated with the message, typically key-value pairs

None

No

Key a

String

This key determines the partition within the Kafka topic where the message is sent

None

No

Leader Epoch

Number

Epoch of the leader broker at the time the message is sent

None

No

Log Append Timestamp

DateTime

Timestamp when the message is appended to the log

None

No

Offset a

Number

Message offset in the Kafka topic partition

None

No

Partition

Number

Partition within the Kafka topic where the message is stored

None

No

Protocol

String

Protocol the Kafka server uses

None

No

Server Name

String

Name of the Kafka server that processes the message

None

Yes

### Anypoint MQ Message Attributes
FieldTypeDescriptionDefault ValueRequired

Ack Token

String

Token used for acknowledging the receipt of a message

None

No

Channel Name

String

Name of the Anypoint MQ channel where the message is published or consumed

None

Yes

Channel Parameters

Object

Additional parameters or settings specific to the channel

None

No

Content Type

String

MIME type of the message content

None

No

Delivery Count

Number

Number of times the message is delivered

None

No

Headers

Object

Metadata associated with the message, typically key-value pairs

None

No

Message Id

String

Unique identifier for the message

None

Yes

Properties

Object

Custom properties associated with the message

None

No

Protocol

String

Protocol the Anypoint MQ server uses

None

No

Server Name

String

Name of the Anypoint MQ server that processes the message

None

Yes

### Solace Message Attributes
FieldTypeDescriptionDefault ValueRequired

DMQ Eligible

Boolean

Indicates if the message is eligible for Dead Message Queue

False

No

Channel Name

String

Name of the Solace channel where the message is published or consumed

None

No

Channel Parameters

Object

Additional parameters or settings specific to the Solace channel

None

No

Content Type

String

MIME type of the message content

None

No

Delivery Mode

String

Delivery mode of the message

None

No

Discard Indication

Boolean

Indicates if the message is discarded

False

No

Eliding Eligible

Boolean

Indicates if the message is eligible for eliding

False

No

Endpoint Type

String

Type of endpoint used

None

No

Message Reference Id

String

Reference identifier for the message

None

No

Priority

Number

Priority level of the message

0

No

Protocol

String

Protocol the Solace server uses

None

No

Receive Timestamp

DateTime

Timestamp when the message was received

None

No

Redelivered

Boolean

Indicates if the message is redelivered

False

No

Reply

Boolean

Indicates if the message expects a reply

False

No

Server Name

String

Name of the Solace server that processes the message

None

Yes

Time To Live

Number

Time in milliseconds that the message remains valid

0

No

### Salesforce Pub/Sub Attributes
FieldTypeDescriptionDefault ValueRequired

Channel Name

String

Name of the Salesforce Pub/Sub channel where the message is published or consumed

None

No

Channel Parameters

Object

Additional parameters or settings specific to the Salesforce Pub/Sub channel

None

No

Protocol

String

Protocol the Salesforce Pub/Sub server uses

None

No

Server Name

String

Name of the Salesforce Pub/Sub server that processes the message

None

No

--- product: APIkit version: 4.x is-latest-version: true --- # APIkit for GraphQL > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for GraphQL implements GraphQL services in Mule applications and integrates with Anypoint Code Builder so you connect schemas to backends through connectors. The APIkit scaffolder generates the application skeleton from your GraphQL schema at design time and maps queries, mutations, and types to flows. At run time, the GraphQL router walks the query graph, runs the mapped flows, and assembles a response that matches the requested query shape. ## See Also - [Implement a GraphQL API](https://docs.mulesoft.com/anypoint-code-builder/tut-graphql-implement-api) - [Mapping a GraphQL API to Your Data Sources](https://docs.mulesoft.com/apikit/latest/apikit-graphql-api-mapping) - [Querying a GraphQL API Implementation](https://docs.mulesoft.com/apikit/latest/apikit-graphql-api-implementation) - [APIkit for GraphQL Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-graphql-module-reference) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for GraphQL Module Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Integrate GraphQL APIs in Mule with the APIkit for GraphQL module: reference the GraphQL schema artifact, tune router limits, and wire `Route`, `Serialize`, and data fetcher or loader sources. Later sections document configuration parameters, operations, and sources for the XML you generate or edit after scaffolding. ## Configurations ### Config Default configuration #### Parameters

Name

Type

Description

Default Value

Required

Name

String

The name for this configuration. Connectors reference the configuration with this name.

None

Yes

API definition

String

Defines the path to the API definition resource, for example: resource::7ddfc767-c5b3-4583-9997-a468e251acd2:posts:1.0.0:graphql:zip:api.graphql

None

Yes

Introspection Enabled

Boolean

Enables schema introspection.

false

No

Max Query Depth Allowed

Number

The maximum depth a query can have. The value must be greater than 1.

100

No

Max Query Complexity Allowed

Number

The maximum number of data fields a query can include. The value must be greater than 1.

100

No

Name

String

The identifier of this element is used to reference it in other components.

None

Yes

#### Associated Operations - [Route](#route) - [Serialize](#serialize) - [Serialize Batch](#serialize-batch) #### Associated Sources - [Data Fetcher](#data-fetcher) - [Data Loader](#data-loader) ## Operations ### Route `` #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use

None

Yes

Content

Any

Content of the message (usually, the payload)

#[payload]

No

Output MIME Type

String

The MIME type of the payload that this operation outputs.

None

No

Output Encoding

String

The encoding of the payload that this operation outputs

None

No

Config Ref

ConfigurationProvider

The name of the configuration you use to execute this component

None

Yes

Streaming Strategy

Configure repeatable streaming strategy

None

No

Target Variable

String

The name of a variable on which the operation output is placed

None

No

Target Value

String

An expression that is evaluated against the operation output and the effect of that expression is stored in the target variable

#[payload]

No

#### Output

Type

Any

#### Configurations - [Config](#config) ### Serialize `` #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration you use

None

Yes

Inbound Content

Any

Content of the message (usually, the payload)

#[payload]

No

Config Ref

ConfigurationProvider

The name of the configuration you use to execute this component

None

Yes

Object Type Name

String

The object-type name

None

Yes

Field Name

String

The field name

None

No

Target Variable

String

The name of a variable on which the operation output is placed

None

No

Target Value

String

An expression that is evaluated against the operation output and the effect of that expression is stored in the target variable

#[payload]

No

#### Output

Type

Any

#### Configurations - [Config](#config) ### Serialize Batch `` #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration you use

None

Yes

Object Type Name

String

The object-type name

None

Yes

Inbound Content

Any

Content of the message (usually, the payload)

#[payload]

Config Ref

ConfigurationProvider

The name of the configuration you use to execute this component

None

Yes

Target Variable

String

The name of a variable on which the operation output is placed

None

No

Target Value

String

An expression that is evaluated against the operation output and the effect of that expression is stored in the target variable

#[payload]

No

#### Output

Type

Any

#### Configurations - [Config](#config) ## Sources ### Data Fetcher `` #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration you use

None

Yes

Output MIME Type

String

The MIME type of the payload that this operation outputs

None

No

Output Encoding

String

The encoding of the payload that this operation outputs

None

No

Config Ref

ConfigurationProvider

The name of the configuration you use to execute this component

None

Yes

Primary Node Only

Boolean

Whether this source must only be executed on the primary node when running in a cluster

None

No

Streaming Strategy

Configure repeatable streaming strategy

None

No

Redelivery Policy

Defines a policy for processing the redelivery of the same message

None

No

Object Type Name

String

The object-type name

None

Yes

Field Name

String

The field name

None

No

Body Content

Any

Content of the message (usually, the payload)

#[payload]

#### Output

Type

Any

Attributes Type

* Data Fetcher Attributes

#### Configurations - [Config](#config) ### Data Loader `` #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration you use

None

Yes

Object Type Name

String

The object-type name

None

Yes

Config Ref

ConfigurationProvider

The name of the configuration you use to execute this component

None

Yes

Primary Node Only

Boolean

Whether this source should only be executed on the primary node when running in a cluster

None

No

Redelivery Policy

Defines a policy for processing the redelivery of the same message

None

No

Body Content

Any

Content of the message (usually, the payload)

#[payload]

#### Output

Type

Array of Any

#### Configurations - [Config](#config) ## Types ### Data Fetcher Attributes
FieldTypeDescriptionDefault ValueRequired

Alias

String

Alias of the queried field

None

No

Arguments

Object

Arguments of the queried field

None

No

Selected Fields

Object

Map of subfields selected from this compound type

None

No

Source

Any

Actual value of the fetched field parent

None

No

### Repeatable in Memory Stream
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

The amount of memory that is allocated to consume the stream and provide random access to it. If the stream contains more data than the buffer capacity, then it is expanded according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.

None

No

Buffer Size Increment

Number

How much buffer size expands if it exceeds its initial size. A value of zero or lower specifies that the buffer doesn’t expand. When the buffer is full, a STREAM_MAXIMUM_SIZE_EXCEEDED error occurs.

None

No

Max Buffer Size

Number

The maximum amount of memory used. If more is used, a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower or equal to zero means no limit.

None

No

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

These attributes are expressed in this unit.

None

No

### Repeatable File Store Stream
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Defines the maximum memory that the stream uses to keep data in memory. If it consumes more, the stream buffers the content on disk.

None

No

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit for expressing maxInMemorySize

None

No

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

The maximum number of times a message can be redelivered and processed unsuccessfully before triggering a "Process failed" message.

None

No

Message Digest Algorithm

String

The secure hashing algorithm to use. If not set, the default is SHA-256.

SHA-256

No

Message Identifier

The strategy to use to identify the messages

None

No

Object Store

ObjectStore

The object store where the redelivery counter for each message is stored

None

No

### Redelivery Policy Message Identifier
FieldTypeDescriptionDefault ValueRequired

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message

None

No

Id Expression

String

Expressions to use to determine when a message has been redelivered. You can only set this property if useSecureHash is false.

None

No

--- product: APIkit version: 4.x is-latest-version: true --- # APIkit for gRPC > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Implement gRPC APIs in Mule projects with APIkit for gRPC by modeling services in Protocol Buffers (`.proto` files) and extending the scaffolder output with your business logic. Google Remote Procedure Call (gRPC) runs over HTTP/2 and supports unary calls plus server streaming, client streaming, and bidirectional streaming for microservices and backend-to-backend traffic. The APIkit scaffolder generates Mule project structure, routing, and a flow per `.proto` method from published specifications. Import from Anypoint Exchange or scaffold a gRPC API project in Anypoint Code Builder, and publish reusable Protobuf assets to Exchange when you share contracts across teams. > [!NOTE] APIkit for gRPC requires Mule runtime engine 4.11 or later to provide the necessary HTTP/2 > support. At this time, deployment is supported on Runtime Fabric and Hybrid Standalone (HSA) > infrastructure. ## See Also - [gRPC Support on Anypoint Platform](https://docs.mulesoft.com/release-notes/platform/grpc-support) - [Implementing a gRPC API Specification with Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/imp-implement-grpc-api-spec) # APIkit for gRPC Module Reference Implement gRPC APIs in Mule applications with APIkit for gRPC: declare dependencies, namespaces, and configuration elements that wire Protocol Buffer (`.proto`) services into flows. This reference lists Maven coordinates, XML schema locations, `grpc:config`, operations, and sources you use when you scaffold or customize gRPC endpoints. ## [](#dependencies)Dependencies Add the gRPC Connector (server) dependency to your Mule project: ```xml com.mulesoft.connectors mule-grpc-connector LATEST_VERSION (1) mule-plugin ```
1To get the LATEST_VERSION, check the APIkit Release Notes .
## [](#namespace-and-schema)Namespace and Schema Use this namespace and schema location in your Mule configuration: ```xml xmlns:grpc="http://www.mulesoft.org/schema/mule/grpc" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/grpc http://www.mulesoft.org/schema/mule/grpc/current/mule-grpc.xsd" ``` ## [](#configurations)Configurations ### [](#grpc-server-config)grpc:server-config Configures the gRPC server that listens for incoming gRPC requests. This element wraps the connection provider, which defines the listening endpoint and the Interface Description Language (IDL) definition that describes the service and message types. #### [](#parameters)Parameters
Name Type Description Default Value Required

Name

String

Identifier of this element used to reference it in other components.

None

Yes

maxInboundMessageSize

Number

Maximum size in bytes for inbound gRPC messages. Messages exceeding this size are rejected.

4194304 (4 MB)

No

#### [](#example)Example ```xml ``` #### [](#associated-operations)Associated Operations - [grpc:send-stream-message](#send-stream-message) - [grpc:end-stream](#end-stream) #### [](#associated-sources)Associated Sources - [Unary Method](#unary-method) - [Client Streaming Method](#client-streaming-method) - [Server Streaming Method](#server-streaming-method) - [Bidirectional Streaming Method](#bidirectional-streaming-method) ### [](#grpc-server-connection)grpc:grpc-server-connection Connection provider for the gRPC server. The gRPC server doesn’t independently configure host, port, or TLS; it uses an existing HTTP listener. This connection references an `http:listener-config` for the listening endpoint and defines the protobuf descriptor (IDL) that describes the service and message types. #### [](#parameters-2)Parameters
Parameter Type Description Default Value Required

listenerConfig

ConfigReference to http:listener-config

Reference to the HTTP listener configuration that defines host, port, and TLS. The gRPC server uses this listener for transport.

None

Yes

#### [](#child-elements)Child Elements ##### [](#grpcidl-definition)grpc:idl-definition Contains the protobuf descriptor (IDL) for the gRPC service. The `grpc:single-binary-protobuf` definition is supported. ##### [](#grpcsingle-binary-protobuf)grpc:single-binary-protobuf Provides the Protocol Buffer descriptor from a binary file (for example, a compiled `.proto` descriptor file).
Parameter Type Description Default Value Required

protobufDescriptorFile

String

Path or expression (for example, ${grpc.server.descriptor.file}) that resolves to the binary Protobuf descriptor file.

None

Yes

## [](#operations)Operations ### [](#send-stream-message)grpc:send-stream-message Sends a message on an active server streaming response. To push messages to the client, use this operation within a flow triggered by `grpc:server-streaming-method`. This operation doesn’t support bidirectional streaming. #### [](#parameters-3)Parameters
Parameter Type Description Default Value Required

config-ref

String (Config Reference)

Reference to the grpc:server-config to use.

None

Yes

Payload

Any

The message payload to send. It should conform to the message type defined in the Interface Description Language (IDL) for the streaming method.

#[payload]

No

Target Variable

String

Name of a variable on which the operation output is placed.

None

No

Target Value

String

Expression evaluated against the operation output. The result is stored in the target variable.

#[payload]

No

#### [](#configurations-2)Configurations - [grpc:server-config](#grpc-server-config) ### [](#end-stream)grpc:end-stream Ends the current server stream. Call this operation after sending all messages to the client. This operation doesn’t support bidirectional streaming. #### [](#parameters-4)Parameters
Parameter Type Description Default Value Required

config-ref

String (Config Reference)

Reference to the grpc:server-config to use.

None

Yes

Target Variable

String

Name of a variable on which the operation output is placed.

None

No

Target Value

String

Expression evaluated against the operation output. The result is stored in the target variable.

#[payload]

No

#### [](#configurations-3)Configurations - [grpc:server-config](#grpc-server-config) ## [](#sources-listeners)Sources (Listeners) ### [](#unary-method)Unary Method `` Handles unary RPCs: one request from the client and one response from the server. #### [](#parameters-5)Parameters
Parameter Type Description Default Value Required

config-ref

String (Config Reference)

Reference to the grpc:server-config to use.

None

Yes

methodName

String

Fully qualified method name in the format ServiceName/MethodName (for example, com.example.MyService/MyMethod).

None

Yes

Primary Node Only

Boolean

Whether this source runs only on the primary node in a cluster.

false

No

Redelivery Policy

Object

Policy for redelivery of the same message.

None

No

#### [](#output)Output

Type

Any (message type from IDL)

#### [](#configurations-4)Configurations - [grpc:server-config](#grpc-server-config) ### [](#client-streaming-method)Client Streaming Method `` Handles client streaming RPCs: the client sends a stream of messages and the server responds with a single message. #### [](#parameters-6)Parameters
Parameter Type Description Default Value Required

config-ref

String (Config Reference)

Reference to the grpc:server-config to use.

None

Yes

methodName

String

Fully qualified method name in the format ServiceName/MethodName (for example, com.example.MyService/MyMethod).

None

Yes

Primary Node Only

Boolean

Whether this source runs only on the primary node in a cluster.

false

No

Redelivery Policy

Object

Policy for redelivery of the same message.

None

No

#### [](#child-elements-2)Child Elements ##### [](#grpcoutput)grpc:output Optional nested element that defines the response and stream state for the client streaming method. Only `grpc:client-streaming-method` has this element. Unary and server streaming don’t use this element.
Parameter Type Description Default Value Required

response

TypedValue<InputStream>

Response payload. Only effective on the final flow execution when attributes.streamCompleted is true.

#[payload]

No

streamState

Map<String, Object>

State persisted across messages via attributes.streamState.

#[{}]

No

Specify stream state in two ways: - **Attribute form** (expression): `streamState="#[vars.myState]"`. - **Nested element form** (often generated by the scaffolder): use `grpc:stream-states` with one or more `grpc:stream-state` children, each with `key` and `value` attributes. ```xml ``` #### [](#output-2)Output

Type

Stream of Any (message type from IDL)

#### [](#configurations-5)Configurations - [grpc:server-config](#grpc-server-config) ### [](#server-streaming-method)Server Streaming Method `` Handles server streaming RPCs: the client sends one request and the server responds with a stream of messages. Use `grpc:send-stream-message` and `grpc:end-stream` within the flow to send messages and close the stream. #### [](#parameters-7)Parameters
Parameter Type Description Default Value Required

config-ref

String (Config Reference)

Reference to the grpc:server-config to use.

None

Yes

methodName

String

Fully qualified method name in the format ServiceName/MethodName (for example, com.example.MyService/MyMethod).

None

Yes

onCapacityOverload

Enum: WAIT, DROP

Backpressure strategy when the flow’s maxConcurrency is reached. See Backpressure Strategy.

WAIT

No

Primary Node Only

Boolean

Whether this source runs only on the primary node in a cluster.

false

No

Redelivery Policy

Object

Policy for redelivery of the same message.

None

No

#### [](#output-3)Output

Type

Any (request message type from IDL); response is sent via grpc:send-stream-message and grpc:end-stream

#### [](#configurations-6)Configurations - [grpc:server-config](#grpc-server-config) ### [](#bidirectional-streaming-method)Bidirectional Streaming Method `` Handles bidirectional streaming RPCs: both client and server send streams of messages independently. The operations `grpc:send-stream-message` and `grpc:end-stream` don’t support bidirectional streaming. Use the nested `grpc:stream-output` child element to send inline response messages. #### [](#parameters-8)Parameters
Parameter Type Description Default Value Required

config-ref

String (Config Reference)

Reference to the grpc:server-config to use.

None

Yes

methodName

String

Fully qualified method name in the format ServiceName/MethodName (for example, com.example.MyService/MyMethod).

None

Yes

Primary Node Only

Boolean

Whether this source runs only on the primary node in a cluster.

false

No

Redelivery Policy

Object

Policy for redelivery of the same message.

None

No

#### [](#child-elements-3)Child Elements ##### [](#grpcstream-output)grpc:stream-output Optional nested element that defines the response and stream state for the bidirectional streaming method. Use it to send inline response messages to the client.
Parameter Type Description Default Value Required

response

TypedValue<InputStream>

Response payload sent to the client.

#[payload]

No

streamState

Map<String, Object>

State persisted across messages via attributes.streamState.

#[{}]

No

Specify stream state in two ways. **Attribute form**: `streamState="[vars.state]"`. **Nested element form**: use `grpc:stream-states` with `grpc:stream-state` children (each with `key` and `value` attributes), for example ``. #### [](#output-4)Output

Type

Stream of Any (message type from IDL). Send response messages using the nested grpc:stream-output element.

#### [](#configurations-7)Configurations - [grpc:server-config](#grpc-server-config) ## [](#backpressure-strategy)Backpressure Strategy The gRPC connector uses Mule’s built-in backpressure mechanism. To define how many requests can be processed concurrently, set `maxConcurrency` on the `` element (for example, ``). When that limit is reached, the source applies a backpressure strategy to new incoming requests. The connector does not implement its own concurrency limit. Instead it responds to Mule runtime’s concurrency control. For more information, see [Back-Pressure and MaxConcurrency](https://docs.mulesoft.com/mule-runtime/latest/tuning-backpressure-maxconcurrency). - **onCapacityOverload** (server streaming only): For `grpc:server-streaming-method`, the `onCapacityOverload` attribute chooses the behavior when the flow’s maxConcurrency is reached. Other sources use a fixed mode (see table below). - **WAIT**: New requests wait until a concurrency slot becomes available. The request is eventually processed. - **DROP**: New requests are rejected immediately. The client receives gRPC status `RESOURCE_EXHAUSTED` (8). - **FAIL**: New requests are rejected immediately. The client receives gRPC status `UNAVAILABLE` (14). This is the only mode for unary.
Source Default Mode Supported Modes Notes

grpc:unary-method

FAIL

FAIL

Excess requests are immediately rejected with UNAVAILABLE.

grpc:server-streaming-method

WAIT

WAIT, DROP

Configurable via onCapacityOverload attribute on the source (default WAIT).

grpc:client-streaming-method

WAIT

WAIT

Incoming messages queue until a slot is available.

grpc:bidirectional-streaming-method

WAIT

WAIT

Incoming messages queue until a slot is available.

## [](#error-handling)Error Handling gRPC uses status code 0 (OK) for successful responses. This is not an error type. The following sections describe error conditions (status codes 1–16) and how they map to Mule error types. ### [](#error-type-hierarchy)Error Type Hierarchy All gRPC protocol errors extend the base type `GRPC:GRPC_ERROR`. In error handlers, reference `GRPC:GRPC_ERROR` to catch any gRPC protocol error, or reference a specific type for finer-grained handling. ### [](#grpc-protocol-errors)gRPC Protocol Errors The Mule error types in this table map to gRPC status codes. These errors extend `GRPC:GRPC_ERROR`.
Mule Error Type gRPC Code Description

GRPC:CANCELLED

1

Request was cancelled

GRPC:GRPC_UNKNOWN

2

Unknown error

GRPC:INVALID_ARGUMENT

3

Invalid argument

GRPC:DEADLINE_EXCEEDED

4

Deadline exceeded

GRPC:NOT_FOUND

5

Resource not found

GRPC:ALREADY_EXISTS

6

Resource exists

GRPC:PERMISSION_DENIED

7

Permission denied

GRPC:RESOURCE_EXHAUSTED

8

Resource exhausted

GRPC:FAILED_PRECONDITION

9

Failed precondition

GRPC:ABORTED

10

Operation aborted

GRPC:OUT_OF_RANGE

11

Argument out of range

GRPC:UNIMPLEMENTED

12

Operation not implemented

GRPC:INTERNAL

13

Internal error

GRPC:UNAVAILABLE

14

Service unavailable

GRPC:DATA_LOSS

15

Data loss

GRPC:UNAUTHENTICATED

16

Request not authenticated

### [](#connector-level-errors)Connector-Level Errors The error types in this table are thrown by the connector for validation, transformation, and connectivity issues. They’re not gRPC protocol status codes but Mule error types used by the gRPC connector.
Error Type Description

GRPC:VALIDATION

Thrown after request or message validation fails (for example, schema or IDL validation).

GRPC:TRANSFORMATION

Thrown after message transformation fails (for example, serialization or deserialization of Protobuf messages).

GRPC:CONNECTIVITY

Thrown after a connectivity issue occurs (for example, connection refused or transport error).

## [](#see-also)See Also - [APIkit for gRPC](https://docs.mulesoft.com/apikit/latest/apikit-for-grpc) - [gRPC Support on Anypoint Platform](https://docs.mulesoft.com/release-notes/platform/grpc-support) - [Implementing a gRPC API Specification with Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/imp-implement-grpc-api-spec) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for OData V2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for OData v2 uses standard HTTP to build RESTful APIs that follow the OData v2 specification and the Open Data Protocol (OData) for querying and updating data. The extension layers on APIkit for REST and RAML contracts so you combine OData v2 tooling with the same REST design workflow. It offers fewer capabilities than OData v4 and some newer stacks; choose OData v4 when you need the latest protocol features and query model. ## See Also - [APIkit for OData V4](https://docs.mulesoft.com/apikit/latest/apikit-4-for-odatav4) - [Installing OData V2 Tooling](https://docs.mulesoft.com/apikit/latest/install-odatav2-tooling) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for OData v2 Module Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Integrate APIkit for OData v2 with APIkit for REST by declaring the Maven dependencies, namespaces, and XML schema locations in this topic. Customize generated EntitySet names and router behavior from your RAML types when you need endpoints that differ from default pluralization. ## Dependency Information Declare the APIkit for OData v2 extension with the APIkit for REST module dependency: org.mule.modules mule-module-apikit-odata 2.2.0 **(1)** mule-plugin org.mule.modules mule-apikit-module 1.8.3 **(1)** mule-plugin
1The tooling determines the appropriate version of each dependency when scaffolding to guarantee compatibility. Manually setting dependency versions produces issues. See the APIkit release notes before upgrading each component to the latest version.
> [!NOTE] Update the Anypoint Studio plugin to enable the tooling to determine the appropriate > dependency combination. ## 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" ## Customizing EntitySet Names APIkit for OData v2 pluralizes entity type names automatically to create **EntitySet** endpoints (for example, `Person` becomes `Persons`). For APIkit for OData 2.3.5 and later, override this behavior by using these annotations in your RAML type definitions: - **(odata.entitySet)** - **(odata.entitySetEnabled)** With these annotations, you control the **EntitySet** name exposed in metadata and in OData API URLs and align endpoints with your domain (for example, change `Person` to `People`). ### Annotation Reference Apply these annotations at the entity type level in your RAML library (for example, in `odataLibrary.raml`):
AnnotationTypeDescription

(odata.entitySet)

String

Custom name for the entity set. Used only if (odata.entitySetEnabled) is true and the value is non-empty.

(odata.entitySetEnabled)

Boolean

If true, uses the custom name from (odata.entitySet). If false or omitted, default pluralization is used for backward compatibility.

### Feature Flag: Enabling Custom EntitySet Names The `(odata.entitySet)` and `(odata.entitySetEnabled)` entity annotations affect metadata generation and OData API behavior as follows:
Case(odata.entitySetEnabled)(odata.entitySet)Effective EntitySet NameMetadata and OData API Behavior

1

false

Present

Default pluralization (based on entity type)

Default EntitySet

2

false

Not present

Default pluralization (based on entity type)

Default EntitySet

3

Not defined or present

Present

Default pluralization (based on entity type)

Default EntitySet

4

Not defined or present

Not present

Default pluralization (based on entity type)

Default EntitySet

5

true

Present (non-empty)

Custom name from annotation

Custom EntitySet; metadata and APIs use the custom name

6

true

Not present or empty

Default pluralization (based on entity type)

Default EntitySet

> [!NOTE] Custom names apply if `entitySetEnabled` is `true` and `entitySet` is provided with a > non-empty value. If not, APIkit for OData v2 uses default pluralization. ### Example: Custom EntitySet Name in RAML This example defines a `Person` entity and exposes it as the `EntitySet` `People`: ```raml #%RAML 1.0 Library uses: odata: libraries/odataLibrary.raml types: Person: (odata.remote): Person (odata.entitySet): People (odata.entitySetEnabled): true properties: ID: type: integer required: true (odata.key): true Name: type: string required: true Price: type: number ``` The `EntitySet` appears as `People` in `$metadata` and in OData API URLs (for example, `/api/odata.svc/People`) instead of the default `Persons`. ### Backward Compatibility Existing flows and APIs don’t change unless you explicitly enable the feature. APIkit for OData v2 ignores custom `EntitySet` annotations unless `(odata.entitySetEnabled)` is set to `true`. If the flag is `false` or missing, APIkit for OData v2 always uses default pluralization based on the entity type, even if `(odata.entitySet)` is present. This ensures full backward compatibility with existing APIkit for OData v2 applications. ## See Also - [APIkit for REST Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-4-xml-reference) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for OData V4 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for OData v4 delivers RESTful APIs that comply with the OData v4 specification. It uses standard HTTP for querying and updating data through the Open Data Protocol (OData). Generate Mule flows that handle OData requests so you can modernize legacy APIs, orchestrate data into Salesforce, or expose bidirectional OData surfaces for databases such as Oracle, DB2, or Azure DB. Unlike the RAML-based APIkit for OData v2 extension, APIkit for OData v4 uses the OData Entity Data Model (EDM) to describe resources and structures for HTTP-based data services. ## See Also - [APIkit for OData V2](https://docs.mulesoft.com/apikit/latest/apikit-4-for-odatav2) - [Installing OData V4 Tooling](https://docs.mulesoft.com/apikit/latest/install-odatav4-tooling) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for OData v4 Error Handling Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for OData v4 maps routing, parsing, serialization, and expansion failures to typed `APIKIT-ODATA` errors you handle in Mule. Use the error catalog and scaffolded handler in this reference to interpret failures and return consistent OData error payloads. ## Error Types APIkit for OData v4 defines error types for common OData processing failures:
Error TypeDescription

APIKIT-ODATA:NOT_IMPLEMENTED

Requested service, feature, or operation not implemented

APIKIT-ODATA:MALFORMED_URI

Invalid request URI

APIKIT-ODATA:MALFORMED_SEARCH

Invalid request $search expression in URI

APIKIT-ODATA:SERIALIZATION

Generic error for serialization issues

APIKIT-ODATA:DESERIALIZATION

Generic error for deserialization issues

APIKIT-ODATA:TRANSFORMATION

Generic error for issues related to URI to SQL transformations

APIKIT-ODATA:INTERNAL_SERVER_ERROR

Generic error for internal server issues

APIKIT-ODATA:NOT_FOUND

Generic error for not found

APIKIT-ODATA:EXPANSION

Generic error for issues during expansion

## Error Handling APIkit for OData v4 scaffolder generates an error handler with a single `On Error Propagate` catch that serves as a generalized error formatter. ```xml ... ... ``` ## See Also - [Error Handlers](https://docs.mulesoft.com/mule-runtime/latest/error-handling) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for OData v4 Module Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Configure APIkit for OData v4 in Mule with the Maven dependency, `apikit-odata` namespace, and schema location listed in this reference. Later sections document `Config`, operations, and listeners you use when you scaffold or extend OData v4 APIs. ## Dependency Information org.mule.modules mule-odata-module LATEST\_VERSION **(1)** mule-plugin
1Check APIkit release notes to get the LATEST_VERSION.
## Namespace and Schema xmlns:apikit-odata="http://www.mulesoft.org/schema/mule/apikit-odata" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/apikit-odata http://www.mulesoft.org/schema/mule/apikit-odata/current/mule-apikit-odata.xsd" ## Configurations ### Config Default configuration #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name

None

Yes

Api Definition

String

API definition

None

Yes

Name

String

Identifier of this element used to reference it in other components

None

Yes

#### Associated Operations - [Route](#route) - [Serialize Entity](#serialize-entity) - [Serialize Entity Collection](#serialize-entity-collection) - [Transform to SQL Select](#transform-to-sql-select) #### Associated Sources - [RequestEntityCollectionListener](#on-entity-collection-request) - [RequestEntityListener](#on-entity-request) ## Operations ## Route `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

None

Yes

Content

Any

The content to be routed.

#[payload]

No

Route correlation Id

Boolean

Consistent correlation Ids across subsequent flows

true

No

Output MIME Type

String

MIME type of the payload that this operation outputs

None

No

Output Encoding

String

Encoding of the payload that this operation outputs

None

No

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component

None

Yes

Streaming Strategy

Configure if repeatable streams and their behavior are used

non-repeatable-stream

No

Method

Enumeration, one of:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

HTTP request method name

None

Yes

Masked Request Path

String

OData request path, relative to listener

None

Yes

Scheme

Enumeration, one of:

  • HTTP

  • HTTPS

HTTP request scheme

None

Yes

Host

String

Request host

None

Yes

Listener Path

String

Listener path ending with "*"

None

Yes

Http Headers

Object

HTTP request headers

#[attributes.headers]

No

Query String

String

HTTP query string

#[attributes.queryString]

No

Target Variable

String

Name of a variable on which the operation output is placed

None

No

Target Value

String

An expression that is evaluated against the operation output and the outcome of that expression is stored in the target variable

#[payload]

No

### Output

Type

Any

Attributes Type

RouteOutputAttributes

### For Configurations - [Config](#config) ### Throws - APIKIT-ODATA:DESERIALIZATION - APIKIT-ODATA:INTERNAL\_SERVER\_ERROR - APIKIT-ODATA:MALFORMED\_SEARCH - APIKIT-ODATA:MALFORMED\_URI - APIKIT-ODATA:NOT\_FOUND - APIKIT-ODATA:NOT\_IMPLEMENTED - APIKIT-ODATA:SERIALIZATION - APIKIT-ODATA:TRANSFORMATION - APIKIT-ODATA:EXPANSION ## Serialize Entity `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

None

Yes

Inbound Content

Binary

The binary content to serialize.

#[payload]

No

Output MIME Type

String

MIME type of the payload that this operation outputs

None

No

Output Encoding

String

Encoding of the payload that this operation outputs

None

No

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component

None

Yes

Streaming Strategy

Configure if repeatable streams and their behavior are used

non-repeatable-stream

No

Method

Enumeration, one of:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

HTTP Method

None

Yes

Path

String

Path to Entity Type

None

Yes

Target Variable

String

Name of a variable on which the operation output is placed

None

No

Target Value

String

An expression that is evaluated against the operation output and the outcome of that expression is stored in the target variable

#[payload]

No

### Output

Type

Binary

### For Configurations - [Config](#config) ## Serialize Entity Collection `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration

None

Yes

Inbound Content

Binary

The binary content to serialize.

#[payload]

No

Output MIME Type

String

MIME type of the payload that this operation outputs

None

No

Output Encoding

String

Encoding of the payload that this operation outputs

None

No

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component

None

Yes

Streaming Strategy

Configure if repeatable streams and their behavior are used

non-repeatable-stream

No

Method

Enumeration, one of:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

HTTP Method

None

Yes

Path

String

Path to Entity Type

None

Yes

Target Variable

String

Name of a variable on which the operation output is placed

None

No

Target Value

String

An expression that is evaluated against the operation output and the outcome of that expression is stored in the target variable

#[payload]

No

### Output

Type

Binary

### For Configurations - [Config](#config) ## Transform to SQL Select `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component

None

Yes

Configuration

String

Name of the configuration to use

None

Yes

Database Schema

String

Database schema name to which the entity set belongs. If not empty, it’s prefixed to the table name in the WHERE clause

None

No

Entity Set Name

String

Table name in the database for the requested entity set

None

Yes

Entity Type Fields

Array of String

List of property fields from the Entity type

None

Yes

Entity Type Keys

Object

Map of entity key names and values

None

Yes

Entity Type Name

String

Entity Data Model specifies the entity type name

None

Yes

Page Size

Number

The number of records to retrieve.

None

No

searchFieldsAsType

Object

Data type to which fields are type-casted for the $search operation. If empty, no type-casting is performed

None

No

Search Transformation Enabled

Boolean

Enabling $search transformation to WHERE clause

true

No

Sql Identifiers Delimiter

Enumeration, one of:

  • DOUBLE_QUOTES

  • BRACKETS

  • BACK_TICKS

Option to delimit identifiers

DOUBLE_QUOTES

No

Sql Limit Rows

Enumeration, one of:

  • LIMIT

  • FETCH_NEXT_ROWS_ONLY

Option to limit the number of rows

LIMIT

No

Strict Search Term Match

Boolean

Enabling full term match for $search. If enabled, terms in WHERE clause aren’t enclosed between '%'.

false

No

Streaming Strategy

Configure if repeatable streams and their behavior are used

non-repeatable-stream

No

System Query Options

Object

System Query Options map. The grammar and syntax rules for system query options are defined in [OData-ABNF]. To simplify usability, the initial dollar sign is removed to avoid escaping within DataWeave. For example, to access System Query Option, $skip uses the following expression #[attributes.systemQueryOptions.'skip']

#[attributes.systemQueryOptions]

Yes

Target Variable

String

Name of a variable on which the operation output is placed

None

No

Target Value

String

An expression that is evaluated against the operation output and the outcome of that expression is stored in the target variable

#[payload]

No

### Output

Type

Binary

Attributes Type

* SqlTransformerOutputAttributes

### For Configurations - [Config](#config) ### Throws - APIKIT-ODATA:INTERNAL\_SERVER\_ERROR - APIKIT-ODATA:MALFORMED\_SEARCH - APIKIT-ODATA:MALFORMED\_URI - APIKIT-ODATA:NOT\_IMPLEMENTED - APIKIT-ODATA:TRANSFORMATION ## Sources ## On Entity Collection Request `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

None

Yes

Output MIME Type

String

MIME type of the payload that this operation outputs

None

No

Output Encoding

String

Encoding of the payload that this operation outputs

None

No

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component

None

Yes

Primary Node Only

Boolean

Specify if this source executes only on the primary node when running in Cluster

false

No

Streaming Strategy

Configure if repeatable streams and their behavior are used

non-repeatable-stream

No

Redelivery Policy

Policy for processing the redelivery of the same message

None

No

Method

Enumeration, one of:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

HTTP Method

None

Yes

Path

String

Path to Entity Type

None

Yes

Collection Success Response

No

Supported System Query Options - $expand

Boolean

Enabling support for $expand

true

No

Ignore errors on expansion enabled

Boolean

Disallowing errors from the flows that generic expansion calls to propagate to this flow. When true, failed expansions render as null.

false

No

Expandable navigation properties

List<String>

List of types that can be generically expanded from this flow.

[]

No

### Output

Type

Any

Attributes Type

ListenerRequestAttributes

### For Configurations - [Config](#config) ## On Entity Request `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

None

Yes

Output MIME Type

String

MIME type of the payload that this operation outputs

None

No

Output Encoding

String

Encoding of the payload that this operation outputs

None

No

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component

None

Yes

Primary Node Only

Boolean

If this source must only be executed on the primary node when running in Cluster

false

No

Streaming Strategy

Configure if repeatable streams and their behavior are used

non-repeatable-stream

No

Redelivery Policy

Policy for processing the redelivery of the same message

None

No

Method

Enumeration, one of:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

HTTP Method

None

Yes

Path

String

Path to Entity Type

None

Yes

Supported System Query Options - $expand

Boolean

Enabling support for $expand

true

No

Ignore errors on expansion enabled

Boolean

Disallowing errors from the flows that generic expansion calls to propagate to this flow. When true, failed expansions render as null

false

No

Expandable navigation properties

List<String>

List of types that can be generically expanded from this flow

[]

No

Success Response

No

### Output

Type

Any

Attributes Type

ListenerRequestAttributes

### For Configurations - [Config](#config) ## Types ### Listener Request Attributes
FieldTypeDescriptionDefault ValueRequired

Entity Set Name

String

Name of the requested entity set.

#[attributes.entitySetName]

No

Odata Http Attributes

HTTP attributes of the OData request.

#[attributes.odataHttpAttributes]

No

Odata Request Attributes

OData-specific attributes of the OData request.

#[attributes.odataRequestAttributes]

No

### OData Http Attributes
FieldTypeDescriptionDefault ValueRequired

Headers

Object

An object containing the HTTP headers of the incoming request. This allows the router to access the request headers.

#[attributes.headers]

No

Method

Enumeration, one of:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

The HTTP method of the OData request.

None

No

Raw Base Uri

String

Base URI of the OData request

#[attributes.baseUri]

No

Raw Odata Path

String

Raw OData path of the OData request

#[attributes.rawODataPath]

No

Raw Query Path

String

Raw query path of the OData request

#[attributes.rawQueryPath]

No

Raw Request Uri

String

Raw request URI of the OData request

#[attributes.rawRequestUri]

No

Scheme

Enumeration, one of:

  • HTTP

  • HTTPS

No

### OData Request Attributes
FieldTypeDescriptionDefault ValueRequired

Custom Query Options

Object

Custom query options of the OData request

#[attributes.customQueryOptions]

No

Entity Type Fields

Array of String

Entity-type fields of the OData request

#[attributes.entityTypeFields]

No

Entity Type Keys

Object

Entity-type keys of the OData request

#[attributes.entityTypeKeys]

No

Entity Type Name

String

Entity-type name of the OData request

#[attributes.entityTypeName]

No

System Query Options

Object

System query options of the OData request

#[attributes.systemQueryOptions]

No

### Repeatable in Memory Stream
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Amount of memory allocated to consume the stream and provide random access to it. If the stream has more data than the buffer capacity, it expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.

None

No

Buffer Size Increment

Number

Expansion of the buffer size if exceeding its initial size. If you set a value of zero or lower, the buffer doesn’t expand and raises a STREAM_MAXIMUM_SIZE_EXCEEDED error when the buffer gets full.

None

No

Max Buffer Size

Number

The maximum amount of memory for the buffer to use. When memory usage exceeds this limit, a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower or equal to zero means no limit.

None

No

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit to express these attributes

None

No

### Repeatable File Store Stream
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Maximum memory that the stream uses to keep data in memory. If more memory is consumed, the stream starts to buffer the content on the disk

None

No

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit to express maxInMemorySize

KB

No

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message

None

No

Message Digest Algorithm

String

Secure hashing algorithm (default: SHA-256)

SHA-256

No

Message Identifier

Strategy to identify the messages

None

No

Object Store

ObjectStore

The object store where the redelivery counter for each message is stored

None

No

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message

None

No

Id Expression

String

One or more expressions that determine when a message is redelivered. You can set this property if useSecureHash is false

none

No

### Redelivery Policy Message Identifier
FieldTypeDescriptionDefault ValueRequired

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message

No

Id Expression

String

One or more expressions that determine when a message is redelivered. You can set this property if useSecureHash is false

No

### Route Output Attributes
FieldTypeDescriptionDefault ValueRequired

Headers

Object

An object representing the HTTP headers to be included in the response.

#[attributes.headers]

No

Status Code

Number

The HTTP status code to be returned in the response.

None

No

### SQL Transformer Output Attributes
FieldTypeDescriptionDefault ValueRequired

Query Parameters

Object

An object representing the query parameters to be included in the response.

None

No

### Raw Entity Success Response
FieldTypeDescriptionDefault ValueRequired

Raw Content

Binary

Raw response content of the response message

#[payload]

No

### Entity Success Response
FieldTypeDescriptionDefault ValueRequired

Body Content

Binary

Body of the response message

#[payload]

No

### Raw Entity Collection Success Response
FieldTypeDescriptionDefault ValueRequired

Raw Content

Binary

Raw response message

#[payload]

No

### Entity Collection Success Response
FieldTypeDescriptionDefault ValueRequired

Body Content

Binary

Body of the response message

#[payload]

No

Serialization Parameters

Set of serialization-related parameters.

Yes

### Serialization Parameters
FieldTypeDescriptionDefault ValueRequired

Count

Number

The number of entities.

None

No

Page Size

Number

The number of entities per page.

None

No

Token

String

The token to retrieve the next page.

None

No

## See Also - [APIkit for OData v4 Error Handling Reference](https://docs.mulesoft.com/apikit/latest/apikit-odatav4-error-handling-reference) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for REST > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for REST streamlines development and integration of RESTful APIs with RAML or OAS contracts, validation, generated implementation templates, and routing that follows your API design. Representational State Transfer (REST) defines how web services expose resources; APIkit for REST turns those contracts into consistent Mule flows. Define RAML or OpenAPI Specification (OAS) up front to align design, documentation, and runtime behavior across your team. ## Features - Automatic Validation APIkit for REST automatically validates incoming requests against your API contracts defined in RAML or OAS. This validation ensures that requests adhere to the specified rules and constraints of the API. - Code Generation The framework provides code generation capabilities that help streamline the implementation of your RESTful APIs. APIkit for REST generates implementation templates based on your API contracts. - Intelligent Routing With APIkit for REST, incoming requests are intelligently routed to the appropriate endpoints based on the defined API contracts. ## See Also - [Building, Implementing, and Testing a REST API](https://docs.mulesoft.com/apikit/latest/apikit-4-implement-rest-api) - [APIkit for REST Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-4-xml-reference) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for REST Error Handling Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for REST maps common HTTP and routing failures to typed `APIKIT` errors you handle in Mule. Use the error type list and status-code mapping in this reference to interpret failures and customize responses. The scaffolder can generate baseline error handling that mirrors typical HTTP status semantics. ## APIkit for REST Error Types APIkit for REST defines error types that correspond to HTTP semantics:
Error TypeDescription

APIKIT:BAD_REQUEST

Bad request

APIKIT:NOT_FOUND

Resource not found

APIKIT:METHOD_NOT_ALLOWED

Method not allowed

APIKIT:NOT_ACCEPTABLE

Not acceptable

APIKIT:UNSUPPORTED_MEDIA_TYPE

Unsupported media type

APIKIT:NOT_IMPLEMENTED

Not implemented

## APIkit for REST Error Handling The APIkit scaffolder generates error-handling code based on common HTTP status code responses. The table maps each status to an error type and default message:
Status CodeError TypeResponse Message

400

APIKIT:BAD_REQUEST

Bad request

404

APIKIT:NOT_FOUND

Resource not found

405

APIKIT:METHOD_NOT_ALLOWED

Method not allowed

406

APIKIT:NOT_ACCEPTABLE

Not acceptable

415

APIKIT:UNSUPPORTED_MEDIA_TYPE

Unsupported media type

501

APIKIT:NOT_IMPLEMENTED

Not implemented

## APIkit for REST Example Error This sample shows an error handler for an HTTP 400 response, which you can adapt for custom status codes and messages. ```xml ... 400 ... ``` The main flow transmits an HTTP error response that encompasses an HTTP status code paired with an associated message expressed in clear and straightforward language. In this example, `message: "Bad request"`. ## See Also - [Error Handlers](https://docs.mulesoft.com/mule-runtime/latest/error-handling) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for REST Module Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Configure the APIkit for REST module in Mule: declare the Maven dependency, add `apikit:config`, and place the `apikit:router` and optional console and flow mappings in your XML. This reference lists dependency coordinates, namespaces, schema locations, and element attributes you use when you implement or troubleshoot REST APIs. ## APIkit for REST Dependency Information org.mule.modules mule-apikit-module LATEST\_VERSION **(1)** mule-plugin
1Check APIkit release notes to get the LATEST_VERSION.
## APIkit for REST Configuration and Operations
Element NameDescriptionRequired

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:flow-mappings

Container for one or more apikit:flow-mapping elements that map API resources and actions to flows

No

apikit:flow-mapping

Maps a resource and action from the API specification to a specific Mule flow

No

apikit:router

REST routing message processor nested in the flow element

Yes

### apikit:config Attributes The `apikit:config` attributes are of type `NonBlankString`.
Attribute NameRequiredDescription

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 NameRequiredDescription

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.

### OpenTelemetry Route on the HTTP Span When `apikit:router` matches a request, APIkit records the matched route on the root HTTP span in OpenTelemetry traces. On Mule runtime 4.13 and later, the `http.route` attribute contains the route template, and the span name combines the HTTP method and that route, for example `GET /orders/{orderId}`. You can identify the specific API operation in each trace. On earlier Mule runtimes, the root HTTP span keeps the HTTP listener path. ### apikit:flow-mapping Attributes Use the `apikit:flow-mapping` element to route a resource and action defined in the API specification (RAML or OpenAPI specification) to an existing Mule flow.
Attribute NameRequiredDescription

resource

Yes

Resource path from the API specification to map, for example /users.

action

Yes

HTTP method to map for the resource, for example get or post.

flow-ref

Yes

Name of the Mule flow that handles the mapped resource and action.

content-type

No

Request media type to match, for example application/json. When omitted, the mapping applies to any Content-Type for that resource and action. When set, you can route the same resource and action to different flows depending on the request media type.

In APIkit configuration, nest `apikit:flow-mapping` in `apikit:flow-mappings`, and nest `apikit:flow-mappings` in `apikit:config`. ```xml ``` ## 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 PropertyDefaultDescriptionSince

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

## See Also - [APIkit for REST](https://docs.mulesoft.com/apikit/latest/apikit-4-for-rest) - [Building, Implementing, and Testing a REST API](https://docs.mulesoft.com/apikit/latest/apikit-4-implement-rest-api) - [Converting a Mule Project to an APIkit Project](https://docs.mulesoft.com/apikit/latest/apikit-workflow-convert-existing) - [APIkit for REST Error Handling Reference](https://docs.mulesoft.com/apikit/latest/apikit-error-handling-reference) - [APIkit for REST Scaffolding Reference](https://docs.mulesoft.com/apikit/latest/apikit-4-scaffolding-reference) - [APIkit Release Notes](https://docs.mulesoft.com/apikit/latest/apikit-release-notes) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for REST Scaffolding Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for REST scaffolders generate Mule flows and supporting components from RESTful API Modeling Language (RAML) or OpenAPI Specification (OAS) contracts. Use Anypoint Studio to import an API from Anypoint Exchange, Design Center, or local files and produce the implementation backbone automatically. Scaffolding wires the HTTP listener, APIkit Router, API console flow, and per-action flows you replace with business logic. ## API Scaffolding Studio offers several ways to scaffold an API: - From **New Mule Project wizard**, select **Scaffold Flows From These API Specifications** when importing a published API from Exchange or Maven, importing from a local file, or downloading from Design Center. - From **Package Explorer**, right-click the API file and select **Mule** > **Generate flows from Local REST API**. - From **Package Explorer**, right-click the API dependency and select **Generate flows** from its context menu. > [!NOTE] Scaffolding from a local file is not supported for OAS. Scaffolding OAS APIs is available > only for published assets in Exchange. > [!NOTE] Anypoint Studio does not support OAS 3.1. Design OAS 3.1 specifications in > [Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/). ## Implementation Reference When scaffolding a REST API specification, APIkit generates the following components: - A main flow that acts as the entry point and includes: - HTTP Listener as a source - APIkit Router as the main operation APIkit Router is a message processor that directs messages from incoming API requests to the corresponding Mule flows and generates a serialized response using default values. For example, in an invalid request, APIkit generates a `bad request` response, and a missing associated flow for the requested API resource results in a `not implemented` response. While APIkit Router validates aspects such as request payload, headers, query parameters, and URI parameters, it does not validate all elements specified in an API specification. Specifically, the router does not perform security-related validation, such as authentication enforcement. Instead, the API gateway policies are responsible for this validation, which occurs before the request reaches the router. - Error Handler - A secondary flow that exposes the API console and includes: - HTTP Listener as a source - APIkit Console as the main operation - Error Handler - In addition to N flows, one per API action-resource-content-type combination, each flow includes: - No source (this option is available for APIkit for REST and SOAP applications only) - A mock implementation you substitute later with your actual business logic ## Supported MIME Types APIkit for REST supports the following MIME types: - JSON (application/json) - XML (application/xml) - Multipart Form Data (multipart/form-data) - URL Encoded Form Data (application/x-www-form-urlencoded) ## Example ```xml #[vars.outboundHeaders default {}] #[payload] #[vars.outboundHeaders default {}] 400 404 405 406 415 501 #[vars.outboundHeaders default {}] #[payload] #[vars.outboundHeaders default {}] 404 ``` ## See Also - [Error Handling Reference](https://docs.mulesoft.com/apikit/latest/apikit-error-handling-reference) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for SOAP > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for SOAP simplifies building and integrating SOAP-based web services by handling message formats, headers, and WSDL binding against your existing SOAP endpoints. SOAP (Simple Object Access Protocol) exchanges structured payloads between services. APIkit for SOAP keeps those payloads aligned with your contracts. To learn more about automated configurations, data transformations, XML 1.0 defaults, and optional XML 1.1 C0 characters, see [system property](https://docs.mulesoft.com/apikit/latest/apikit-for-soap-module-reference#apikit-for-soap-system-properties). ## Choose the APIkit for SOAP Module Version APIkit for SOAP now has two versions so you can align the module with your Mule runtime and JDK versions. Choose the version that matches the platform you deploy to today. For more information about installation, see [Before You Begin Using APIkit for SOAP](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-prerequisites-task). > [!NOTE] APIkit for SOAP 1.6.5 through 1.6.10 are deprecated. Move to version 1.7.0 (legacy > compatibility) or 2.0.0 (modern major). ### APIkit for SOAP Versions
LineVersionMinimum PlatformUse Cases

Legacy compatibility

1.7.0

JDK 8, 11, or 17; Mule runtime 4.1.x and later

You must keep existing deployments on earlier Mule or Java stacks without adopting the 2.x requirements.

Modern major

2.0.0 (successor to 1.6.10)

JDK 17 only; Mule runtime 4.9.11 and later

You standardize on current Mule and Java 17. You choose the version that receives new features.

Deprecated

1.6.5 – 1.6.10

Don’t adopt or standardize on these releases.

Migrate to 1.7.0 or 2.0.0 using the version selection guide.

## APIkit for SOAP Features - Streamlines SOAP API development, ensuring seamless integration with your existing SOAP infrastructure. - Simplifies the handling of SOAP message formats and headers, so you can focus on the core logic of your APIs. - Automates the binding to WSDL (Web Services Description Language), reducing manual configuration efforts and ensuring accuracy. - Supports data transformations. - Defines and exposes SOAP APIs with ease by emphasizing SOAP/WSDL contracts. - Supports XML 1.0 characters by default. Supports XML 1.1 C0 characters through the [system property](https://docs.mulesoft.com/apikit/latest/apikit-for-soap-module-reference#apikit-for-soap-system-properties). ## See Also - [Before You Begin Using APIkit for SOAP](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-prerequisites-task) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for SOAP Error Handling Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for SOAP maps routing failures and SOAP fault conditions to typed errors you handle in Mule. The table in this reference lists each APIKIT-SOAP error type and what it indicates. The scaffolder does not generate default error-handling logic; add `on-error` strategies in your flows as needed. ## APIkit for SOAP Error Types APIkit for SOAP defines two error types:
Error TypeDescription

APIKIT-SOAP:ROUTER

Routing exception

APIKIT-SOAP:FAULT

Fault exception

## APIkit for SOAP Error Handling APIkit for SOAP scaffolder generates no error-handling code. ## See Also - [Error Handlers](https://docs.mulesoft.com/mule-runtime/latest/error-handling) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit for SOAP Module Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Configure the APIkit for SOAP module in Mule to route SOAP requests from your WSDL, validate inbound XML when needed, and emit SOAP responses. This reference documents `soapkit:config`, router behavior, operations, and related XML elements you use when you implement or troubleshoot SOAP APIs. ## Configurations ### Config Configuration element for a **SOAP Router** #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Connectors use this configuration name to reference its configuration.

None

Yes

Soap Version

Enumeration, one of:

  • SOAP11

  • SOAP12

SOAP version of the WSDL.

SOAP11

No

Address

String

Address of the web service.

None

No

MTOM Enabled

Boolean

Defines if the MTOM protocol manages the attachments.

false

No

Inbound Validation Enabled

Boolean

Defines if the schema of the inbound request is validated.

false

No

Inbound Validation Message Level

Enumeration, one of:

  • WARN

  • ERROR

Defines the validation level of the inbound requests. If set to ERROR, the validation fails and sends an error to the flow.

WARN

No

HTTP Status Var Name

String

Variable name for the HTTP status.

httpStatus

No

Namespace Prefixes

Object

Map of custom namespaces prefixes to specify in response.

None

No

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before the run-time considers it eligible for expiration. The platform does not necessarily expire the instance at the exact moment that it becomes eligible. The run-time purges the instances when it considers it appropriate.

None

No

WSDL Location

String

WSDL file URL, remote or local.

None

Yes

Service

String

Name of the service.

None

Yes

Port

String

Name of the port.

None

Yes

#### Associated Operations - [Fault](#soap-fault) - [Router](#soap-router) ## Operations ### SOAP Fault `` APIkit for SOAP Fault #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration.

None

Yes

Payload

Binary

Mule payload.

#[payload]

No

Streaming Strategy

Configure if repeatable streams and their behavior are used.

Non repeatable stream

No

Operation

String

An operation defined in the WSDL.

None

Yes

Fault

String

A fault defined in the selected operation.

None

Yes

Target Variable

String

Name of a variable on which the operation output is placed.

None

No

Target Value

String

Expression that is evaluated against the operation output. The effect of the expression is stored in the target variable.

#[payload]

No

#### Output

Type

Binary

#### For Configurations - [Config](#config) #### Throws - APIKIT-SOAP:FAULT - APIKIT-SOAP:ROUTER ### SOAP Router `` APIkit for SOAP Router #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration.

None

Yes

Message

Binary

Mule payload.

#[payload]

Attributes

Object

Map of Mule message attributes.

None

Yes

Output Mime Type

String

MIME type of the payload that this operation outputs.

None

No

Output Encoding

String

Encoding of the payload that this operation outputs.

None

No

Streaming Strategy

Configure if repeatable streams and their behavior are used.

Non repeatable stream

No

Target Variable

String

Name of a variable on which the operation output is placed.

None

No

Target Value

String

Expression that is evaluated against the operation output. The outcome of the expression is stored in the target variable.

#[payload]

No

#### Output

Type

Binary

Attributes Type

SOAP Attributes

#### For Configurations - [Config](#config) #### Throws - APIKIT-SOAP:FAULT - APIKIT-SOAP:ROUTER ## Types ### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance is allowed to be idle before it’s considered eligible for expiration

None

No

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

None

No

### Repeatable in Memory Stream
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Amount of memory that is allocated to consume the stream and provide random access to it. If the stream contains more data than buffer capacity, then it’s expanded according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.

None

No

Buffer Size Increment

Number

Amount the buffer size expands if it exceeds its initial size. A value of zero or lower specifies that the buffer doesn’t expand. When the buffer is full, a STREAM_MAXIMUM_SIZE_EXCEEDED error occurs.

None

No

Max Buffer Size

Number

Maximum amount of memory used. If more is used, a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower or equal to zero means no limit.

None

No

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which all these attributes are expressed.

None

No

### Repeatable File Store Stream
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Defines the maximum memory that the stream uses to keep data in memory. If it consumes more, the stream buffers the content on disk.

None

No

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which maxInMemorySize is expressed.

None

No

### SOAP Attributes
FieldTypeDescriptionDefault ValueRequired

Protocol Headers

Object

Protocol headers bundled in the response

None

No

Additional Transport Data

Object

Additional transport data bundled in the response

None

No

### APIkit for SOAP System Properties
System PropertyDefaultDescriptionSince

mule.soapkit.allowControlCharacters

false

Enables the use of XML 1.1 C0 characters.

1.3.0

--- product: APIkit version: 4.x is-latest-version: true --- # APIkit Overview > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit scaffolds Mule applications from AsyncAPI, gRPC, GraphQL, OData, RAML, OpenAPI Specification (OAS), and SOAP contracts, validates inbound traffic against those contracts, and can generate [MUnit test suites](https://docs.mulesoft.com/munit/latest/munit-scaffold-test-task). Each protocol has a dedicated module; routing dispatches requests to the flows that implement your resources. The same general workflow—specify, scaffold, implement, test—applies across modules, so skills transfer among SOAP, REST, GraphQL, and event-driven APIs. ## Supported Web Service Types - [APIkit for AsyncAPI](https://docs.mulesoft.com/apikit/latest/apikit-for-asyncapi) supports AsyncAPI APIs. - [APIkit for gRPC](https://docs.mulesoft.com/apikit/latest/apikit-for-grpc) supports gRPC APIs. - [APIkit for GraphQL](https://docs.mulesoft.com/apikit/latest/apikit-4-for-graphql) supports GraphQL APIs. - [APIkit for OData V2](https://docs.mulesoft.com/apikit/latest/apikit-4-for-odatav2) and [APIkit for OData V4](https://docs.mulesoft.com/apikit/latest/apikit-4-for-odatav4) support OData APIs. - [APIkit for REST](https://docs.mulesoft.com/apikit/latest/apikit-4-for-rest) supports RAML and OAS APIs. - [APIkit for SOAP](https://docs.mulesoft.com/apikit/latest/apikit-4-for-soap) supports SOAP APIs. ## Features - APIkit generates the structure of a Mule application based on a supported API specification. - APIkit includes sources and operations that perform complex input validations according to the requirements in the API specification. - The APIkit for REST module includes an API console that enables you to experiment with the API project as you develop it. - Some APIkit modules include extensions for [Anypoint Studio](https://docs.mulesoft.com/studio/) and [Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/) for enhancing your editing experience in the supported development environments. ## Before You Begin Using APIkit You must have access to [Anypoint Studio](https://docs.mulesoft.com/studio/) or [Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/) to scaffold a supported API specification with APIkit. ## APIkit Versions APIkit works as a module with Mule runtime version 4. By default, Studio includes the APIkit for REST and APIkit for SOAP modules. If you need the GraphQL or OData modules, follow the installation instructions in each section. ## See Also - [APIkit Compatibility](https://docs.mulesoft.com/apikit/latest/apikit-compatibility) - [APIkit for AsyncAPI](https://docs.mulesoft.com/apikit/latest/apikit-for-asyncapi) - [APIkit for gRPC](https://docs.mulesoft.com/apikit/latest/apikit-for-grpc) - [APIkit for GraphQL](https://docs.mulesoft.com/apikit/latest/apikit-4-for-graphql) - [APIkit for OData V2](https://docs.mulesoft.com/apikit/latest/apikit-4-for-odatav2) - [APIkit for OData V4](https://docs.mulesoft.com/apikit/latest/apikit-4-for-odatav4) - [APIkit for REST](https://docs.mulesoft.com/apikit/latest/apikit-4-for-rest) - [APIkit for SOAP](https://docs.mulesoft.com/apikit/latest/apikit-4-for-soap) --- product: APIkit version: 4.x is-latest-version: true --- # APIkit Release Notes > For the full documentation index, see: https://docs.mulesoft.com/llms.txt These release notes are provided for APIkit: - [APIkit for AsyncAPI 1.2.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-asyncapi-1.2.0) - [APIkit for AsyncAPI 1.1.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-asyncapi-1.1.2) - [APIkit for AsyncAPI 1.1.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-asyncapi-1.1.1.rn) - [APIkit for AsyncAPI 1.1.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-asyncapi-1.1.0.rn) - [APIkit for AsyncAPI 1.0.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-asyncapi-1.0.0.rn) - [APIkit for GraphQL 1.2.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-graphql-1.2.0) - [APIkit for GraphQL 1.1.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-graphql-1.1.1) - [APIkit for GraphQL 1.1.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-graphql-1.1.0) - [APIkit for GraphQL 1.0.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-graphql-1.0.1) - [APIkit for GraphQL 1.0.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-graphql-1.0.0) - [APIkit for gRPC 1.0.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-grpc-1.0.0) - [APIkit for OData 4 1.6.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.6.2) - [APIkit for OData 4 1.6.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.6.1) - [APIkit for OData 4 1.6.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.6.0) - [APIkit for OData 4 1.5.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.5.5) - [APIkit for OData 4 1.5.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.5.4) - [APIkit for OData 4 1.5.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.5.3) - [APIkit for OData 4 1.5.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.5.2) - [APIkit for OData 4 1.5.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.5.1) - [APIkit for OData 4 1.5.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.5.0) - [APIkit for OData 4 1.4.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.4.3) - [APIkit for OData 4 1.4.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.4.2) - [APIkit for OData 4 1.4.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.4.1) - [APIkit for OData 4 1.4.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.4.0) - [APIkit for OData 4 1.3.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.3.4) - [APIkit for OData 4 1.3.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.3.3) - [APIkit for OData 4 1.3.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.3.2) - [APIkit for OData 4 1.3.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.3.1) - [APIkit for OData 4 1.3.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.3.0) - [APIkit for OData 4 1.2.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.2.0) - [APIkit for OData 4 1.1.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.1.0) - [APIkit for OData 4 1.0.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.0.2) - [APIkit for OData 4 1.0.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.0.1) - [APIkit for OData 4 1.0.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-4-1.0.0) - [APIkit for OData 2.4.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.4.0) - [APIkit for OData 2.3.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.3.5) - [APIkit for OData 2.3.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.3.4) - [APIkit for OData 2.3.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.3.3) - [APIkit for OData 2.3.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.3.2) - [APIkit for OData 2.3.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.3.1) - [APIkit for OData 2.3.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.3.0) - [APIkit for OData 2.2.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.2.1) - [APIkit for OData 2.2.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.2.0) - [APIkit for OData 2.1.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.1.5) - [APIkit for OData 2.1.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.1.4) - [APIkit for OData 2.1.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.1.3) - [APIkit for OData 2.1.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.1.2) - [APIkit for OData 2.1.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.1.1) - [APIkit for OData 2.1.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.1.0) - [APIkit for OData 2.0.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.9) - [APIkit for OData 2.0.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.8) - [APIkit for OData 2.0.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.7) - [APIkit for OData 2.0.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.6) - [APIkit for OData 2.0.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.5) - [APIkit for OData 2.0.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.4) - [APIkit for OData 2.0.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.3) - [APIkit for OData 2.0.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.2) - [APIkit for OData 2.0.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-2.0.1) - [APIkit for OData 1.0.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-1.0.9) - [APIkit for OData 1.0.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-1.0.7) - [APIkit for OData 1.0.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-odata-1.0.6) - [APIkit for SOAP 2.1.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.1.7) - [APIkit for SOAP 2.1.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.1.6) - [APIkit for SOAP 2.1.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.1.5) - [APIkit for SOAP 2.1.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.1.4) - [APIkit for SOAP 2.1.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.1.3) - [APIkit for SOAP 2.1.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.1.2) - [APIkit for SOAP 2.1.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.1.1) - [APIkit for SOAP 2.1.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.1.0) - [APIkit for SOAP 2.0.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-2.0.0) - [APIkit for SOAP 1.7.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.7.2) - [APIkit for SOAP 1.7.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.7.1) - [APIkit for SOAP 1.7.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.7.0) - [APIkit for SOAP 1.6.10 Release Notes (Deprecated)](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.10) - [APIkit for SOAP 1.6.9 Release Notes (Deprecated)](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.9) - [APIkit for SOAP 1.6.8 Release Notes (Deprecated)](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.8) - [APIkit for SOAP 1.6.7 Release Notes (Deprecated)](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.7) - [APIkit for SOAP 1.6.6 Release Notes (Deprecated)](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.6) - [APIkit for SOAP 1.6.5 Release Notes (Deprecated)](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.5) - [APIkit for SOAP 1.6.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.4) - [APIkit for SOAP 1.6.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.3) - [APIkit for SOAP 1.6.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.2) - [APIkit for SOAP 1.6.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.1) - [APIkit for SOAP 1.6.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.6.0) - [APIkit for SOAP 1.5.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.5.2) - [APIkit for SOAP 1.5.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.5.1) - [APIkit for SOAP 1.5.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.5.0) - [APIkit for SOAP 1.4.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.4.1) - [APIkit for SOAP 1.4.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.4.0) - [APIkit for SOAP 1.3.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.3.4) - [APIkit for SOAP 1.3.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.3.3) - [APIkit for SOAP 1.3.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.3.2) - [APIkit for SOAP 1.3.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.3.1) - [APIkit for SOAP 1.3.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.3.0) - [APIkit for SOAP 1.2.12 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.12) - [APIkit for SOAP 1.2.11 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.11) - [APIkit for SOAP 1.2.10 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.10) - [APIkit for SOAP 1.2.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.9) - [APIkit for SOAP 1.2.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.8) - [APIkit for SOAP 1.2.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.7) - [APIkit for SOAP 1.2.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.6) - [APIkit for SOAP 1.2.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.5) - [APIkit for SOAP 1.2.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.4) - [APIkit for SOAP 1.2.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.3) - [APIkit for SOAP 1.2.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.2) - [APIkit for SOAP 1.2.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.1) - [APIkit for SOAP 1.2.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.2.0) - [APIkit for SOAP 1.1.12 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.12) - [APIkit for SOAP 1.1.11 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.11) - [APIkit for SOAP 1.1.10 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.10) - [APIkit for SOAP 1.1.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.9) - [APIkit for SOAP 1.1.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.8) - [APIkit for SOAP 1.1.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.7) - [APIkit for SOAP 1.1.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.6) - [APIkit for SOAP 1.1.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.5) - [APIkit for SOAP 1.1.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.4) - [APIkit for SOAP 1.1.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.3) - [APIkit for SOAP 1.1.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.2) - [APIkit for SOAP 1.1.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.1) - [APIkit for SOAP 1.1.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.1.0) - [APIkit for SOAP 1.0.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.0.8) - [APIkit for SOAP 1.0.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.0.7) - [APIkit for SOAP 1.0.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.0.5) - [APIkit for SOAP 1.0.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.0.4) - [APIkit for SOAP 1.0.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.0.3) - [APIkit for SOAP 1.0.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.0.2) - [APIkit for SOAP 1.0.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-for-soap-1.0.1) - [APIkit Mule 4 1.13.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.13.3-release-notes) - [APIkit Mule 4 1.13.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.13.2-release-notes) - [APIkit Mule 4 1.13.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.13.1-release-notes) - [APIkit Mule 4 1.13.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.13.0-release-notes) - [APIkit Mule 4 1.12.10 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.10-release-notes) - [APIkit Mule 4 1.12.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.9-release-notes) - [APIkit Mule 4 1.12.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.8-release-notes) - [APIkit Mule 4 1.12.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.7-release-notes) - [APIkit Mule 4 1.12.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.6-release-notes) - [APIkit Mule 4 1.12.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.5-release-notes) - [APIkit Mule 4 1.12.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.4-release-notes) - [APIkit Mule 4 1.12.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.3-release-notes) - [APIkit Mule 4 1.12.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.2-release-notes) - [APIkit Mule 4 1.12.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.1-release-notes) - [APIkit Mule 4 1.12.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12.0-release-notes) - [APIkit Mule 4 1.11.18 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.18-release-notes) - [APIkit Mule 4 1.11.17 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.17-release-notes) - [APIkit Mule 4 1.11.16 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.16-release-notes) - [APIkit Mule 4 1.11.15 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.15-release-notes) - [APIkit Mule 4 1.11.14 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.14-release-notes) - [APIkit Mule 4 1.11.13 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.13-release-notes) - [APIkit Mule 4 1.11.12 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.12-release-notes) - [APIkit Mule 4 1.11.11 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.11-release-notes) - [APIkit Mule 4 1.11.10 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.10-release-notes) - [APIkit Mule 4 1.11.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.9-release-notes) - [APIkit Mule 4 1.11.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.8-release-notes) - [APIkit Mule 4 1.11.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.7-release-notes) - [APIkit Mule 4 1.11.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.6-release-notes) - [APIkit Mule 4 1.11.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.5-release-notes) - [APIkit Mule 4 1.11.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.4-release-notes) - [APIkit Mule 4 1.11.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.3-release-notes) - [APIkit Mule 4 1.11.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.2-release-notes) - [APIkit Mule 4 1.11.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.1-release-notes) - [APIkit Mule 4 1.11.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11.0-release-notes) - [APIkit Mule 4 1.10.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.10.4-release-notes) - [APIkit Mule 4 1.10.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.10.3-release-notes) - [APIkit Mule 4 1.10.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.10.2-release-notes) - [APIkit Mule 4 1.10.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.10.1-release-notes) - [APIkit Mule 4 1.10.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.10.0-release-notes) - [APIkit Mule 4 1.9.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.9.2-release-notes) - [APIkit Mule 4 1.9.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.9.1-release-notes) - [APIkit Mule 4 1.9.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.9.0-release-notes) - [APIkit Mule 4 1.8.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.8.4-release-notes) - [APIkit Mule 4 1.8.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.8.3-release-notes) - [APIkit Mule 4 1.8.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.8.2-release-notes) - [APIkit Mule 4 1.8.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.8.1-release-notes) - [APIkit Mule 4 1.8.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.8.0-release-notes) - [APIkit Mule 4 1.7.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.7.3-release-notes) - [APIkit Mule 4 1.7.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.7.2-release-notes) - [APIkit Mule 4 1.7.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.7.1-release-notes) - [APIkit Mule 4 1.7.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.7.0-release-notes) - [APIkit Mule 4 1.6.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.6.1-release-notes) - [APIkit Mule 4 1.6.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.6.0-release-notes) - [APIkit Mule 4 1.5.12 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.12-release-notes) - [APIkit Mule 4 1.5.11 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.11-release-notes) - [APIkit Mule 4 1.5.10 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.10-release-notes) - [APIkit Mule 4 1.5.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.9-release-notes) - [APIkit Mule 4 1.5.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.8-release-notes) - [APIkit Mule 4 1.5.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.7-release-notes) - [APIkit Mule 4 1.5.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.6-release-notes) - [APIkit Mule 4 1.5.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.5-release-notes) - [APIkit Mule 4 1.5.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.4-release-notes) - [APIkit Mule 4 1.5.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.3-release-notes) - [APIkit Mule 4 1.5.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.2-release-notes) - [APIkit Mule 4 1.5.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.1-release-notes) - [APIkit Mule 4 1.5.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5.0-release-notes) - [APIkit Mule 4 1.4.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.4.2-release-notes) - [APIkit Mule 4 1.4.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.4.1-release-notes) - [APIkit Mule 4 1.4.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.4.0-release-notes) - [APIkit Mule 4 1.3.19 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.19-release-notes) - [APIkit Mule 4 1.3.18 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.18-release-notes) - [APIkit Mule 4 1.3.17 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.17-release-notes) - [APIkit Mule 4 1.3.16 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.16-release-notes) - [APIkit Mule 4 1.3.15 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.15-release-notes) - [APIkit Mule 4 1.3.14 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.14-release-notes) - [APIkit Mule 4 1.3.13 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.13-release-notes) - [APIkit Mule 4 1.3.12 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.12-release-notes) - [APIkit Mule 4 1.3.11 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.11-release-notes) - [APIkit Mule 4 1.3.10 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.10-release-notes) - [APIkit Mule 4 1.3.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.9-release-notes) - [APIkit Mule 4 1.3.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.8-release-notes) - [APIkit Mule 4 1.3.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.7-release-notes) - [APIkit Mule 4 1.3.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.6-release-notes) - [APIkit Mule 4 1.3.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.5-release-notes) - [APIkit Mule 4 1.3.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.4-release-notes) - [APIkit Mule 4 1.3.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.3-release-notes) - [APIkit Mule 4 1.3.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.2-release-notes) - [APIkit Mule 4 1.3.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.1-release-notes) - [APIkit Mule 4 1.3.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3.0-release-notes) - [APIkit Mule 4 1.2.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.2.5-release-notes) - [APIkit Mule 4 1.2.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.2.4-release-notes) - [APIkit Mule 4 1.2.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.20-release-notes) - [APIkit Mule 4 1.1.16 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.16-release-notes) - [APIkit Mule 4 1.1.15 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.15-release-notes) - [APIkit Mule 4 1.1.14 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.14-release-notes) - [APIkit Mule 4 1.1.13 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.13-release-notes) - [APIkit Mule 4 1.1.12 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.12-release-notes) - [APIkit Mule 4 1.1.11 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.11-release-notes) - [APIkit Mule 4 1.1.10 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.10-release-notes) - [APIkit Mule 4 1.1.9 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.9-release-notes) - [APIkit Mule 4 1.1.8 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.8-release-notes) - [APIkit Mule 4 1.1.7 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.7-release-notes) - [APIkit Mule 4 1.1.6 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.6-release-notes) - [APIkit Mule 4 1.1.5 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.5-release-notes) - [APIkit Mule 4 1.1.4 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.4-release-notes) - [APIkit Mule 4 1.1.3 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.3-release-notes) - [APIkit Mule 4 1.1.2 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.2-release-notes) - [APIkit Mule 4 1.1.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1.1-release-notes) - [APIkit Mule 4 1.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.1-release-notes) - [APIkit 4.0.1 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.0.1-release-notes) - [APIkit 4.0 Release Notes](https://docs.mulesoft.com/release-notes/apikit/apikit-4.0-release-notes) ## See Also - [Known Issues](https://help.salesforce.com/s/issues) --- product: APIkit version: 4.x is-latest-version: true --- # Before You Begin Using APIkit for SOAP > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Prepare your workstation and assets before you build a WSDL-based API with APIkit for SOAP. You need supported Anypoint Studio and Mule runtime versions, the APIkit for SOAP component, a SOAP test client, and a WSDL file such as the sample used in the SOAP tutorials. ## Choose Your APIkit for SOAP Module Version Your Mule runtime and JDK determine which APIkit for SOAP dependency to use. Read [Choose the APIkit for SOAP module version](https://docs.mulesoft.com/apikit/latest/apikit-4-for-soap#choose-the-apikit-for-soap-module-version) first, then align your project dependency with that choice. - APIkit for SOAP 1.7.0 supports JDK 8, 11, and 17 on Mule runtime 4.1.x and later. Use APIkit for SOAP 1.7.0 if you must stay on Mule runtime earlier than 4.9.11, or if you’re not ready for JDK 17-only deployments. - APIkit for SOAP 2.0.0 and later requires JDK 17 and Mule runtime 4.9.11 or later. Use APIkit for SOAP 2.0.0 for new Mule projects. ## Prerequisites - Install the required software: - Studio 7.1 or later - A supported Mule runtime for the APIkit for SOAP (4.1.x or later for 1.7.0; 4.9.11 or later for 2.0.0) - The APIkit for SOAP module version that matches your Mule runtime and JDK (1.7.0 or 2.0.0) Studio includes the Anypoint APIkit SOAP extension. - Download and install a SOAP client. For example, [SoapUI](https://www.soapui.org/downloads/soapui.html). - Download or obtain the URL for a WSDL file. For example, [WSDL tshirt2.wsdl](https://docs.mulesoft.com/apikit/latest/_attachments/tshirt2.wsdl). ## See Also - [Implementing a SOAP Interface](https://docs.mulesoft.com/apikit/latest/implementing-apikit-4-for-soap) --- product: APIkit version: 4.x is-latest-version: true --- # Bindings and Parametrized Channels in APIkit for AsyncAPI > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for AsyncAPI maps AsyncAPI channel bindings to Anypoint connectors such as Anypoint MQ, Kafka, and Solace PubSub+. Use binding parameters to tune publish and subscribe behavior for each channel. Parametrized channel names let you reuse one channel pattern across many topics or destinations without duplicating the specification. ## Supported Bindings ### Anypoint Connector for MQ (Anypoint MQ Connector)
BindingPublishMessage ListenerDescriptionReference

Destination

Destination

Destination

Destination (queue or exchange) name for this channel. It’s optional and defaults to the channel name. Specify it if the channel name differs from the actual destination name. For example, if the channel name isn’t a valid destination name in Anypoint MQ.

DestinationType

DestinationType

DestinationType

Type of destination (queue or exchange, or FIFO queue). It’s optional and defaults to queue. Specifies the messaging model supported by this channel:

  • Publish/subscribe

  • Point-to-point

  • Strict message ordering

### Kafka Connector
BindingPublishMessage ListenerDescriptionReference

Key

Key

Key

Key associated with the message in this channel. It’s optional and defaults to no key. Specifies if the message requires a specific key for partitioning or message grouping.

### Solace PubSub+ Connector
BindingPublishMessage ListenerDescriptionReference

deliveryMode

deliveryMode

deliveryMode

Solace PubSub+ Connector operates in direct or persistent mode. The default mode is persistent. The deliveryMode parameter determines the quality of service for publishing messages. The Direct mode offers lower latency but doesn’t guarantee message delivery. The persistent mode ensures that messages are reliably delivered, even in the event of a broker failure.

destinationType

destinationType

destinationType

Solace PubSub+ Connector supports queue in APIkit for AsyncAPI.

topicSubscriptions

Not available

topicSubscriptions

Solace PubSub+ Connector specifies the list of topics the queue subscribes to when the destinationType is queue. If you specify no topic, the queue automatically subscribes to the topic the channel name represents.

> [!NOTE] Anypoint Connector for Apache Kafka (Apache Kafka Connector) and Solace PubSub+ Connector > don’t support bindings. ## Parametrized Channels APIkit for AsyncAPI supports parametrized channels so you can define dynamic and reusable configurations, scale your integrations more effectively, and create consistent configurations across different parts of the integration. APIkit for AsyncAPI doesn’t support parameters if they’re defined in a binding. For example, a `destination` in AnypointMQ. This code provides a partial API spec example with a parameterized `destination`: ```yaml channels: orderAcknowledgement: description: new Order Acknowledgment servers: - anypointMQ bindings: anypointmq: destination: "{env}.amq-asyncapi-poc.orderAcknowledgement" destinationType: queue parameters: env: $ref: "#/components/parameters/env" publish: operationId: listen-order-ack description: publish a new Order Acknowledgment event to this channel and we will process it message: $ref: "#/components/messages/orderAckMessage" ``` You must set the parametrized channel at design time. You can’t set the parametrized channel at runtime. See the complete API example using parametrized channels: asyncapi: '2.6.0' info: title: AMQ-AsyncAPI-PoC version: '1.0.11' description: Proof of Concept for Anypoint MQ AsyncAPI interface contact: name: Example Company email: address@example.com tags: - name: WMS description: Warehouse Management System - name: PoC description: Proof of Concept - name: Order Acknowledgement servers: anypointMQ: url: https://{region}.anypoint.mulesoft.com/api/{version}/organizations/{organizationId}/environments/{environmentId} protocol: anypointmq protocolVersion: v1 description: The Anypoint MQ broker variables: region: $ref: '#/components/serverVariables/region' version: $ref: '#/components/serverVariables/version' organizationId: $ref: '#/components/serverVariables/organizationId' environmentId: $ref: '#/components/serverVariables/environmentId' channels: orderAcknowledgement: description: new Order Acknowledgment servers: - anypointMQ bindings: anypointmq: destination: '{env}.amq-asyncapi-poc.orderAcknowledgement' destinationType: queue parameters: env: $ref: '#/components/parameters/env' publish: operationId: listen-order-ack description: publish a new Order Acknowledgment event to this channel and we will process it message: $ref: '#/components/messages/orderAckMessage' components: parameters: env: description: The Mule runtime environment schema: type: string enum: - dev - tst - acc - prd default: tst serverVariables: region: description: the CloudHub region where the endpoint is situated enum: - mq-eu-west-1 default: mq-eu-west-1 version: description: the version of the Anypoint MQ API enum: - v1 default: v1 organizationId: description: the identifier of our organization (business group) enum: - 7a2b1c3d-4e5f-6g7h-8i9j-0k1l2m3n4o5p environmentId: description: the identifier of the runtime environment within the organization enum: - a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p - b2c3d4e5-6f7g-8h9i-0j1k-2l3m4n5o6p - c3d4e5f6-7g8h-9i0j-1k2l-3m4n5o6p default: a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p messages: orderAckMessage: name: OrderAckMessage description: an order acknowledgment message. payload: $ref: 'schemas/orderAcknowledgement.json' > [!NOTE] APIkit for AsyncAPI uses the parametrized channels only on `listeners`. --- product: APIkit version: 4.x is-latest-version: true --- # Building, Implementing, and Testing a REST API > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Follow this end-to-end workflow to design, implement, and test a REST API in Anypoint Studio. The example relies on the public [{JSON} Placeholder](https://jsonplaceholder.typicode.com) service, which returns mocked user JSON so you can build and validate flows without hosting a backend. ## Before You Begin Ensure you have the following software installed: - Anypoint Studio 7.1.4 or later - Mule runtime engine 4.1.1 or later ## Design Your API Specification Design your API specification with API Designer from Design Center, with the API Specification Project tool from Anypoint Studio, or with a text editor of your choice: > [!NOTE] Anypoint Studio does not support OAS 3.1. Design OAS 3.1 specifications in > [Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/). 1. Create a JSON file including a list of users that serve as an example of what the service returns: \[ { "id": 1, "name": "Leanne Graham", "username": "Bret", "email": "Sincere@april.biz", "address": { "street": "Kulas Light", "suite": "Apt. 556", "city": "Gwenborough", "zipcode": "92998-3874", "geo": { "lat": "-37.3159", "lng": "81.1496" } }, "phone": "1-770-736-8031 x56442", "website": "hildegard.org", "company": { "name": "Romaguera-Crona", "catchPhrase": "Multi-layered client-server neural-net", "bs": "harness real-time e-markets" } } \] 2. Save it as `user-example.json`. 3. Create a new blank file with the following API specification: ```yaml #%RAML 1.0 title: placeholder version: 1.0 /users: get: description: Retrieve a list of all the users responses: 200: body: application/json: example: !include user-example.json /userbyid: get: description: Get information about a particular user queryParameters: id: description: Specify the id of the user you want to retrieve type: integer required: false example: 3 responses: 200: body: application/json: example: | [ { "id": 3, "name": "Clementine Bauch", "username": "Samantha", "email": "Nathan@yesenia.net", "address": { "street": "Douglas Extension", "suite": "Suite 847", "city": "McKenziehaven", "zipcode": "59590-4157", "geo": { "lat": "-68.6102", "lng": "-47.0653" }, }, "phone": "1-463-123-4447", "website": "ramiro.info", "company": { "name": "Romaguera-Jacobson", "catchPhrase": "Face to face bifurcated interface", "bs": "e-enable strategic applications", } } ] ``` 4. Save it as `api.raml`. 5. In Studio, select **File** > **New** > **Mule Project**. 6. In **Project Name**, type the name of your Mule project. - If you are importing your API specification from Exchange, select **Import a published API**, click the plus icon, and select **From Exchange**. ![\*Import a published API\* highlighted when clicking on plus to select the From Exchange option](/mulesoft/current/en-us/apikit/latest/_images/import-from-exchange.png) - If you are importing your API specification from a local file in your file system, select **Import RAML from Local File**. ![\*Import RAML from local file\* highlighted in the API implementation section](/mulesoft/current/en-us/apikit/latest/_images/import-from-local-file.png) - If you are importing your API specification from Design Center, select **Download RAML from Design Center**. ![\*Import from Design Center\* highlighted in the API implementation section](/mulesoft/current/en-us/apikit/latest/_images/import-from-design-center.png) 7. Select **Scaffold flows from these API specifications** if not already selected. 8. Click **Finish**. APIkit generates the necessary flows based on the API specification you imported. 9. Run your APIkit project by clicking **Run** > **Run As** > **Mule Application**. ## Simulate API Calls 1. In Anypoint Studio, locate the **APIkit Consoles** view and click **Open console** under the base point URL `http://localhost:8081/console/`. ![APIkit console tab displays the location of the basepoint URL in the window.](/mulesoft/current/en-us/apikit/latest/_images/apikit-consoles.png) 2. Your default browser opens. The **API Console** shows the API summary and information about the project, such as the title, version, and supported protocols. ![API console version info](/mulesoft/current/en-us/apikit/latest/_images/apikit-console1.png) 3. In **API Summary**, select `GET` for the `/users` resource. It opens a detail page of the resource showing, among others, the expected JSON example for an HTTP 200 response. ![APIkit response](/mulesoft/current/en-us/apikit/latest/_images/apikit-console3.png) 4. In **API Summary**, expand `/userbyid`. 5. Select `GET` for the `/usersbyid` resource. 6. Click `Try it` to expand the view for sending a request. The **API Console** displays a section to add parameters and headers to try a request. 7. Select **Show optional parameters** if not selected. 8. Type `3` as a query parameter value for the `id` parameter and click `Send`. An HTTP 200 response confirms the successful request for the `/usersbyid` resource, which contains user information for the user with ID 3. This response also includes the body with a JSON example. ![Information for the user having id 3 highlighted](/mulesoft/current/en-us/apikit/latest/_images/apikit-console4.png) ## Add Business Logic to Your API Implementation Modify the flows to return actual data from the JSON Placeholder service instead of the examples from the API. 1. Drag a new **Flow** component from the **Mule Palette**. 2. Rename the new flow as `user_request_flow`. 3. Drag an **HTTP Request** component to the flow process. 4. In the properties editor of **Request**, in **General**, set the following HTTP request options: - In **Method**, leave the default `GET`. - In **Path**, set to `/users`. - On **Query Parameters**, select **Switch to expression mode** and paste the following DataWeave script: output application/java --- if (not isEmpty(attributes.queryParams)) { id : attributes.queryParams.id } else {} 5. Delete **Transform Message** component in `get:\users:api-config` and `get:\users\userbyid:api-config` flows. 6. Drag one **Flow Reference** for each flow in replacement of the removed **Transform Message** components. 7. In the properties editor of **Flow Reference** components, set flow name as `user_request_flow`. 8. Save changes. ## Test Your API Implementation 1. In Package Explorer, right-click the project name and choose **Run As** > **Mule Application**. 2. Open a browser and go to `http://localhost:8081/api/users`. The user information from the JSON Placeholder service is returned: \[ { "id": 1, "name": "Leanne Graham", "username": "Bret", "email": "Sincere@april.biz", "address": { "street": "Kulas Light", "suite": "Apt. 556", "city": "Gwenborough", "zipcode": "92998-3874", "geo": { "lat": "-37.3159", "lng": "81.1496" ... { "id": 10, "name": "Clementina DuBuque", "username": "Moriah.Stanton", "email": "Rey.Padberg@karina.biz", "address": { "street": "Kattie Turnpike", "suite": "Suite 198", "city": "Lebsackbury", "zipcode": "31428-2261", "geo": { "lat": "-38.2386", "lng": "57.2232" } ... \] 3. Get information about the user having ID = 4 by going to `http://localhost:8081/api/users/userbyid?id=4`. \[ { "id": 4, "name": "Patricia Lebsack", "username": "Karianne", "email": "Julianne.OConner@kory.org", "address": { "street": "Hoeger Mall", "suite": "Apt. 692", "city": "South Elvis", "zipcode": "53919-4257", "geo": { "lat": "29.4572", "lng": "-164.2990" } }, "phone": "493-170-9623 x156", "website": "kale.biz", "company": { "name": "Robel-Corkery", "catchPhrase": "Multi-tiered zero tolerance productivity", "bs": "transition cutting-edge web services" } } \] Your REST API creation, implementation, and testing are complete. ## See Also - [{JSON} Placeholder](http://jsonplaceholder.typicode.com) - [Tutorial: Build an API from Start to Finish](https://docs.mulesoft.com/general/api-led-overview) - [Create and Publish an API Specification or API Fragment with Design Center](https://docs.mulesoft.com/design-center/design-create-publish-api-specs) --- product: APIkit version: 4.x is-latest-version: true --- # Building, Implementing, and Testing an OData V2 API > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Build an OData v2 REST API with APIkit for OData and the MySQL walkthrough: generate flows from RAML types, connect to a sample database, and exercise HTTP and OData endpoints. The OData MySQL example packages a working Maven project you import into Anypoint Studio. ## Before You Begin Install this software to create and use an OData REST API with APIkit: - OData Plugin - Mule runtime engine 4.1.1 or later - Anypoint Studio 7.1.4 or later Additionally, you must download the [OData example entity data model](https://docs.mulesoft.com/apikit/latest/_attachments/odata.raml). ## Implement an OData v2 API Using the APIkit OData Extension This section walks through implementing an OData-enabled REST API: 1. In Studio, select **File** > **New** > **Mule Project**. 2. In the **Project Name** field, type the name of your Mule project. 3. Click **Finish**. 4. Copy the `odata.raml` file you downloaded in the prerequisites section to the `/src/main/resources/api` directory in your project. 5. In the project explorer, right-click `odata.raml` and select **Mule** > **Generate OData API from RAML Types**. ![A window highlighting the full path to the generate OData API from RAML types option.](/mulesoft/current/en-us/apikit/latest/_images/generate-odata.png) 6. The OData extension generates the necessary files for your OData API implementation: ![Three files highlighted in the tree: api.xml in the Mule folder, and api.raml and odatalibrary.raml files in the resource folder.](/mulesoft/current/en-us/apikit/latest/_images/list-of-odata-files.png)
1Mule configuration file with the flows for the API implementation
2Generated RAML definition
3Generated RAML libraries
7. Add the necessary logic for your API implementation in the flows. ## OData MySQL Example The OData MySQL example is a fully functional OData API packaged as a Maven project. In this example, the data source, the app, and the service are local. First, you install a MySQL database and load tables using a provided script. Next, you import the compressed project into Studio, which includes a MySQL database driver. You can examine the flows to see how to implement the endpoints you need by accessing the data. Then you run the project and call the REST and OData services. ### Install and Populate a MySQL Database 1. Install a MySQL database and launch MySQL. 2. Download the MySQL project example [apikit-odata-example-main.jar](https://docs.mulesoft.com/apikit/latest/_attachments/apikit-odata-example-main.jar). 3. Run the `example.sql` script located in `src/main/resources` using MySQL commands to load data into a database named `apikit-odata-example`. ### Implement the OData API 1. In Studio, Select **File** > **Import**. 2. Select **Anypoint Studio** > **Packaged mule application (.jar)** > **Next**. 3. Browse for the `apikit-odata-example-main.jar` file and click **Finish**. 4. In Studio, edit the `mule-configuration.properties` file in the `src/main/resources` folder, and set the following properties to access the local MySQL database: ```html ds.db.port=3306 ds.db.user= ds.db.host= ds.db.database=apikit-odata-example ds.db.password= ``` 5. Run the API locally by right-clicking the project, and selecting **Run As** > **Mule Application**. You can now access the REST and OData Service. ## Access the REST and OData Service To run the API locally: 1. Right-click the project, and select **Run As** > **Mule Application**. 2. Access the REST and OData Service by using the following URLs: - REST API: `/api` - OData API: `/api/odata.svc` The following examples cover a few of the many REST calls and OData queries you can use. ### Retrieve a List of Customers Call the REST API to retrieve the list of customers: http://localhost:8081/api/customers The response is: ```JSON { "entries": [ { "ContactName": "Maria Anders", "ContactTitle": "Sales Representative", "CompanyName": "Alfreds Futterkiste", "CustomerID": "" }, { "ContactName": "Maria Anders", "ContactTitle": "Sales Representative", "CompanyName": "Alfreds Futterkiste", "CustomerID": "ALFKI" }, ] } ``` ### Access a Description of the OData Service Get information about the collections behind this service: http://localhost:8081/api/odata.svc The response is: ```xml Default customers orders ``` ### Get OData Service Metadata The service metadata exposes the structure of OData service resources, operations, and EDM for a given service. Get the metadata for HTTP services: http://localhost:8081/api/odata.svc/$metadata The response aligns with the `odata.raml` EDM you used to build the HTTP Services API example: ```xml ... ``` ### Create a Customer Entity Using OData Service Create a POST request with the following body: BOTTM Bottom-Dollar Markets Elizabeth Lincoln Accounting Manager The request must have the following headers: Content-Type: application/xml Accept: application/xml Call the REST API to create a customer entity: http://localhost:8081/api/odata.svc/customers ### Query the Data Source Issue OData queries to get the list of customers in XML and JSON format: http://localhost:8081/api/odata.svc/customers http://localhost:8081/api/odata.svc/customers?$format=json Issue an OData query to get the tenth customer in the customer list: http://localhost:8081/api/odata.svc/customers?$format=json&$top=1&$skip=10&$inlinecount=allpages The response is: ```json { "d": { "results": [ { "__metadata": { "uri": "http:/localhost:8081/api/odata.svc/customers('BOTTM')", "type": "odata2.namespace.customers" }, "CompanyName": "Bottom-Dollar Markets", "ContactName": "Elizabeth Lincoln", "ContactTitle": "Accounting Manager", "CustomerID": "BOTTM" } ], "__count": "98" } } ``` ## Implement Endpoints for an OData API You can implement API endpoints such as the `get:/customers:config` and `get:/orders:config` flows using Anypoint Studio. The output format of the flows must be JSON. For more information, see the [complete functioning example](https://docs.mulesoft.com/apikit/latest/creating-an-odatav4-api-with-apikit#odata-mysql-example). ### Declare Input Variables for a GET 1. Declare a variable for the APIkit OData Service variable that contains the fields of your entity in a list of strings (List). For example: ```javascript var entityFields = vars.odata.fields; ``` 2. Declare a variable for the APIkit OData Service variable that filters into 'http.query.params'. For example: ```javascript var filters = attributes.queryParams; ``` 3. Declare a variable for the APIkit OData Service variable that contains the keys of your entity. For example: ```javascript var keys = vars.odata.keyNames; ``` 4. Declare a variable for the APIkit OData Service variable that contains the table name. For example: ```javascript var remoteEntityName = vars.odata.remoteEntityName; ``` ### Declare Input Variables for a POST 1. Declare a variable for the APIkit OData Service inbound property that contains the entity’s name: ```javascript var remoteEntityName = vars.odata.remoteEntityName; ``` 2. Declare a variable for transforming your payload into something like this: { myKey1: 'myValue1', myKey2: 'myValue2'}. ```javascript var valuesFromPayload = { keys: payload pluck $$, values: payload pluck "'$'" } ``` 3. Declare two variables, and use 'joinBy' to transform your keys and values into comma-separated-values (CSV). For example: ```javascript var columns = ( (valuesFromPayload.keys map "`$`" ) joinBy ", ") // myKey1, myKey2 var values = (valuesFromPayload.values joinBy ", ") // 'myValue1', 'myValue2' ``` ### Format Output The output for each flow must conform to the following format: ```xml { "entries": [ {}, {}, {} ] } ``` ## See Also - [APIkit for OData v2 Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-odatav2-extension-reference) - [Deploy to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub) --- product: APIkit version: 4.x is-latest-version: true --- # Building, Implementing, and Testing an OData V4 API > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Build an OData v4 API with APIkit for OData using CSDL metadata, scaffolding, and the [OData MySQL example](#apikit-for-odata-4-implementation-example) to query MySQL over HTTP. The tutorial covers project setup, generated flows, and running the packaged sample. ## Before You Begin Install this software to create and use an OData REST API with APIkit: - OData Plugin - Mule runtime engine 4.3.0 or later - Anypoint Studio 7.9.0 or later Additionally, you must download the [OData 4 implementation example](https://docs.mulesoft.com/apikit/latest/_attachments/apikit-odata4-example.jar). ## Scaffold an OData V4 API Using APIkit for OData 1. In Studio, select **File** > **New** > **Mule Project**. 2. In the **Project Name** field, type the name of your Mule project. 3. Click **Finish**. 4. In `src/main/resources/api`, create a new file with a `.csdl.xml` extension. For example, `odata-metadata.csdl.xml`: ```xml (1) (2) (3) (4) ```
1EntityType defines the type and its properties.
2key defines which property or set of properties is the key for the entity.

For example, the entity set Orders comprises two keys: OrderID and ShipName.

3EntityContainer defines the sets of exposed entities.

In this example, Orders and Customers.

4EntitySet contains a name and EntityType.

You must define them in the schema namespace.

5. In the **Package Explorer**, right-click your `odata-metadata.csdl.xml` file and select **Generate Mule OData 4 API**: ![The path to the Generate Mule OData 4 API option highlighted](/mulesoft/current/en-us/apikit/latest/_images/generate-odata-v4-api.png) 6. APIkit generates the corresponding flows based on your `.csdl.xml` metadata file. ![The three flows created from the \`csdl.xml\` metadata file are highlighted.](/mulesoft/current/en-us/apikit/latest/_images/generated-odata-4-flow.png)
1The main flow receives messages and routes the operation to the correct handler.
2Five flows with GET, PUT, POST, and DELETE operations for each entity.
3A flow with a GET operation to retrieve the collection of entities.
## Handle OData System Query Options Within each **On Entity Request** and **On Entity Collection Request** listener you can access a `systemQueryOptions` attribute that maps to each OData query option (`$select`, `$orderby`, `$count`, etc.). For example, to access the `$select` value you use the following expression: ```none #[attributes.odataRequestAttributes.systemQueryOptions.select] ``` ![odataRequestAttributes highlighted in the output tab, within the Mule message, under attributes](/mulesoft/current/en-us/apikit/latest/_images/odata-query-option-attributes.png) ## APIkit for OData 4 Implementation Example 1. Download the full [apikit-odata4-example](https://docs.mulesoft.com/apikit/latest/_attachments/apikit-odata4-example.jar). 2. Import the downloaded example in Studio. 3. Run the SQL statements in the src/main/resources/example.sql file to create the database, tables, and test data in MySQL database. 4. Run the application in Studio. After Studio deploys the application, you can query your OData service using the following query examples: ### GET Request Example Request ```curl curl --location --request GET 'localhost:8081/api/Customers('BLAUS')' ``` Response ```JSON { "@odata.context": "http://localhost:8081/api/$metadata#Customers/$entity", "CompanyName": "Blauer See Delikatessen", "ContactName": "Hanna Moos", "ContactTitle": "Sales Representative", "CustomerID": "BLAUS" } ``` #### GET Request Example With Composite Key Request ```curl curl --location --request GET 'localhost:8081/api/Orders(OrderID=10315,ShipName='Island Trading') ``` Response ```JSON { "@odata.context": "http://localhost:8081/api/$metadata#Orders/$entity", "Freight": 41.76, "OrderDate": "1996-09-26T00:00:00Z", "OrderID": "10315", "Price": null, "Priority": 1, "ShipAddress": "Garden house Crowther Way", "ShipName": "Island Trading" } ``` ### Create Example In this example, the client provides the key (or keys) to create a new entity: POST Customer Request ```curl curl --location --request POST 'http://localhost:8081/api/Customers' \ --header 'Content-Type: application/json' \ --data-raw '{ "CompanyName": "Mulesoft", "ContactName": "Customer 123", "CustomerID": "NW123" }' ``` POST Order ```curl curl --location --request POST 'http://localhost:8081/api/Orders' \ --header 'Content-Type: application/json' \ --data-raw '{ "Freight": 32.38, "OrderID": 100000, "ShipAddress": "Unknown St. 123", "ShipName": "Order 100000" }' ``` ### Update Example OData V4 recommends using PATCH to update entities because it only changes the provided fields: PATCH ```curl curl --location --request PATCH 'http://localhost:8081/api/Customers('\''BOTTM'\'')' \ --header 'Content-Type: application/json' \ --data-raw '{ "ContactName": "James Bottom" }' ``` ```curl curl --location --request PATCH 'http://localhost:8081/api/Orders(OrderID=10251,ShipName='\''Victuailles en stock'\'')' \ --header 'Content-Type: application/json' \ --data-raw '{ "ShipAddress": "Unknown Av. 1234" }' ``` OData V4 discourages the usage of PUT to update your entities because PUT replaces the entire entity with the new one, which can lead to data loss. PUT ```curl curl --location --request PUT 'http://localhost:8081/api/Customers('\''LONEP'\'')' \ --header 'Content-Type: application/json' \ --data-raw '{ "CompanyName": "New Lonesome Pine Restaurant", "ContactName": "Fran C. Wilson", "CustomerID": "LONEP" }' ``` ```curl curl --location --request PUT 'http://localhost:8081/api/Orders(OrderID=11056,ShipName='\''Eastern Connection'\'')' \ --header 'Content-Type: application/json' \ --data-raw '{ "Freight": 27.52, "OrderDate": "1998-05-28T00:00:00", "OrderID": 11056, "Priority": 2, "ShipAddress": "45 King George", "ShipName": "Eastern Connection" }' ``` ### Delete Example To delete the entity: DELETE ```curl curl --location --request DELETE 'http://localhost:8081/api/Customers('\''NW123'\'')' ``` ```curl curl --location --request DELETE 'http://localhost:8081/api/Orders(OrderID=11056,ShipName='\''Eastern Connection'\'')' ``` ### Client-Side Pagination in APIkit for OData 4 You can configure your client to request the page using the HTTP query parameters `$skip` and `$top`. - The `$top` system query parameter specifies a non-negative integer _n_ that limits the number of items returned from a collection. - The `$skip` system query parameter specifies a non-negative integer _n_ that excludes the first _n_ items of the queried collection from the result. For example: ```curl curl -X GET ‘localhost:8081/api/Customers?$skip=1&$top=5’ ``` Returns five records starting from the second position. ### Server-Side Pagination in APIkit for OData 4 Server-side pagination enables you to control a subset of data requests fetched from a client-side server by using a fixed `pageSize` parameter. It divides the response data set into discrete pages to improve data readability. The server defines the page size, which is the maximum number of records that the server returns in a request. #### Server-Side Pagination Operation in OData 4 OData defines a `@odata.nextLink` to indicate that a response is only a subset of the requested collection of entities. As such, `@odata.nextLink` contains a URL that enables the client to retrieve the next subset of the requested collection. The URL contains a query parameter `$skiptoken` that indicates the server where the next page starts. #### Implement Server-Side Pagination in APIkit for OData 4 You can implement the server-side pagination by defining a set of fields with `` in the **Responses** tab in Anypoint Studio. ![pageSize set to ${service.orders.pageSize} in the On Entity Collection Request tab](/mulesoft/current/en-us/apikit/latest/_images/pagesize.png) After `pageSize` is populated, APIkit creates the XML representation of the previous fields: ```xml ``` #### Page Size or Token Fields for Server-Side Pagination `Page size` is a fixed number that represents the maximum number of records the `request-entity-collection` listener can retrieve for each request. In case you cannot use a numeric pagination, set a token in the `Token field`, so a developer can generate it in the corresponding flow. APIkit for OData includes this token value in the `@odata.nextLink` URL with a query parameter `$skiptoken=`. ## See Also - [APIkit for OData v4 Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-odatav4-extension-reference) - [APIkit for OData v4 Error Handling Reference](https://docs.mulesoft.com/apikit/latest/apikit-odatav4-error-handling-reference) - [Deploy to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub) --- product: APIkit version: 4.x is-latest-version: true --- # Configure the Service URI > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Deployments behind a load balancer or API proxy often rewrite public URLs; APIkit for REST must emit links and metadata that match what clients see. Set **Keep RAML/OAS base URI** (the `keepApiBaseUri` attribute on `apikit:config`) so the base URI in your RAML or OpenAPI Specification stays aligned with the gateway address. Set `keepApiBaseUri` to `true` in XML: ```xml ``` --- product: APIkit version: 4.x is-latest-version: true --- # Configuring Behavior During Runtime > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Tune APIkit for REST at run time by tightening validation, shaping HTTP responses, and keeping base URIs consistent behind proxies. Each linked task covers one concern you can combine in the same project. ## Tasks - [Validating Query Parameters and Headers](https://docs.mulesoft.com/apikit/latest/validate-4-task) - [Configuring the Response Headers and Status Code](https://docs.mulesoft.com/apikit/latest/configure-headers4-task) - [Configure the Service URI](https://docs.mulesoft.com/apikit/latest/configure-service-uri-task) --- product: APIkit version: 4.x is-latest-version: true --- # Configuring the Response Headers and Status Code > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Map APIkit for REST outbound headers and HTTP status values to variables the HTTP Listener writes into each response. Configure `outboundHeadersMapName` and `httpStatusVarName` on `apikit:config` so flows set `vars.outboundHeaders` and `vars.httpStatus` consistently across success and error paths. The steps align listener response blocks with those variable names. ## Configure Variable Names You can configure the default variables that the HTTP listener searches for by configuring these properties in **APIkit Router**: - `outboundHeadersMapName` Name of the variable that contains a headers map added in the response (`outboundHeaders` by default) - `httpStatusVarName` Name of the variable that stores the status code to set in the response (`httpStatus` by default) **APIkit Router** creates both variables and facilitates including custom HTTP headers and status codes in the response. ```xml ``` To modify the default names of these variables, update the default HTTP listener configuration to align the variable names and the configuration. ```xml #[vars.outboundHeaders default {}] #[payload] #[vars.outboundHeaders default {}] ``` ## Add a Header to a Response Put the header to add in the `outboundHeaders` map, as shown in the following example: ```xml ``` ## Set the Status Code of a Response Use the following example as a reference to assign a specific value to the `httpStatus` variable: ```xml ``` ## See Also - [Sending HTTP responses when configuring HTTP listener source in Mule 4](https://docs.mulesoft.com/http-connector/1.7/http-listener-ref#sending-http-responses) # Converting a Mule Project to an APIkit Project Convert Mule applications that implement HTTP and database logic into APIkit for REST projects so you expose the same behavior through a RAML or OpenAPI Specification (OAS) contract. Use the [manual approach](#manual-approach) to wrap APIkit Router around existing flows, or the [scaffolding approach](#scaffolding-approach) to rebuild flows from the API specification if regenerating structure matches your delivery plan. Balance complexity, risk, and how much of the flow graph you can refactor. The walkthrough uses a sample Mule application that retrieves users from a database: ```xml ``` ## [](#before-you-begin)Before You Begin To define the API specification for your service, see [Design Your API Specification When Building, Implementing, and Testing a REST API](https://docs.mulesoft.com/apikit/latest/apikit-4-implement-rest-api#design-your-api-specification). To illustrate this example, create or copy the API specification and JSON example used in that workflow to the `/src/main/resources/api` folder. ## [](#manual-approach)Manual Approach Follow these steps to configure a functional router for your existing flows manually. ### [](#step-1-create-a-main-flow)Step 1: Create a Main Flow Within the APIkit project, create a main flow that serves as the entry point: 1. Drag the following components from the Mule palette to the canvas: - An **HTTP Listener** source as a flow source - An **APIkit Router** operation within the flow process 2. In the properties editor for **HTTP Listener** in **Connector Configuration**, select the existing **HTTP\_Listener\_Config**. 3. Specify a listener path for the APIkit router by entering `/api/` **in \*Path**. 4. In the properties editor for the APIkit router, in **Router Configuration**, click **Add** to create a new configuration. The **Global Element Properties** wizard appears. 5. In **API Definition**, select the `api/api.raml` path. 6. Accept the configuration. 7. Delete **HTTP Listener** from `GET-Users-FLOW`. 8. Delete **HTTP Listener** from `GET-User-By-Id-FLOW`. ```xml ``` ### [](#step-2-map-api-resources-and-actions-to-flows)Step 2: Map API Resources and Actions to Flows By default, each APIkit flow adheres to a naming convention for routing purposes, characterized by the following pattern: `action:\resource[:content-type][:config-name]`
Name Description

action

HTTP method

resource

HTTP resource

content-type

Payload content-type (optional)

config-name

APIkit router configuration name (optional)

To retain the original flow names and map each API resource and action to them, override this behavior by following these steps: 1. Select **APIkit Router** to open the **Properties Editor**. 2. In **Router configuration**, click **Edit**. The **Global Element Properties** wizard appears. 3. In **Mappings**, click `Add` to create a new mapping configuration. The **New Mapping** dialog appears. 4. Use the drop-down to map the resources to actions. - In **Resource**, select `/users`. - In **Action**, select **Get**. - In **Flow**, select `GET-Users-FLOW`. - Click **OK**. 5. In **Mappings**, click **Add**. The **New Mapping** dialog appears. 6. Use the drop-down to map the resources to actions. - In **Resource**, select `/users/userbyid`. - In **Action**, select `Get`. - In **Flow**, select the flow that contains the get users action: `GET-User-By-Id-FLOW`. - Click **OK**. ```xml ``` ## [](#scaffolding-approach)Scaffolding Approach Follow the process at [Before You Begin](#before-you-begin). When completed, include an alternative workflow for scaffolding your API specification. With this approach, you get the APIkit router configuration, error handler, and console flow out of the box. You also get a flow that maps each resource. ### [](#step-1-scaffold-your-api-specification)Step 1: Scaffold Your API Specification Scaffold your API to auto-generate the main, console, and resources flows: 1. In **Package Explorer**, right-click `/src/main/resources/api/api.raml`. 2. Select **Mule**. 3. Click **Generate Flows from Local REST API**. A new XML file with the same name as the API is created. This file contains the scaffolded flows. ### [](#step-2-reference-flows)Step 2: Reference Flows Do either of the following: - Delete the scaffolded flows for each resource and map the original flows as described in [Step 2: Map API Resources and Actions to Flows](#step-2-map-api-resources-and-actions-to-flows). - Remove all operations from the scaffolded flows and add a flow reference that contains the removed operations. By choosing this option, you introduce an additional layer of indirection because you reference all flows to the flow that has the operations, and such indirection can be inconvenient in some scenarios. ```xml ... ``` - Transfer the content of the existing flows to the scaffolded flows that adhere to the routing naming convention. If the application is large, performing these modifications can be a laborious task. ```xml ... ``` ## [](#test-your-api)Test Your API Now that your new project is set up, you are ready to [test](https://docs.mulesoft.com/apikit/latest/apikit-4-implement-rest-api#test-your-api-implementation) your API. ## [](#see-also)See Also - [APIkit for REST Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-4-xml-reference) - [APIkit for REST Error Handling Reference](https://docs.mulesoft.com/apikit/latest/apikit-error-handling-reference) --- product: APIkit version: 4.x is-latest-version: true --- # Create an APIkit for SOAP Project > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Create a Mule project from a WSDL so Anypoint Studio generates APIkit for SOAP flows and stores the contract under `src/main/resources/api`. Meet the [prerequisites for using APIkit for SOAP](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-prerequisites-task) first. After you pick the service and port, run the application and retrieve the published WSDL from the HTTP endpoint to verify the service. 1. In Anypoint Studio, from **File**, select **New** > **Mule Project**. ![New Mule project window that highlights the project-name field, runtime engine, \*From Design Center or Local Files\* tab, and expand icon for browsing files](/mulesoft/current/en-us/apikit/latest/_images/create-new-mule-project-soap.png)
1In Project Name, enter a name for the project.
For example, soap-implementation.
2Select the Mule runtime engine version.
For example, Mule Server 4.2.2 EE.
3In API Specification, select From Design Center or Local Files.
4Select Browse files from the More actions menu.
2. Select a service and port. For this example, accept the default values, `TshirtService` and `TshirtServicePort`. ![API specification window that highlights the service and the port from the menu](/mulesoft/current/en-us/apikit/latest/_images/create-apikit-soap-project.png) 3. Click **Finish**. The new project appears with the WSDL file in the `src/main/resources/api` folder. 4. Right-click a blank area of the canvas and select **Run Project**. 5. In your SOAP UI client, go to `http://localhost:8081/TshirtService/TshirtServicePort?wsdl`. The SOAP service returns the content of your WSDL file. If you update your WSDL file, regenerate your flows by right-clicking your WSDL file and selecting **Mule** > **Generate Flows From WSDL**. ## See Also - [Find Unimplemented Operations Using a SOAP Fault](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-fault-task) --- product: APIkit version: 4.x is-latest-version: true --- # Defining EDM with RAML in APIkit for OData v2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Define your OData Entity Data Model (EDM) in RAML so APIkit for OData v2 can build the `odata.raml` library the extension uses to scaffold flows. Model entities with EDM-compatible types, keys, and annotations that match the requirements below. After scaffolding with the APIkit OData extension, implement the generated endpoints with your business logic. ## Entity Data Model The APIkit OData Extension builds the OData API based on an `odata.raml` file that describes the OData entity data model (EDM) using supported EDM types. The `odata.raml` file is a RAML Library. Each DataType represents an EntityModel. For example: ```yaml #%RAML 1.0 Library uses: odata: !include libraries/odata.raml types: Employee: properties: id: type: integer (odata.key): bool (odata.nullable): bool name: type: string ``` Annotate at least one of the properties on each entity using the annotation (odata.key). These annotations pertain to each property: ```yaml (odata.precision): int (odata.scale): int ``` Use the optional (odata.remote) annotation to provide the name of the entity in the remote data source: ```yaml types: Employee: (odata.remote): SAP_VBAK properties: ... ``` ## Supported EDM Data Types The APIkit OData Extension supports all EDM types except Edm.Sbyte. In your model, you define the RAML types that map to the EDM type shown in the following list of supported EDM types: ### Edm.String The String type represents fixed or variable length character data. RAML `type: string` ### Edm.Boolean The Boolean data type is used to represent the mathematical concept of binary valued logic. There are no applicable facets for this type. RAML `type: boolean` ### Edm.Double The Double type represents a floating point number with 15 digits precision that can represent values with an approximate range of ± 2.23e -308 through ± 1.79e +308. RAML `type: number` ### Edm.Single The Single type represents a floating point number with seven digits precision that can represent values with an approximate range of ± 1.18e -38 through ± 3.40e +38 RAML `type: number` RAML `format: float` ### Edm.Binary The binary data type is used to represent fixed or variable length binary data. RAML `type: file` ### Edm.DateTime The DateTime type represents date and time with values ranging from 12:00:00 midnight, January 1, 1753 A.D. through 11:59:59 P.M, December 31, 9999 A.D. RAML `type: datetime-only` ### Edm.Int32 The Int32 type represents a signed 32-bit integer value. RAML `type: integer` ### Edm.Int64 The Int64 type represents a signed 64-bit integer value. RAML `type: integer` RAML `format: int64` ### Edm.Int16 The Int16 type represents a signed 16-bit integer value. RAML `type: integer` RAML `format: int16` ### Edm.Byte The Byte type represents an unsigned 8-bit integer value. RAML `type: integer` RAML `format: int8` ### Edm.Decimal The Decimal type represents numeric values with fixed precision and scale. You can specify the required precision and scale by modifying these optional properties. This type can describe a numeric value ranging from negative 10^255 + 1 to positive 10^255 -1. RAML `type: number` RAML `(odata.precision): 3` RAML `(odata.scale): 3` ### Edm.Guid The globally unique identifier (GUID) type represents a 16-byte (128-bit) number compliant with the UUID standard (RFC 4122). RAML `type: string` RAML `(odata.type): guid` ### Edm.Time The Time type represents the time of day with values ranging from 0:00:00.x to 23:59:59.y, where x and y depend upon the precision. RAML `type: time-only` ### Edm.DateTimeOffset The DateTimeOffset type represents date and time as an offset in minutes from GMT, with values ranging from 12:00:00 midnight, January 1, 1753 A.D. through 11:59:59 P.M, December 9999 A.D. RAML `type: datetime` --- product: APIkit version: 4.x is-latest-version: true --- # Display a Typed SOAP Fault > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Configure the `ListInventory` operation in APIkit for SOAP so responses surface the **TshirtFault** typed fault from `tshirt2.wsdl`, which also maps faults to `OrderTshirt`, `ListInventory`, and `TrackOrder`. Select Soap Fault 1.1 or Soap Fault 1.2 for any WSDL, including services that do not declare typed faults. 1. In Anypoint Studio, search for **fault** in the command palette. Multiple `SOAP Fault` components can appear. 2. Drag `SOAP Fault` to the `ListInventory:api-config` flow. If **Operation Unavailable** message appears, cancel the operation and select another `SOAP Fault` component. 3. Repeat these steps until you find a version match. 4. In the properties editor, in **Module Configuration**, select `soapkit-config`. 5. In **Operation**, select `ListInventory`. 6. In **Fault**, select `Fault`. 7. Save the properties. 8. Select the `Transform Message` component. 9. Modify the DataWeave code as follows: ```raml %dw 2.0 output application/xml ns ns0 http://mulesoft.org/tshirt-service ns soap http://schemas.xmlsoap.org/soap/envelope/ --- { soap#Fault: { faultcode: "soap:Server", faultstring: "The error details", detail: { ns0#TshirtFault: { errorStuff: 500 } } } } ``` 10. Save the project and run it again. Using SoapUI, run the `ListInventory` operation. The client returns the following envelope instead of the default fault: ```xml soap:Server The error details 500 ``` ## See Also - [Get a SOAP Header](https://docs.mulesoft.com/apikit/latest/apikit-4-get-header-task) --- product: APIkit version: 4.x is-latest-version: true --- # Find Unimplemented Operations Using a SOAP Fault > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Exercise the `OrderTshirt` operation in SoapUI against a deployed APIkit for SOAP project before that operation is implemented. The runtime returns a SOAP fault that names the missing router operation so you know which flow to build in Anypoint Studio. This example requests a large t-shirt for a customer named `John`, which the stub cannot process yet. 1. In SoapUI, create a new SOAP project and put the URL for your deployed Mule APIkit project in the initial WSDL file. In this example, the URL is `http://localhost:8081/TshirtService/TshirtServicePort?wsdl`. ![New SOAP project window displaying the initial WSDL file: http://localhost:8081/TshirtService/TshirtServicePort?wsdl](/mulesoft/current/en-us/apikit/latest/_images/soapui-new-project.png) 2. In SoapUI, request a large t-shirt for John by entering some values into the request envelope: 1. Select **Projects** > **TshirtServicePort?wsdl** > **TshirtServiceSoapBinding** > **OrderTshirt** > **Request 1**. 2. Enter **L** between the `` tags. 3. Enter **John** between the `` tags. 3. Submit the request. The result is the SOAP fault: ```xml soap:Server Operation [OrderTshirt:\soapkit-config] not implemented ``` ## See Also - [Return a Valid SOAP Response After a Fault](https://docs.mulesoft.com/apikit/latest/apikit-4-prevent-fault-task) --- product: APIkit version: 4.x is-latest-version: true --- # Get a SOAP Header > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Retrieve a SOAP header value from an incoming request when you exercise APIs with SoapUI and Anypoint Studio. This walkthrough reads the API key from the `OrderTshirt` envelope and surfaces it through DataWeave in the `OrderTshirt:\soapkit-config` flow. You update Transform Message, rerun the app, and confirm the header appears in the response. ![Request window showing the SOAP envelope header](/mulesoft/current/en-us/apikit/latest/_images/apikit-for-soap-53dc2.png) 1. In SoapUI, modify the `OrderTshirt` request by entering a value for the API key. For example, enter `987654321` between the `` tags. 2. In Studio, in the `OrderTshirt:\soapkit-config` flow, select **Transform Message**. 3. Edit the DataWeave code to get the API key, which is a header property: ```raml %dw 2.0 output application/java ns ns0 http://mulesoft.org/tshirt-service --- { body : { ns0#OrderTshirtResponse: { orderId: "I got a request from " ++ payload.body.ns0#OrderTshirt.name ++ " using the following auth header " ++ (payload.headers["AuthenticationHeader"].ns0#AuthenticationHeader.apiKey default "") } } write "application/xml" } ``` 4. Save and run the project again. 5. In SoapUI, send a request to the `OrderTshirt` endpoint. + The following response appears: ```xml I got a request from John, using the following auth header 987654321 ``` ## See Also - [Set a SOAP Header](https://docs.mulesoft.com/apikit/latest/apikit-4-set-header-task) --- product: APIkit version: 4.x is-latest-version: true --- # Implementing a SOAP Interface > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Use Anypoint Studio and APIkit for SOAP to build a Mule integration that calls a remote SOAP service and exposes it as part of your API surface. The walkthrough uses [tshirt2.wsdl](https://docs.mulesoft.com/apikit/latest/_attachments/tshirt2.wsdl) so you map WSDL operations to flows and connect downstream systems behind the SOAP contract. Confirm if [APIkit for SOAP 1.7.0 or 2.0.0](https://docs.mulesoft.com/apikit/latest/apikit-4-for-soap#choose-the-apikit-for-soap-module-version) matches your Mule runtime and JDK versions before you scaffold your project. Start by [creating an APIkit for SOAP project](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-project-task). ## See Also - [APIkit for REST Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-4-xml-reference) --- product: APIkit version: 4.x is-latest-version: true --- # Installing OData V2 Tooling > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Install the APIkit for OData v2 Studio plugin so you can generate OData APIs from RAML types, edit metadata, and scaffold flows. Add the update site in Anypoint Studio, select the OData extension, and restart when the installer finishes. 1. Select **Help** > **Install New Software** > **Add**. ![Window for installing new software with the \*Add\* button highlighted](/mulesoft/current/en-us/apikit/latest/_images/add-update-site.png) 2. In **Name**, type `APIkit for ODATA v2 Update Site`. 3. In **Location**, type the URL of the site: `https://repository.mulesoft.org/nexus/repository/studio-releases-orbit/org/mule/tooling/apikit-for-odata/`. 4. Select **Add**. ![Window for adding a repository with the \*Add\* button, with the name the location fields highlighted](/mulesoft/current/en-us/apikit/latest/_images/add-repository-odata.png) 5. Select **Anypoint ODATA Plugin** and **Next**. ![Window highlighting the Anypoint OData plugin field and the Next button](/mulesoft/current/en-us/apikit/latest/_images/select-odata-extension.png) 6. Accept the terms and conditions of the product and select **Finish**. 7. Restart Studio to complete the installation. ## See Also - [Building, Implementing, and Testing an OData V2 API](https://docs.mulesoft.com/apikit/latest/creating-an-odatav2-api-with-apikit) --- product: APIkit version: 4.x is-latest-version: true --- # Installing OData V4 Tooling > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Install the APIkit for OData v4 Studio plugin to author CSDL metadata, scaffold OData v4 services, and align tooling with your Mule runtime. Register the update site in Anypoint Studio, install the OData extension, and restart to activate it. 1. Select **Help** > **Install New Software** and then click **Add**. ![Window for installing new software with the \*Add\* button highlighted](/mulesoft/current/en-us/apikit/latest/_images/add-update-site.png) 2. In **Name**, type `APIkit for ODATA v4 Update Site`. 3. In **Location**, type the URL of the site: `https://repository.mulesoft.org/nexus/repository/studio-releases-orbit/org/mule/tooling/apikit-for-odata4/`. 4. Click **Add**. ![Window for adding a repository highlighting the \*Add\* button, with the name and location fields](/mulesoft/current/en-us/apikit/latest/_images/add-repository-odatav4.png) 5. Select **Anypoint ODATA Plugin** and then click **Next**. ![Window highlighting the Anypoint OData plugin field with the Next button](/mulesoft/current/en-us/apikit/latest/_images/select-odatav4-extension.png) 6. Accept the terms and conditions of the product and click **Finish**. 7. Restart Studio to complete the installation. ## See Also - [Building, Implementing, and Testing an OData V4 API](https://docs.mulesoft.com/apikit/latest/creating-an-odatav4-api-with-apikit) --- product: APIkit version: 4.x is-latest-version: true --- # Mapping a GraphQL API to Your Data Sources > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Connect APIkit for GraphQL to your runtime by choosing connector listeners, data fetchers, and data loaders that match how you resolve schema fields. Pick an inbound protocol listener, then attach fetchers for single fields and loaders when you batch per object type to avoid N+1 calls. Sections below describe how each source fits into the GraphQL execution path in Mule. ## Select Sources The module sources vary depending on the implementation of your GraphQL API. APIkit for GraphQL provides two kinds of sources: - Data Fetchers - Data Loaders Your selection depends on your implementation needs. GraphQL is transport-layer agnostic, so you choose the main connector listener depending on the protocol that you want to serve your data. ### Add a Listener The inbound endpoint that triggers the main application flow is the connector listener specific to the client-server protocol of your choice. GraphQL often communicates over HTTP, so APIkit scaffolder generates an HTTP listener by default, but you can choose another source for serving your data over a different protocol. ### Add a Data Fetcher Data fetchers are sources of Mule flows. They fulfill the data of a single-object field in a query result. The combination of the following key parts identify them: - **Object type name**: One of the object types in your schema - **Field name**: One of the fields that are part of the object type You can add data fetchers for every object field defined on the schema, regardless of the field type. If the Mule application does not have a data fetcher configured for a field, the parent type populates the field value. Otherwise, the client-requested data is not fulfilled, resulting in `null`. ### Add a Data Loader As data fetchers, data loaders are also sources of Mule flows. They batch requests related to an object type. Unlike data fetchers, a unique key identifies them: - **Object type name**: One of the object types in your schema Data loaders solve the optimization issue of the N+1 requests when implementing GraphQL APIs. This issue occurs when N additional query statements are executed to fetch data that could have been retrieved when performing the first query. At run time, the module looks for a data fetcher first. If the data fetcher is not available, the module looks for a data loader. Specifically, in case a data fetcher and a data loader exist for the same object type, the module uses the data fetcher as the first choice for resolving a field. This process can impact your API performance because the data fetcher keeps getting invoked N+1 times. ## Choose Operations The module provides a set of operations that are fundamental for the correct design and execution of a GraphQL API implementation: - Route - Serialize - Serialize Batch ### Route a Query The **Route** operation is the entry point of a GraphQL service. It parses, validates, and executes the query by traversing the graph and calling the data fetcher and data loaders required to fulfill the query result. ### Serialize a Data Fetcher The **Serialize** operation occurs at the end of a flow that has a data fetcher source. The same pair of keys that identify the data fetcher (object type name and field name) identifies it. ### Serialize Batch a Data Loader The **Serialize Batch** operation occurs at the end of a flow that has a data loader source. The same key that identifies the data loader (object type name) identifies it. **Serialize** and **Serialize Batch** operations leverage the use of data sense at design time. --- product: APIkit version: 4.x is-latest-version: true --- # OData $expand in APIkit for OData v4 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The OData `$expand` system query option returns related entities inline so clients avoid extra round trips and smaller payloads on metered or high-latency networks. APIkit for OData v4 adds automatic routing for common `$expand` scenarios from module 1.3.0 onward; you configure listeners and optional generic expansion so existing flows can satisfy expanded queries. See the [OASIS URL conventions](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html) for full `$expand` syntax. ## Before You Begin Prerequisites for using `$expand` include: - APIkit for OData Module (version 1.3.0) - A `` implementation for each expandable entity - Support for the `in` filter on the `` flows ## `$expand` Feature Example In this example: - The `Employee` entity has a related `Manager` entity. - The `Employees` entity set is a collection of `Employee` entities. - The `Managers` entity set is a collection of `Manager` entities. - The API location is `https://example.com/api/`. Given this setup, the following requests retrieve employees and their managers: - Use `GET https://example.com/api/Employees` to retrieve a list of employees. - Gather the `Manager` IDs through the `ReferentialConstraint` of their relationship. - Use `GET https://example.com/api/Managers?$filter=ManagerID in (id1, id2, ..., idN)` to retrieve a list of related managers. - Write a small program to merge the lists based on join criteria. If you use the `$expand` feature, the request to retrieve a list of employees with their `Manager` navigation property expanded is `GET https://example.com/api/Employees?$expand=Manager`. ## The `generic expand` Feature Reuse existing flow implementations as a starting point for expanding requests by using the `generic expand` feature, which enables you to focus on the relevant data retrieval operations while the module performs the necessary steps to ensure that the `$expand` fields are complete. An application with the `generic expand` feature enabled works like any other OData Mule application. However, during the flow execution, once the module retrieves information for the main entity set, it performs additional internal requests to gather the information for any `expand` field. You can configure how the software handles errors during the expansion operation: - Fails the request with an error. - Replaces the failed expansion with a `null` value. ## The `generic expand` Operation The `generic expand` feature dispatches additional queries to the application when the original flow completes. Because this is done based on the application `EDM`, you must make extra annotations to add enough context to the module: - The `EntitySet` where the expansion takes place has a `NavigationPropertyBinding` for every expandable `NavigationProperty` of its `Entity`. This is used to select which `` is executed when expanding that property. - Each expandable `NavigationProperty` has a `ReferentialConstraint` attached. Internal requests use `ReferentialConstraint` when matching the value of `Property` against the value of `ReferencedProperty`. ### Flow Execution 1. The main flow is executed and completed resulting in a collection of `entities`. 2. The OData module gathers all the properties that need expansion. 3. For each `NavigationProperty`: 1. Get the `source property` from its `ReferentialConstraint`. 2. Get the `referenced property` from its `ReferentialConstraint`. 3. Get the `destination entity set` from its `NavigationPropertyBinding`. 4. For each of the `entities` get the resolved `source property`. Add these values to a `source property list`. 5. Execute the internal request by invoking the `` for `destination entity set` with `$filter=referenced property` in `(…​source property list)`. ### Error Handling and Error Propagation Error handling for OData v4 applications is local to each flow, whether you use `generic expansion` or not. Error handling code for a given `EntitySet` belongs to the flow implementations for that entity set, both for normal requests and for the internal requests observed during expansion processing. Handling errors during the expansion process is not supported, because the expansion process runs after the execution of the flow finishes. There are two options available for handling errors: - **Ignore errors during expansion:** Errors during generic expansion are ignored. By default, the expansion of collections and single objects are resolved to empty lists and `null` values respectively. - **Propagate errors during expansion:** Errors arise during generic expansion. When an error reaches the OData v4 router, the original request is answered with an error response. You can configure error handling **per-source** on the **Capabilities** tab. ### Limitations - Only the first `ReferentialConstraint` is considered. Navigation properties that use compound keys are not supported. - Expansion is done `field-by-field` instead of `EntitySet-by-EntitySet`. This can cause more internal requests than necessary. - The expanded entities always have an `` implementation. Expansion using `` implementations are not executed due to performance concerns. ## Implementation Guidelines To implement the `generic expansion` feature, you must annotate each source with the types that it can expand. Enabling `$expand` without restrictions enables API clients to write complex queries, which can create performance issues. If you implement `$expand` manually for some relationships, leave these relationships out of the list on the **Expandable Navigation Properties** option. The navigation properties that don’t use the `generic expansion` feature need manual implementations in the flow. ### Implementation Checklist 1. Verify that your CSDL file and Mule application meet the expected requirements: - Every `NavigationProperty` has one `ReferentialConstraint`. - Every `EntitySet` has one `NavigationPropertyBinding` for each `NavigationProperty` of its entity type. - Every `` supports the `in` operator for the `$filter` system query option. 2. For each source for which you enable `generic expand` support: 1. Open the **Capabilities** tab. 2. Edit inline the **Expandable navigation properties** field. 3. Add the name of each navigation property to be expandable by using `generic expand`. 4. Depending on your use case, select **Ignore errors on expand** to avoid errors during the generic expansion and to generate errors on the main flow. 3. Verify that your existing flows support the `$expand` feature. ## See Also - [APIkit for OData v4 Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-odatav4-extension-reference) - [APIkit for OData v4 Error Handling Reference](https://docs.mulesoft.com/apikit/latest/apikit-odatav4-error-handling-reference) --- product: APIkit version: 4.x is-latest-version: true --- # Querying a GraphQL API Implementation > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Run sample HTTP POST queries against a packaged APIkit for GraphQL service that keeps an in-memory blog-style dataset for testing. Download and start [APIkit for GraphQL application example](https://docs.mulesoft.com/apikit/latest/_attachments/apikit-graphql-example.jar) before you run the requests. See [GraphQL over HTTP](https://graphql.org/learn/serving-over-http/) for how POST bodies encode queries and variables. The walkthrough uses this schema: type Post { id: ID! user: User title: String body: String comments: \[Comment\] } type Comment { id: ID! user: User post: Post body: String replies: \[Comment\] } type User { id: ID! name: String username: String email: String phone: String website: String address: Address } type Address { id: ID! street: String city: String zipcode: String latitude: Float longitude: Float } input AddressInput { street: String city: String zipcode: String latitude: Float longitude: Float } input UserInput { name: String username: String email: String phone: String website: String address: AddressInput } type Query { # Looks for a user by ID getUser(id: ID!): User # Looks for a post by ID getPost(id: ID!): Post # Returns the list of all users allUsers: \[User\] # Returns the list of all posts allPosts: \[Post\] } type Mutation { # Creates a new user createUser(user: UserInput!): User! # Creates a new post createPost(userId: ID!, title: String!, body: String!): Post! # Adds a comment to a post postComment(userId: ID!, postId: ID!, body: String!): Comment! # Adds a reply to a comment replyToComment(commentId: ID!, userId: ID!, body: String!): Comment! } ## Request Queries Examples In the following example, the type **Query** defines the list of queries that the service exposes: ... type Query { # Looks for a user by ID getUser(id: ID!): User # Looks for a post by ID getPost(id: ID!): Post # Returns the list of all users allUsers: \[User\] # Returns the list of all posts allPosts: \[Post\] } ... ### Retrieve All Posts This use case makes a simple request for the data of each existing post: #### Make a Query { allPosts { id title body } } #### Trigger a Request curl --location --request POST 'http://localhost:8081/graphql' \\ --header 'Content-Type: application/json' \\ --data-raw '{"query":"{allPosts{id title body}}","variables":{}}' #### Get a Response { "data": { "allPosts": \[ { "id": "88", "title": "tellus nisi eu orci mauris lacinia sapien quis libero", "body": "Praesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio. Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin interdum mauris non ligula pellentesque ultrices. Phasellus id sapien in sapien iaculis congue. Vivamus metus arcu, adipiscing molestie, hendrerit at, vulputate vitae, nisl." }, { "id": "89", "title": "mauris lacinia sapien quis libero", "body": "Sed ante. Vivamus tortor. Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est. Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros." }, ... { "id": "87", "title": "nam tristique", "body": "Proin eu mi. Nulla ac enim. In tempor, turpis nec euismod scelerisque, quam turpis adipiscing lorem, vitae mattis nibh ligula nec sem. Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque." } \] } } ### Retrieve All Users with Data Loader This query requests the data of all users, including their address information. This example uses a Data Loader to fetch the addresses of each user with one request. #### Make a Query { allUsers { name email website address { street city zipcode } } } #### Trigger a Request curl --location --request POST 'http://localhost:8081/graphql' \\ --header 'Content-Type: application/json' \\ --data-raw '{"query":"{allUsers{name email website address{street city zipcode}}}","variables":{}}' #### Get a Response { "data": { "allUsers": \[ { "name": "Rollin Sebley", "email": "rsebley2f@ucsd.edu", "website": "homestead.com", "address": { "street": "432 Myrtle Trail", "city": "Pau", "zipcode": "64029 CEDEX 9" } }, { "name": "Bonny Madgewick", "email": "bmadgewick2g@mozilla.com", "website": "utexas.edu", "address": { "street": "5 David Terrace", "city": "Oelaba", "zipcode": null } }, ... { "name": "Gretal Titmuss", "email": "gtitmuss2e@soup.io", "website": "creativecommons.org", "address": { "street": "3201 Gale Place", "city": "Bolo", "zipcode": "4201" } } \] } } ### Retrieve a Post by ID This query example requests the post data by its ID, including the post comments and the usernames. #### Make a Query { getPost(id: 10) { id user { username } title body comments { user { username } body replies { body } } } } #### Trigger a Request curl --location --request POST 'http://localhost:8081/graphql' \\ --header 'Content-Type: application/json' \\ --data-raw '{"query":"{getPost(id:10){id user{username}title body comments{user{username}body replies{body}}}}","variables":{}}' #### Get a Response { "data": { "getPost": { "id": "10", "user": { "username": "bdearelli" }, "title": "id luctus nec molestie sed justo pellentesque viverra pede ac", "body": "Maecenas tristique, est et tempus semper, est quam pharetra magna, ac consequat metus sapien ut nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris.", "comments": \[ { "user": { "username": "cwalesby1p" }, "body": "Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus vel, pede. Morbi porttitor lorem id ligula. Suspendisse ornare consequat lectus. In est risus, auctor sed, tristique in, tempus sit amet, sem.", "replies": \[\] }, { "user": { "username": "rricci2d" }, "body": "Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo. Pellentesque viverra pede ac diam. Cras pellentesque volutpat dui.", "replies": \[\] } \] } } } ## Request Mutations Examples The **Mutation** type defines the list of mutations that the service enables. ... type Mutation { # Creates a new user createUser(user: UserInput!): User! # Creates a new post createPost(userId: ID!, title: String!, body: String!): Post! # Adds a comment to a post postComment(userId: ID!, postId: ID!, body: String!): Comment! # Adds a reply to a comment replyToComment(commentId: ID!, userId: ID!, body: String!): Comment! } ... ### Create a New Post This example request creates a new post and asks for some information about it. #### Make a Query mutation CreatePost($userId: ID!, $title: String!, $body: String!) { createPost(userId: $userId,title: $title,body: $body) { id user { username } title body comments { body } } } #### Make a Variable { "userId": 42, "title": "GraphQL by example", "body": "Let's talk about GraphQL" } #### Trigger a Request curl --location --request POST 'http://localhost:8081/graphql' \\ --header 'Content-Type: application/json' \\ --data-raw '{"query":"mutation CreatePost($userId:ID!,$title:String!,$body:String!){createPost(userId:$userId,title:$title,body:$body){id user{username}title body comments{body}}}","variables":{"userId":42,"title":"GraphQL by example","body":"Let'\\''s talk about GraphQL"}}' #### Get a Response { "data": { "createPost": { "id": "101", "user": { "username": "tblackmore15" }, "title": "GraphQL by example", "body": "Let's talk about GraphQL", "comments": \[\] } } } ### Add a Comment to the New Post This example posts a comment in a reply to the post created in the previous step. It also asks for the service to return the body of the comment created and the original post with its list of comments to check that the new one is included. #### Make a Query mutation PostComment($userId: ID!, $postId: ID!, $body: String!) { postComment(userId: $userId, postId: $postId, body: $body) { id body post { id title comments { id user { username } body } } } } #### Make a Variable { "userId": 34, "postId": 101, "body": "Nice post! Thanks for sharing! It's just what I was looking for" } #### Trigger a Request curl --location --request POST 'http://localhost:8081/graphql' \\ --header 'Content-Type: application/json' \\ --data-raw '{"query":"mutation PostComment($userId:ID!,$postId:ID!,$body:String!){postComment(userId:$userId,postId:$postId,body:$body){id body post{id title comments{id user{username}body}}}}","variables":{"userId":34,"postId":101,"body":"Nice post! Thanks for sharing! It'\\''s just what I was looking for"}}' #### Get a Response { "data": { "postComment": { "id": "201", "body": "Nice post! Thanks for sharing! It's just what I was looking for", "post": { "id": "101", "title": "GraphQL by example", "comments": \[ { "id": "201", "user": { "username": "ekosex" }, "body": "Nice post! Thanks for sharing! It's just what I was looking for" } \] } } } } ### Reply to the New Comment in the Post This request example creates a reply in response to the comment posted in the previous step. The query asks the service to return all the information of the post in addition to the new reply. #### Make a Query mutation ReplyToComment($commentId: ID!, $userId: ID!, $body: String!) { replyToComment(commentId: $commentId, userId: $userId, body: $body) { id body post { id title comments { id body replies { id user { username } body } } } } } #### Make a Variable { "commentId": 201, "userId": 42, "body": "Thank you!" } #### Trigger a Request curl --location --request POST 'http://localhost:8081/graphql' \\ --header 'Content-Type: application/json' \\ --data-raw '{"query":"mutation ReplyToComment($commentId:ID!,$userId:ID!,$body:String!){replyToComment(commentId:$commentId,userId:$userId,body:$body){id body post{id title comments{id body replies{id user{username}body}}}}}","variables":{"commentId":201,"userId":42,"body":"Thank you!"}}' #### Get a Response { "data": { "replyToComment": { "id": "202", "body": "Thank you!", "post": { "id": "101", "title": "GraphQL by example", "comments": \[ { "id": "201", "body": "Nice post! Thanks for sharing! It's just what I was looking for", "replies": \[ { "id": "202", "user": { "username": "tblackmore15" }, "body": "Thank you!" } \] } \] } } } } --- product: APIkit version: 4.x is-latest-version: true --- # Return a Valid SOAP Response After a Fault > For the full documentation index, see: https://docs.mulesoft.com/llms.txt After you resolve the [SOAP fault](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-fault-task), add Transform Message on the `OrderTshirt:\soapkit-config` flow and author DataWeave that returns a valid payload instead of another fault. Use the correct `namespace` so the response matches the WSDL contract and avoids leading fault codes. Transform Message runs after the WSDL endpoint dispatches into your main flow and any backend calls. 1. In Studio, in the **OrderTshirt:\\soapkit-config** flow, open the Transform Message component. The Transform Message properties window displays the generated DataWeave code. 2. Modify the DataWeave code as follows: ```raml %dw 2.0 output application/java ns ns0 http://mulesoft.org/tshirt-service --- { body: { ns0#OrderTshirtResponse: { orderId: "I got a request from " ++ (payload.body.ns0#OrderTshirt.name default "") } } write "application/xml" } ``` 3. Save and rerun the project. 4. In SoapUI, resubmit the request to generate a SOAP fault. The output changes to a valid response: ```xml I got a request from John ``` ## See Also - [Display a Typed SOAP Fault](https://docs.mulesoft.com/apikit/latest/apikit-4-display-fault-task) --- product: APIkit version: 4.x is-latest-version: true --- # Set a SOAP Header > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Add SOAP headers declared in your WSDL to outbound responses from an APIkit for SOAP application. This walkthrough extends the `OrderTshirt` flow and DataWeave so the response includes header data such as `APIUsageInformation`. Download `tshirt2.wsdl`, complete [prerequisites for Using APIkit for SOAP](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-prerequisites-task), and [create an APIkit for SOAP project](https://docs.mulesoft.com/apikit/latest/apikit-4-soap-project-task) before you begin. 1. In Anypoint Studio, open `tshirt2.wsdl` in `src/main/resources/api` and scroll to the `APIUsageInformation` element, which is the element expected by the contract. 2. On the canvas, select `Transform Message` in the `OrderTshirt:/soapkit-config` flow. The following DataWeave code is available: ```linenums { body : { ns0#OrderTshirtResponse: { orderId: "I got a request from " ++ payload.body.ns0#OrderTshirt.name ++ " using the following auth header " ++ (payload.headers["AuthenticationHeader"].ns0#AuthenticationHeader.apiKey default "") } } write "application/xml" } ``` 3. Add the following `APIUsageInformation` header declaration: ```linenums { body : { ns0#OrderTshirtResponse: { orderId: "I got a request from " ++ payload.body.ns0#OrderTshirt.name ++ " using the following auth header " ++ (payload.headers["AuthenticationHeader"].ns0#AuthenticationHeader.apiKey default "") } } write "application/xml", headers: { (1) header: { ns0#APIUsageInformation: { } } write "application/xml" } } ```
1This DataWeave code adds headers to the output of the Transform Message component.
4. Add the `apiCallsRemaining` header to the `APIUsageInformation` element: { body : { ns0#OrderTshirtResponse: { orderId: "I got a request from " ++ payload.body.ns0#OrderTshirt.name ++ " using the following auth header " ++ (payload.headers\["AuthenticationHeader"\].ns0#AuthenticationHeader.apiKey default "") } } write "application/xml", headers: { header: { ns0#APIUsageInformation: { apiCallsRemaining: 10 **(1)** } } write "application/xml" } }
1Set apiCallsRemaining to 10.
5. Save and run the project again. 6. In SoapUI, execute the `OrderTshirt` request again. The response envelope from APIkit for SOAP is: ```xml 10 I got a request from John, using the following auth header 987654321 ``` ## See Also - [APIkit for SOAP Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-for-soap-module-reference) --- product: APIkit version: 4.x is-latest-version: true --- # Transforming a RAML OData v2 API to a CSDL OData v4 API > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Migrate from APIkit for OData v2 to OData v4 by reusing your RAML entity model: Studio converts `odata.raml` into `odata.csdl.xml` (Common Schema Definition Language) so you can scaffold OData v4 flows from the same types. The new file lands under the `api` folder next to your existing assets. In Studio, right-click your `odata.raml` file and select **Mule** > **Generate CSDL file**. ![\*Generate CSDL file\* option highlighted in the Mule section when right-clicking the OData file in the Package Explorer](/mulesoft/current/en-us/apikit/latest/_images/generate-csdl-file.png) APIkit generates an `odata.csdl.xml` file in the **api** folder. ![\*odata.csdl.xml\* new file highlighted in the \*api\* folder, in the \*Package Explorer\*, and the XML code of the \*odata.csdl.xml\* file after its transformation](/mulesoft/current/en-us/apikit/latest/_images/csdl-xml.png) --- product: APIkit version: 4.x is-latest-version: true --- # Transforming an OData Request to a SQL Query > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The `Transform to SQL Select` operation turns an inbound OData `GET` into an SQL `SELECT` with bound parameters you pass to the Database Connector. Pair it with the connector’s `select` operation to expose relational data through OData v4 without hand-writing SQL for every query. The message payload is the prepared statement text; attributes carry the parameter map the database driver expects. ![\*Transform to SQL select\* element and \*Entity set name\* field highlighted](/mulesoft/current/en-us/apikit/latest/_images/transform-to-sql-transformer.png) The output payload is a prepared statement and the attributes are a map of prepared statement parameters. ![\*Select database\* and \*Input Parameters\* field highlighted](/mulesoft/current/en-us/apikit/latest/_images/add-db-transform-to-sql.png) You can use this operation with the Database connector to expose databases that use OData V4. ![\*Serialized entity\* element and the \*Inbound content\* field highlighted](/mulesoft/current/en-us/apikit/latest/_images/serialize-transform-to-sql.png) APIkit supports these OData request elements: - System query options: - $filter - $select - $search - $orderby - $skip - $top - Single entity - Entity relation - Server-side pagination APIkit does not support: - Parameter Aliases - Built-in Filter Operations: - has - divby - Built-in Query Functions, all except: - contains - startswith - endwith - $apply - $compute - $expand ## Transform to SQL Select Operation in OData V4 The OData protocol defines a series of conventions that enable clients to query identified resources by using URLs. The list of queryable entities, their fields, and the relationships between them are defined in a data model by using HTTP messages. OData shares some similarities with Java database connectivity (JDBC). The `transform-to-sql-select` operation uses such similarities to help you create SQL queries for the resources. The operation results in a message that has a prepared statement with the SQL `select` sentence as the payload and the parameters name and values map as the attributes. ## Implement the Transform to SQL Select Operation by Using APIkit for OData V4 You can implement the transform to SQL operation by using the `` XML element, which has the following parameters:
Parameter nameDescription

Display name

Name of the operation.

Module configuration

Name of the related-module configuration.

Entity set name

Name of the entity set to fetch #[attributes.entitySetName].

Page size

Number that defines the amount of results per page during server-side pagination.

Entity type name

String obtained from the OData request by using #[attributes.odataRequestAttributes], which the entity data model specifies.

Entity type fields

Array of strings obtained from the OData request by using #[attributes.odataRequestAttributes], which provides the list of property fields obtained from the entity type.

Entity type keys

Object obtained from the OData request by using #[attributes.odataRequestAttributes], which provides a map of entity key names and values.

System query options

Parameter obtained from the OData request by using #[attributes.odataRequestAttributes].

Search transformation enabled

If true, this option enables the $search transformation option for a WHERE clause.

Strict search term match

If true, this option enables full term matching for $search. If enabled, terms in the WHERE clause aren’t enclosed between '%'.

SQL identifiers delimiter

Option that delimits identifiers in the generated SQL statement (Options: DOUBLE_QUOTES, BRACKETS, and BACK_TICKS).

Examples:

  • DOUBLE_QUOTES: SELECT "TrackId", "Name" FROM "Tracks"

  • BRACKETS: SELECT [TrackId], [Name] FROM [Tracks]

  • BACK_TICKS: SELECT `TrackId`, `Name` FROM `Tracks`

SQL limit rows

Option that limits the numbers of rows (Options: LIMIT and FETCH_NEXT_ROWS_ONLY).

Examples:

  • LIMIT: SELECT OrderID, ShippedDate, ShipCountry FROM Orders LIMIT :parameter1

  • FETCH_NEXT_ROWS_ONLY: SELECT OrderID, ShippedDate, ShipCountry FROM Orders ORDER BY OrderID ASC OFFSET :parameter2 ROWS FETCH NEXT :parameter1 ROWS ONLY

ORDER BY is automatically included if not present in the request by using the entity key defined in CSDL.

Date Transform Type

Values provided, one of:

  • String: Date or DateTimeOffset parameters pass as string (default value).

  • java.time - LocalDate and LocalDateTime: Date or DateTimeOffset parameters pass as objects of java.time package classes LocalDate and LocalDateTime. This option enables most DB drivers -such as MySQL- to identify and process Date/DateTime parameters and return the correct result.

  • java.time - LocalDate and OffsetDateTime: Date or DateTimeOffset parameters pass as objects of java.time package classes LocalDate and OffsetDateTime. This option enables most DB drivers -such as Oracle- to identify and process Date, Timestamp, and Timestamp with Time Zone parameters and return the correct result.

This operation takes the Date/DateTime values as strings by default. Select one of the java.time object options to output it as a corresponding Date or DateTime object in the java.time package.

## $filter Expressions in OData V4 ​​The OData `$filter` expression uses comparison, logical, arithmetic, and grouping operators. For a list of operators and their meaning, see [the OData4 Specification](https://docs.oasis-open.org/odata/odata/v4.01/cs01/part1-protocol/odata-v4.01-cs01-part1-protocol.html). APIkit does not support the `has` and `divby` operators. ## Expressions Supported by Transform to SQL Select For the filtering expressions that OData supports, see the [specification](https://docs.oasis-open.org/odata/odata/v4.01/cs01/part1-protocol/odata-v4.01-cs01-part1-protocol.html). The `transform-to-sql-select` operation supports the following subset of unary and binary operators, and the following method operators.
OData OperatorSQL Operator

add

+

and

AND

div

/

eq

=

ge

>=

gt

>

le

=<

lt

<

mod

%

mul

*

ne

<>

or

OR

sub

-

not

NOT

-

-

contains

LIKE %value%

startswith

LIKE value%

endswith

LIKE %value

## $search Support This operation builds a `WHERE` clause based on the `$search` expression that the system query option provides. The implementation selects all of the elements that have property values that match the condition. By default, a term matches if the field value contains the term. If the `strict search term match` is set to `true` in the configuration, the `search` operation requires an exact match between the field value and the search term. The `search transformation enabled` and `strict search term match` parameters define the `$search` feature. ## See Also - [APIkit for OData v4 Module Reference](https://docs.mulesoft.com/apikit/latest/apikit-odatav4-extension-reference) - [APIkit for OData v4 Error Handling Reference](https://docs.mulesoft.com/apikit/latest/apikit-odatav4-error-handling-reference) --- product: APIkit version: 4.x is-latest-version: true --- # Using Avro Schemas with APIkit for AsyncAPI > For the full documentation index, see: https://docs.mulesoft.com/llms.txt APIkit for AsyncAPI accepts [Avro](https://avro.apache.org/) in AsyncAPI message definitions so you serialize payloads and validate them in Mule. Declare schemas inline in the spec or reference external Avro documents; Studio can expose message shape during design, and [DataSense](https://docs.mulesoft.com/studio/datasense-concept) assists with Avro-backed message metadata. ## Schema Definitions The Avro spec defines its format by giving the value of `schemaFormat` as `application/vnd.apache.avro`. The Avro spec supports describing the schema inline or referencing an external document that describes the schema in the Avro format: - Inline definition publish: summary: inform details about person operationId: lightMeasured message: schemaFormat: 'application/vnd.apache.avro;version=1.9.0' payload: name: lightMeasured type: record fields: - name: lumens type: int example: 134 - name: sentAt type: string logicalType: timestamp-millis 10 example: 1985-04-12T23:20:50.52Z - Reference to an Avro fragment channels: smartylighting.streetlights.1.0.event.{streetlightId}.monitor: publish: message: schemaFormat: application/vnd.apache.avro;version=1.9.0 payload: $ref: /exchange\_modules/83589b9b-6630-4c28-985d-174ee9172661/lumenschema/1.0.0/lumens.json' The `lumens.json` file provides the specification in the Avro schema. { "type": "record", "name": "lightMeasured", "fields": \[ {"name": "lumens", "type": "int"}, {"name": "sentAt", "type": {"type": "string", "logicalType": "timestamp-millis"}} \] } APIkit for AsyncAPI supports async APIs that have Avro messages defined inline. APIkit for AsyncAPI doesn’t support API specs that refer to Avro fragments. ## Avro Message Encoding and Validation Avro messages are encoded in either binary or text (JSON) format. The specification provides the value of `contentType` OR `defaultContentType`. APIkit for AsyncAPI validates messages encoded in text (JSON) but doesn’t validate binary-encoded messages. --- product: APIkit version: 4.x is-latest-version: true --- # Validating Query Parameters and Headers > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Restrict query parameters and headers on APIkit for REST to the names your RAML or OpenAPI Specification defines. Turn on strict validation in the **APIkit Router** configuration in Studio, or set the matching attributes on `apikit:config` in XML when you need repeatable deployments. 1. In Studio, select **APIkit Router**. ![APIkit router highlighted](/mulesoft/current/en-us/apikit/latest/_images/apikit-router-selection.png) 2. Click **Edit** for your router configuration. ![Edit button highlighted in the APIkit router tab](/mulesoft/current/en-us/apikit/latest/_images/router-config.png) 3. Select **Query Parameters Strict Validations** to restrict the usage of query parameters to the ones defined in your API specification. 4. Select **Headers Strict Validations** to limit the headers to the ones specified in your API specification. ![\*Query parameters Strict Validations\* and \*Headers Strict Validations\* highlighted in the router configuration tab](/mulesoft/current/en-us/apikit/latest/_images/enable-verifications.png) You can also configure **APIkit Router** to validate headers and query parameters by updating the APIkit configuration in XML: ```xml ``` ## Disable Validation of Query Parameters and Headers Disable the validation of query parameters and headers to minimize latency. 1. In Studio, select **APIkit Router**. ![APIkit router highlighted](/mulesoft/current/en-us/apikit/latest/_images/apikit-router-selection.png) 2. Click **Edit** for your router configuration. ![Edit button highlighted in the APIkit router tab](/mulesoft/current/en-us/apikit/latest/_images/router-config.png) 3. Select **Disable Validations**. ![\*Disable validations\* option highlighted in the router configuration tab](/mulesoft/current/en-us/apikit/latest/_images/disable-verifications-apikit.png) You can also disable the validation of query parameters and headers to minimize latency by updating the APIkit configuration in XML: ```xml ``` ## See Also - [Configuring the Response Headers and Status Code](https://docs.mulesoft.com/apikit/latest/configure-headers4-task) - [Configure the Service URI](https://docs.mulesoft.com/apikit/latest/configure-service-uri-task)