Getting started Community Training Tutorials Documentation APIs, AI & Tools
This example retrieves the account details for the specified account ID and returns them in JSON format.
HTTP Listener
Accepts data from HTTP requests.
Get last job completed
Anypoint Connector for Zuora AQuA connects with Zuora and executes a query to retrieve the account details for the specified account ID. Add the Get last job completed operation to return the details of the last completed job.
Transform Message
Outputs the results of the Get last job completed operation in JSON format.
Paste this XML code into Anypoint Studio to experiment with the example flow.
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:mule-zuora-aqua-connector="http://www.mulesoft.org/schema/mule/mule-zuora-aqua-connector" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/mule-zuora-aqua-connector http://www.mulesoft.org/schema/mule/mule-zuora-aqua-connector/current/mule-mule-zuora-aqua-connector.xsd">
<mule-zuora-aqua-connector:config name="Zuora_Connector_Config" doc:name="Zuora Connector Config" doc:id="47cc7910-f0dd-418e-87b0-a3e2e32469f3" >
<mule-zuora-aqua-connector:basic-connection username="${config.username}" password="${config.password}" baseUri="${config.baseUri}"/>
</mule-zuora-aqua-connector:config>
<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" doc:id="2b371bd6-fa5e-4980-bdf4-e3edd7127d51">
<http:listener-connection host="0.0.0.0" port="8081" />
</http:listener-config>
<configuration-properties doc:name="Configuration properties" doc:id="369942a7-1ad3-495d-b926-0efd29f3dfcc" file="application.properties" />
<flow name="aqua-api-get-last-completed-job-demo-flow" doc:id="7396ef55-2a5b-44c9-9b5d-7adc7360cba6" >
<http:listener doc:name="Listener" doc:id="54613a79-d327-41e8-bb3c-75f6f59acae4" config-ref="HTTP_Listener_config" path="/get-last-completed-job"/>
<mule-zuora-aqua-connector:get-v1-batch-query-jobs-partner-project-by-partner-project doc:name="Get last job completed" doc:id="40c9467e-4b06-4781-b9e7-dcf34837d8f7" project="#[payload.project]" config-ref="Zuora_Connector_Config" partner="#[payload.partner]"/>
<ee:transform doc:name="Transform Message" doc:id="5a72b67b-9a1c-4f4e-897c-07fa42a698ef" >
<ee:message >
<ee:set-payload ><![CDATA[%dw 2.0
output application/json
---
{
}]]></ee:set-payload>
</ee:message>
</ee:transform>
</flow>
</mule>