<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alex Martinez on Medium]]></title>
        <description><![CDATA[Stories by Alex Martinez on Medium]]></description>
        <link>https://medium.com/@devalexmartinez?source=rss-64a2de07cea2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YHHDFJeWtOsepf6DG9YR1g.png</url>
            <title>Stories by Alex Martinez on Medium</title>
            <link>https://medium.com/@devalexmartinez?source=rss-64a2de07cea2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 06 Jun 2026 01:10:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@devalexmartinez/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Two AIs, one DataWeave, 23 Advent of Code puzzles]]></title>
            <link>https://medium.com/another-integration-blog/two-ais-one-dataweave-23-advent-of-code-puzzles-1734412beb06?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1734412beb06</guid>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[dataweave]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Tue, 02 Jun 2026 19:07:27 GMT</pubDate>
            <atom:updated>2026-06-02T19:07:27.224Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>TL;DR</strong> — I pitted Claude (Opus 4.7, MAX effort) against CurieTech AI on 23 <a href="https://adventofcode.com/">Advent of Code</a> puzzles, asking each for a DataWeave solution. Highlights:</p><ul><li><strong>Curie solved one more puzzle</strong> (21 vs 20) and needed slightly fewer total attempts (36 vs 37).</li><li><strong>Curie hit fewer timeouts</strong> (5 vs 9) and won more of the notable speed comparisons (3 vs 2) — including a ~30× gap on Day 11 Part 2.</li><li><strong>Claude had the higher first-try success rate</strong> (75% vs 67%).</li><li><strong>Claude’s failure mode was deeper:</strong> when it got stuck, it’d keep producing more attempts indefinitely without recognizing the puzzle was a bad fit for DataWeave. <strong>Curie was the only one that actually called that out.</strong></li></ul><p>Full breakdown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*684vCdMGmQQ9GkGyY6EQaQ.png" /></figure><p>I spent a few days running <a href="https://adventofcode.com/">Advent of Code</a> puzzles through two AIs side by side, asking each one for a DataWeave solution and tracking what came back. I noted the results for every attempt, and saved the actual code or write-ups for some of the more interesting failures. The repo lives <a href="https://github.com/alexandramartinez/adventofcode-2025">here</a>, and this post is a tour of what came out of it.</p><p>The contestants:</p><ul><li><strong>Claude</strong> — Opus 4.7 in Claude Code, MAX effort mode (longer think times, higher cost).</li><li><strong>CurieTech AI</strong> — a MuleSoft-specialized AI, accessed via the <a href="https://www.curietech.ai/blog/the-curietech-ai-mcp-server-in-claude-code-and-codex">curie-dataweave MCP server</a> or directly at <a href="http://platform.curietech.ai/">platform.curietech.ai</a>.</li></ul><p>Same input, same expected output, same DataWeave target. Each puzzle gets two transform.dwl files plus a benchmark/transform.dwl that runs both through dw::util::Timer::time() so the execution times sit next to each other.</p><h3>The setup</h3><p>A quick note on what “took too long” means in the notes, since it comes up a lot: the DataWeave VS Code extension on my machine times out at 50001ms. When a script exceeds that, I marked it as a timeout rather than falling back to the DW CLI to rescue it — the comparison is about how performant each AI’s solution is, and a script that only finishes via CLI doesn’t really answer that question.</p><p>The Playground links in the README run the timing scripts in a browser, but the Playground has its own ~2.5s request timeout, so the slower puzzles have to be benchmarked from VS Code instead.</p><h3>The numbers 📊</h3><p>Across 23 puzzles (Days 1–11 × 2 parts + Day 12 Part 1):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*qBH7mFVvjnsSS9Ut-Jz4eA.png" /></figure><p>Close on most of these — Curie solves one more puzzle and needs slightly fewer total attempts, while Claude has a higher first-try rate. The bigger gaps are on timeouts (Claude hit nearly twice as many) and on the few puzzles where execution time was actually worth comparing, where Curie usually came out ahead.</p><h3>Shared mistakes</h3><p>The two AIs had some surprisingly similar slip-ups.</p><p>On <strong>Day 3 Part 1</strong>, both of them returned a Python script the first time, despite the request being for DataWeave. I had to reply asking for DW specifically. To be fair, Python is probably the most common AoC language overall, so it’s not totally unreasonable as a first guess — it’s just not what I asked for.</p><p>On <strong>Day 5 Part 2</strong>, both AIs ran into the same DataWeave error on their first attempt and both fixed it on the second. That one isn’t a knock against either of them — it’s the kind of failure mode that’s hard to avoid when you can’t actually execute the code as you write it.</p><p>Curie did one variation of this that Claude didn’t: on <strong>Day 8 Part 1</strong>, it returned <strong>Groovy</strong> code and noted that Groovy would be more efficient than DataWeave. That’s true in some sense, but the entire repo is a DataWeave comparison, so I had to ask for the DW version specifically.</p><h3>A Claude moment worth showing</h3><p>On <strong>Day 10 Part 1</strong>, Claude tried to find the DataWeave CLI on my machine with:</p><pre>find / -name &#39;dw&#39; -type f 2&gt;/dev/null | head -5; which dw 2&gt;/dev/null; ls /Applications/ 2&gt;/dev/null | grep -i dataweave</pre><p>When I asked why, Claude said:</p><blockquote>“I was trying to find a way to actually execute the DataWeave script so I could verify it produces the expected output (7 for the sample). Without mvn or a dw CLI available, I can’t run it locally — so I can only reason about correctness statically. Want me to keep hunting for a runner, or just hand off the script for you to run in your IDE?”</blockquote><p>That’s a reasonable instinct: an agent that knows it can’t see the result of its own code is going to look for a way to run it. Claude doesn’t execute the DataWeave it generates, so it can’t iterate against real output, which is part of why its DW-specific syntax or runtime mistakes tend to need a second attempt to catch. Curie, being MuleSoft-specialized, gets fewer of those through on the first try.</p><p>What I do wonder, though, is why Claude didn’t reach for the <strong>curie-dataweave MCP server</strong> that was already installed in this Claude Code session. That server can run DataWeave through Curie, which is exactly the missing capability Claude was searching for. Filesystem-spelunking for dw was the first thing it tried; the MCP tool sitting right there in its toolbox apparently wasn&#39;t.</p><h3>The two puzzles neither AI solved</h3><p>Two puzzles defeated both AIs in DataWeave: <strong>Day 10 Part 2</strong> and <strong>Day 12 Part 1</strong>. These looked less like “we got bored” and more like genuine ceiling-hitting on what DataWeave can do at this input size, and the two AIs handled the wall differently.</p><p>On <strong>Day 10 Part 2</strong>, Curie did something I appreciated: alongside its very first solution, it flagged that the brute-force backtracking would be exponential in the worst case, and offered two paths if the real input blew up — a Groovy ILP solver, or staying in DataWeave with memoization and tighter pruning. ✅ Pre-warning about scaling, before the slow run, is exactly the kind of thing that’s useful from an AI.</p><p>The actual attempts then went:</p><ul><li>Memoized DataWeave attempt: didn’t just time out, but crashed the DataWeave VS Code extension and required a restart.</li><li>Groovy ILP solver: produced the correct answer (19293) in about 6.8s.</li><li>A “faithful DataWeave port” of the Groovy solver: verified on the sample but couldn’t scale.</li><li>A “hardened” DataWeave version with precomputed coefficients: also timed out.</li></ul><p>Curie was honest about the Groovy detour, including the line:</p><blockquote>“the 19293 was not produced by DataWeave.”</blockquote><p>Which I quoted directly in the notes because it’s exactly the kind of self-honesty I want from an AI in this comparison. The puzzle is a Did Not Complete in DataWeave regardless, but at least nobody pretended otherwise.</p><p>Claude hit the same wall over four attempts on the same puzzle — first timed out, second was wrong, third and fourth timed out, and at that point I called it.</p><p><strong>Day 12 Part 1</strong> had a similar shape. Curie’s first two attempts both returned Stack Overflow. Max stack is 256 (DataWeave does have a recursion depth ceiling). On the third attempt it didn&#39;t return code at all — instead, it wrote out a detailed argument that the stack overflow is a symptom rather than the bug, that the real puzzle is a large-scale polyomino packing problem (~750 regions, grids up to 50×50, hundreds of pieces), and that DataWeave wouldn&#39;t solve this regardless of restructuring. It offered to build a Groovy or Python solver instead. That&#39;s a reasonable place to tap out.</p><p>Claude went five attempts deep on the same puzzle (four timeouts, one error) before I called it there too. So the two AIs hit the same wall, but <strong>Curie was the only one who actually recognized it</strong> — Claude would have kept producing more attempts indefinitely if I’d kept asking, without ever stepping back to say “this isn’t the right tool for this puzzle.”</p><h3>The performance gap</h3><p>When the execution times were actually different enough to be worth annotating, Curie won more often than Claude — three notable wins to two. The most lopsided ratio (meaning the gap where one AI was vastly faster than the other, not just a little faster) was <strong>Day 11 Part 2</strong>:</p><ul><li>Claude: ~6 seconds.</li><li>Curie: ~0.2 seconds.</li></ul><p>That’s roughly a 30× difference, and it came from Curie volunteering memoization proactively. Claude’s wins on Day 8 Parts 1 and 2 were much closer ratios (15s vs 24s, 17s vs 26s — only about 1.6×) but in absolute terms still real differences — its solutions there happened to be structurally more efficient.</p><p>So neither AI is universally faster. They reach for different optimizations, and which one matters depends on the puzzle.</p><h3>What I took away</h3><p>A few observations after watching this play out:</p><ol><li><strong>DataWeave specialization shows up in the small mistakes more than the big ones.</strong> Curie made fewer “this won’t compile” mistakes and reached for memoization and decomposition patterns more naturally. Claude solved a wider variety of problems on the first try, but paid a small tax for not being able to see whether its DW actually runs.</li><li><strong>Claude’s failure mode tends to be deeper, not more frequent.</strong> Higher first-try rate, but when it gets stuck (4 attempts on Day 10 P2, 5 on Day 12 P1), it stays stuck longer. Curie tended to give up earlier — sometimes by switching languages, sometimes by writing an honest explanation of why the puzzle isn’t a good fit for DataWeave.</li><li><strong>The honest explanations were genuinely useful.</strong> Curie’s <em>“the 19293 was not produced by DataWeave”</em> and its Day 12 Part 1 write-up about polyomino packing both saved me time, because they correctly identified what was happening rather than producing another attempt that wouldn’t work either.</li><li><strong>DataWeave is a useful harness for this kind of comparison.</strong> Constraints like the 50001ms timeout, the recursion ceiling, and the lack of an easy escape hatch to a faster language mean you find out which AI knows the language specifically, rather than which one is generally good at algorithms.</li></ol><p>That’s a wrap on the comparison. The full table, per-puzzle notes, and saved explanations from each AI are all in the <a href="https://github.com/alexandramartinez/adventofcode-2025">README</a>.</p><p>If you want to keep up with more AI vs AI matchups, I’ve got a <a href="https://www.youtube.com/playlist?list=PLb61lESgk6hi-88p-_FNUezYCHrEF_bjl">YouTube playlist</a> where I’ll be posting more of these head-to-head videos as they go up.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1734412beb06" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/two-ais-one-dataweave-23-advent-of-code-puzzles-1734412beb06">Two AIs, one DataWeave, 23 Advent of Code puzzles</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why You Should Start Using Anypoint Code Builder (Even If You Love Studio)]]></title>
            <link>https://medium.com/another-integration-blog/why-you-should-start-using-anypoint-code-builder-even-if-you-love-studio-371b40df6985?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/371b40df6985</guid>
            <category><![CDATA[anypoint-studio]]></category>
            <category><![CDATA[anypoint-code-builder]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[ide]]></category>
            <category><![CDATA[cursor]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Mon, 30 Jun 2025 20:27:36 GMT</pubDate>
            <atom:updated>2025-07-01T21:44:34.693Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re still building MuleSoft apps in <strong>Anypoint Studio</strong>, you’re definitely not alone. But things are changing fast — and <strong>Anypoint Code Builder (ACB)</strong> is where MuleSoft is clearly headed.</p><p>Whether you’re hesitant, curious, or totally unfamiliar with ACB, now is the perfect time to start playing with it — <em>without having to fully switch yet</em>. In this post, I’ll walk you through what I covered in my latest YouTube video: why I switched, how you can try it safely, and what tools make the transition smoother.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FdlODB4cjXyU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdlODB4cjXyU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FdlODB4cjXyU%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c3f049fc83bfaffb3a6212e06181dff2/href">https://medium.com/media/c3f049fc83bfaffb3a6212e06181dff2/href</a></iframe><blockquote>P.S. You can schedule a call with me to troubleshoot your ACB issues! 👇</blockquote><p><a href="https://calendly.com/mule-alexmartinez/acb-troubleshooting">ACB troubleshooting - Alex Martinez</a></p><h3>🚀 ACB Is More Than Just a New IDE</h3><p>ACB isn’t just “Studio inside VS Code.” It’s an entirely different developer experience — faster, more flexible, and integrated with powerful tools like:</p><ul><li><strong>Cursor AI</strong> (VS Code-based IDE with AI agents)</li><li><strong>GitHub Copilot</strong></li><li><strong>VS Code extensions</strong></li><li><strong>Integrated terminal, source control, theming, and more</strong></li></ul><p>Plus, MuleSoft is now releasing features that are <strong>only available in ACB</strong> — like <strong>Agentforce Topics</strong>.</p><h3>😬 Not Ready to Switch? That’s Okay.</h3><p>I get it. Most of the MuleSoft community isn’t using ACB yet. I ran a poll recently with 130+ votes, and here’s what I found:</p><ul><li>🧠 <strong>Only ~10%</strong> use ACB daily</li><li>🔁 ~27% use it “on and off”</li><li>❌ 39% tried it once or twice</li><li>😬 24% haven’t touched it at all</li></ul><p>So if you’re still in Studio, you’re not falling behind — <em>yet</em>. But if you wait too long, you’ll be catching up when others are already building faster, cleaner, and smarter.</p><h3>🛠️ How to Get Started with ACB (the Right Way)</h3><p>I walk through the setup in detail in the video, but here are the key steps:</p><ol><li>Install <strong>Git</strong></li><li>Download <strong>Visual Studio Code</strong></li><li>Install the <strong>Anypoint Extension Pack</strong> (do <strong>not</strong> install extensions individually!)</li><li>Restart VS Code if needed, and make sure everything is up to date</li><li>Start with something small — like designing an API spec</li></ol><p>👉 If it’s not working, <strong>uninstall all ACB extensions</strong>, quit VS Code completely, and reinstall the extension pack <em>after</em> Git and VS Code are installed.</p><h3>🤖 Using ACB with Cursor AI</h3><p>If you’re already a Cursor AI user (or curious about it), good news: it supports the full ACB experience. In some ways, it’s even smoother than vanilla VS Code, especially when you start combining ACB with intelligent agents, code chat, and auto-generated logic.</p><p>Check out Cursor:</p><p><a href="https://cursor.com">Cursor - The AI Code Editor</a></p><h3>🧪 What Should You Try First?</h3><ul><li><strong>Design an API</strong> with RAML or OAS</li><li>Open an <strong>example project</strong> like “Hello Mule” or a known custom policy</li><li>Compare how the same flow looks in Studio vs ACB</li><li>Experiment with themes, the activity bar, and extensions</li><li>Try out Cursor AI if you’re feeling bold</li></ul><h3>🎯 TL;DR</h3><p>You don’t have to drop Studio today — but <strong>you should start learning ACB now</strong>.</p><p>It’ll help you:</p><ul><li>Get ahead of your team when they’re ready to switch</li><li>Access new MuleSoft features earlier</li><li>Improve dev productivity with modern tooling</li><li>Work smarter with tools like Cursor AI or GitHub Copilot</li><li>Future-proof your career as the MuleSoft platform evolves</li></ul><h3>🙌 Need Help?</h3><p>I’m here!<br>Drop a comment on the video: <a href="https://youtu.be/dlODB4cjXyU">https://youtu.be/dlODB4cjXyU</a><br>Or connect with me on <a href="https://www.linkedin.com/in/alexandra-n-martinez/">LinkedIn</a></p><p>Let me know what specific ACB tutorials you’d like me to make next. I’m happy to keep helping the MuleSoft community grow together. 💙</p><h3>🔗 Related Links:</h3><ul><li>Download Git: <a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a></li><li>Download VS Code: <a href="https://code.visualstudio.com/">https://code.visualstudio.com/</a></li><li>Cursor AI: <a href="https://cursor.com">https://cursor.com</a></li><li>ProstDev: <a href="https://www.prostdev.com">https://www.prostdev.com</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=371b40df6985" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/why-you-should-start-using-anypoint-code-builder-even-if-you-love-studio-371b40df6985">Why You Should Start Using Anypoint Code Builder (Even If You Love Studio)</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New MuleSoft Community Theme for Visual Studio Code!]]></title>
            <link>https://medium.com/another-integration-blog/new-mulesoft-community-theme-for-visual-studio-code-5cb7cb70b1b9?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5cb7cb70b1b9</guid>
            <category><![CDATA[visual-studio-code]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Wed, 01 May 2024 15:14:59 GMT</pubDate>
            <atom:updated>2024-05-01T15:17:51.538Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello! I just wanted to take a moment to share this news with you all. I created a theme for Visual Studio Code that is inspired by the MuleSoft colors.</p><p>Please note that it is NOT an official theme. It’s just something I created on my own. I based most colors on the Anypoint Platform or other official sites under the <a href="http://mulesoft.com/">MuleSoft.com</a> domain. However, that doesn’t mean they’re the official colors :-) I just wanted to mention that.</p><p>That said…The theme is already published in the VSCode Marketplace. You can download it and start using it right away!</p><p><a href="https://marketplace.visualstudio.com/items?itemName=ProstDev.mulesoft-community-theme">MuleSoft Community Theme - Visual Studio Marketplace</a></p><h3>Contribute</h3><p>You can start contributing via GitHub whenever you see something is missing or <em>just not right</em>. You can either create a Pull Request directly in the <a href="https://github.com/ProstDev/mulesoft-community-theme">GitHub repository</a> or <a href="https://github.com/ProstDev/mulesoft-community-theme/issues">raise an issue</a> for me to take a look.</p><h3>Overview</h3><p>Ok, enough chatting. Let’s just see some screenshots!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xK6aKSoq-LOCMs1WouMV5Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N0CmdPgNqAqm-LTiKEr7zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ehl9577WAFxESL7LRLklRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XqfHL_0OghKK9mgoit60_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-6YWD571i780NhTxDiVEA.png" /></figure><p>So what do you think??</p><p>You can find more information like the color palette and the full list of sections that were customized for this theme in the <a href="https://marketplace.visualstudio.com/items?itemName=ProstDev.mulesoft-community-theme">Marketplace</a> site.</p><p>I am always open to feedback. This was my first version of what I envisioned for this theme. And as you can see, I am not a designer! So, a lot of things can be improved for sure :)</p><p>Don’t forget to leave a review in Marketplace so I can improve it.</p><p>Oh! And this is just the light theme for now. I hope to create a dark theme in the future :D</p><p>Thank you!!</p><p>Alex</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cb7cb70b1b9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/new-mulesoft-community-theme-for-visual-studio-code-5cb7cb70b1b9">New MuleSoft Community Theme for Visual Studio Code!</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#Codetober 2023 ~ 31 MuleSoft-related videos under 10min each!]]></title>
            <link>https://medium.com/another-integration-blog/codetober-2023-31-mulesoft-related-videos-under-10min-each-b380d7594d46?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b380d7594d46</guid>
            <category><![CDATA[anypoint-platform]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[anypoint-code-builder]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Thu, 09 Nov 2023 21:45:37 GMT</pubDate>
            <atom:updated>2023-11-09T21:45:37.040Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_MyjHFfXi_y5_6PJVOIVzA.png" /></figure><p>Every year since 2021, I’ve been doing these 31 videos called #codetober!</p><blockquote>See <a href="https://www.youtube.com/playlist?list=PLb61lESgk6hhKwJpM565UJVS5CxVZ4D1u">here</a> the full list of videos for 2021–2023.</blockquote><p>This year, the videos have been edited for your better digestion and are (almost all) less than 10 minutes each.</p><p>Please comment on our videos to suggest future content or ask any questions about a specific topic.</p><p>Happy codetober!!</p><blockquote><em>💡 ​Find this year’s GitHub repository here: </em><a href="https://github.com/ProstDev/codetober23"><em>ProstDev/codetober23</em></a></blockquote><h3>Videos</h3><p><strong>Day 1</strong>: How to scaffold Mule flows from a published API spec in Anypoint Studio</p><p>Once you have your API specification and you have published it to Anypoint Exchange, you can now import this directly from Anypoint Studio to automatically scaffold the necessary Mule flows and error handling in a new Mule project.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPHfN7Ah9mpc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPHfN7Ah9mpc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPHfN7Ah9mpc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8dc46fed271fc5bdbddd8976db5a6280/href">https://medium.com/media/8dc46fed271fc5bdbddd8976db5a6280/href</a></iframe><p><strong>Day 2</strong>: How to scaffold Mule flows from a published API spec in Anypoint Code Builder</p><p>Once you have your API specification and you have published it to Anypoint Exchange, you can now import this directly from Anypoint Code Builder (currently in BETA version) to automatically scaffold the necessary Mule flows and error handling in a new Mule project.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F59PQL1FfM_g%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D59PQL1FfM_g&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F59PQL1FfM_g%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e15f1288080a2625bea6819ab03eb747/href">https://medium.com/media/e15f1288080a2625bea6819ab03eb747/href</a></iframe><p><strong>Day 3</strong>: How to RE-scaffold Mule flows from an Exchange API spec in Anypoint Studio</p><p>After doing some changes to the API Specification from Design Center, the API spec is published to Exchange with a new version. After that happens, you can download the new version to your Anypoint Studio and re-scaffold the Mule flows to have an up-to-date API implementation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FWl9D72kBjso&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWl9D72kBjso&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FWl9D72kBjso%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/16af64c28263e96f50aedcc679a68a49/href">https://medium.com/media/16af64c28263e96f50aedcc679a68a49/href</a></iframe><p><strong>Day 4</strong>: Use MuleSoft’s visual API Designer to create a To-Do API specification</p><p>Did you know MuleSoft provides this neat Graphical User Interface (GUI) where you can configure your own API specification with just clicks? That’s right, you don’t have to learn RAML or OAS anymore. You can just follow this visual tool to create them and it gives you the code you need in whichever format you need it!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8TqtcafHNT8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8TqtcafHNT8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F8TqtcafHNT8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/36ad3f570bedbdac9e9f2c244ca47ee0/href">https://medium.com/media/36ad3f570bedbdac9e9f2c244ca47ee0/href</a></iframe><p><strong>Day 5</strong>: DataWeave 2.5 module features: toString, concatWith, version</p><p>There was a new DataWeave version released this past October 3 (2023). Let’s check out what’s new with these three functions: toString, concatWith, and version.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCY2WeiTAgvk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCY2WeiTAgvk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCY2WeiTAgvk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a07069bc507ab5cabfbae549b623df6/href">https://medium.com/media/2a07069bc507ab5cabfbae549b623df6/href</a></iframe><p><strong>Day 6</strong>: Exploring the Thunder Client Extension for Visual Studio Code</p><p>I was using the Postman extension for VS Code but I kinda liked this one better 👻 it’s more lightweight even though it doesn’t offer all the great options Postman does. But it’s great for quick testing!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FoIN0tLa8zQ4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoIN0tLa8zQ4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FoIN0tLa8zQ4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6bc8cf12a60d6c81a4a7554676382f7f/href">https://medium.com/media/6bc8cf12a60d6c81a4a7554676382f7f/href</a></iframe><p><strong>Day 7</strong>: How to create custom user snippets in Anypoint Code Builder (VS Code)</p><p>User Snippets are important to keep handy your most used components in ACB!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpVJuvrf1_tM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpVJuvrf1_tM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpVJuvrf1_tM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8640c8aef1461d7ca437ab9f2d766de0/href">https://medium.com/media/8640c8aef1461d7ca437ab9f2d766de0/href</a></iframe><p><strong>Day 8</strong>: Exploring the GitHub Actions Extension for Visual Studio Code</p><p>This is a good add-on for VS Code if you’re using a lot of GitHub Actions for your projects!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCOXOGBnmsSI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCOXOGBnmsSI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCOXOGBnmsSI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/00b8cf4fd45dca9ae9cebe9e64991d4c/href">https://medium.com/media/00b8cf4fd45dca9ae9cebe9e64991d4c/href</a></iframe><p><strong>Day 9</strong>: How to deploy to CloudHub 2.0 with the Mule Maven Plugin &amp; Connected App</p><p>It took me a while to get this going!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fr3V81EgFdGY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dr3V81EgFdGY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fr3V81EgFdGY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3dfd949c94be0cfec5c8e3a53ddfc506/href">https://medium.com/media/3dfd949c94be0cfec5c8e3a53ddfc506/href</a></iframe><p><strong>Day 10</strong>: How to use DataWeave 2.5 with the BETA extension in Visual Studio Code</p><p>DATAWEAVE 2.5 HAS BEEN RELEASED FOR VSCODE AAAAAHHH 🤩</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fx_g-v6gJnbY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dx_g-v6gJnbY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fx_g-v6gJnbY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d2a6ca03eb1340afee32f000e6da11a/href">https://medium.com/media/2d2a6ca03eb1340afee32f000e6da11a/href</a></iframe><p><strong>Day 11</strong>: 8 examples to import modules/functions in DataWeave &amp; how to use aliases</p><p>Using the `<em>import</em>` keyword, you can just import a module and then call the function like `<em>Module::function()</em>`, or you can use the `<em>from</em>` keyword to specify the functions to import.</p><p>For example, `<em>import * from Module</em>` or `<em>import function from Module</em>`.</p><p>Then, we have other interesting approaches like using `<em>as</em>` to create aliases for the modules or the functions.</p><p>Like, `<em>import Module as Mod</em>` or `<em>import function as f1 from Module</em>`</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUzz2_yO-DJQ&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUzz2_yO-DJQ&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FUzz2_yO-DJQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/672af198c5a73c3fdefe23eb9bd5f6c3/href">https://medium.com/media/672af198c5a73c3fdefe23eb9bd5f6c3/href</a></iframe><p><strong>Day 12</strong>: Help us get DataWeave into Exercism for programming challenges/exercises</p><p>Exercism provides coding exercises for you to learn a variety of programming languages. DataWeave is currently NOT one of them though. However, not all heroes wear caps! Join our community member Clayton Flesher in this quest to get DW on this platform!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FsvRDoS1UbOY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DsvRDoS1UbOY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FsvRDoS1UbOY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d9fbd8e2d241b8dd054599e5b64b7d3/href">https://medium.com/media/4d9fbd8e2d241b8dd054599e5b64b7d3/href</a></iframe><p><strong>Day 13</strong>: How to run several Mule applications in Anypoint Studio at the same time</p><p>To run more than 1 Mule app at the same time in Studio, first, you have to make sure your HTTP listeners are running in different ports. Otherwise, the applications won’t run at the same time because the port is already in use in your local.</p><p>After you change the ports, you can use the Run Configurations option and create a new Configuration to run all the apps at the same time. Make sure you use different ports locally but you still use the dedicated ports when you deploy to CloudHub (i.e., leave ports 8081 for CH but change them for local).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F45XW5Gu4Pgo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D45XW5Gu4Pgo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F45XW5Gu4Pgo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cdc1bf54b7aefa8b436b2739f31b3648/href">https://medium.com/media/cdc1bf54b7aefa8b436b2739f31b3648/href</a></iframe><p><strong>Day 14</strong>: Best practices in Mule apps: global elements &amp; properties files per env</p><p>After creating our three Mule apps (from the previous video), we now have to set up the best practices so we can set up the different configurations for the dev and local environments to make our lives easier in the future.</p><p>1️⃣ We start by setting up the global.xml Mule Configuration File to save all the Global Element Configurations so we don’t have to be looking for them in other XML files. It may not seem like a big deal for a small project like this, but once you have more files and flows, it can become a nightmare.</p><p>2️⃣ After that, we set up different properties files per environment — one for dev (what we’ll deploy in CloudHub) and one for local. Don’t forget to set up the <em>${env}.properties</em> or <em>${env}.yaml</em> configuration for the properties files and the `<em>env</em>` global property set to `<em>local</em>`. And ta-da! We are ready to get started on the next step: calling each layer separately.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FvccXdAiup3o%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvccXdAiup3o&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FvccXdAiup3o%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9fb5a0ccc5bf916949003e54b4f1386f/href">https://medium.com/media/9fb5a0ccc5bf916949003e54b4f1386f/href</a></iframe><p><strong>Day 15</strong>: Setting up HTTP Requests for Experience, Process, &amp; System layers in Mule 4</p><p>In the previous two videos, we set up three very basic Mule projects to represent the 3 API-Led Connectivity layers: Experience, Process, and System.</p><p>If you’re not familiar with this approach, it means that the client application is gonna call the Experience-layer API, which is then gonna call the Process-layer API, which is finally gonna call the System-layer API.</p><p>Client ➡️ Experience API ➡️ Process API ➡️ System API ➡️ Server</p><p>It has its reasons why, but we’re not focusing on that now. We just want to set up the HTTP requests from E (or X) to P and from P to S. Along with that, we are making sure our local and dev properties are up to date.</p><p>The dev properties are always running in port 8081 while the local properties have to be split in ports 8081, 8082, and 8083 (can be other ports, these are just used as an example).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FvjuS_o12FMA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvjuS_o12FMA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FvjuS_o12FMA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d7d03d917c0cdd8bbd811dc263f3060/href">https://medium.com/media/6d7d03d917c0cdd8bbd811dc263f3060/href</a></iframe><p><strong>Day 16</strong>: How to debug several Mule applications in Anypoint Studio at the same time</p><p>In case you haven’t debugged Mule apps before, or in case you haven’t debugged more than one Mule app at the same time before, this video is perfect for you!</p><p>In previous videos, we had set up the Run Configurations to be able to run the three Mule apps that we’ve been using in these examples (Experience, Process, and System API layers from the API-Led Connectivity approach).</p><p>This time you can reutilize the same configuration but to DEBUG instead of just RUN. Apart from that, we encountered an error pretty quickly telling us that the HTTP response had resulted in a TIMEOUT because we halted the apps while debugging.</p><p>We learned how to set up some properties to increase the HTTP response timeout locally so that it lets us debug in peace 😌</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKwlV7BC8lOY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKwlV7BC8lOY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKwlV7BC8lOY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ea53e4b9bc1a2313c99569aace26f3d/href">https://medium.com/media/9ea53e4b9bc1a2313c99569aace26f3d/href</a></iframe><p><strong>Day 17</strong>: Deploy Experience, Process, &amp; System API layers to CloudHub 2.0 from Studio</p><p>After setting up our three Mule apps for the Experience, Process, and System APIs (from API-Led connectivity), we are finally ready to deploy them to CloudHub 2.0 (in Runtime Manager) and finish setting up the properties for the dev environment ✨</p><p>We learned that the port for HTTP in CloudHub 2.0 has to be 80 and the port for HTTPS has to be 443! This works differently from CloudHub 1.0, where you can use port 8081. Interesting fact that I did not know about until now 🥹</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fs9Vd31XAPRM&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Ds9Vd31XAPRM&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2Fs9Vd31XAPRM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b66b2c49025f65bff8a28ef564873d65/href">https://medium.com/media/b66b2c49025f65bff8a28ef564873d65/href</a></iframe><p><strong>Day 18</strong>: Designing the American Flights API Spec in Anypoint Code Builder (ACB)</p><p>After Anypoint Code Builder (ACB) has been GA’d, let’s go ahead and try out the different tutorials the team has created for us to get familiar with the tool.</p><p>In this video, we’ll use ACB to create an API specification widely used in the MuleSoft training called the American Flights API. We’ll learn how to reuse API fragments from Anypoint Exchange locally, how to use the data types from Exchange, and how to see it all reflected in the API console from ACB.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPlmry5Usq5U%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPlmry5Usq5U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPlmry5Usq5U%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a32d29ee5d86c3d8fea27ad1ff5d94f/href">https://medium.com/media/7a32d29ee5d86c3d8fea27ad1ff5d94f/href</a></iframe><p><strong>Day 19</strong>: Testing, syncing, and publishing an API in Anypoint Code Builder (ACB)</p><p>In the previous video, we designed an API Specification for the American Flights API.</p><p>In this video, let’s first test that our API is working as we would expect using the mocking service.</p><p>Then, we’ll sync the specification to Design Center so that we can access this same information from Anypoint Platform.</p><p>Finally, let’s publish this API to Anypoint Exchange so other people can consume it. All from Anypoint Code Builder!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FmLm34YPn180%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DmLm34YPn180&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FmLm34YPn180%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d3fe51666ba8d608d0f06e54ce5fe791/href">https://medium.com/media/d3fe51666ba8d608d0f06e54ce5fe791/href</a></iframe><p><strong>Day 20</strong>: Integrating American Flights Processes in Anypoint Code Builder (ACB)</p><p>Let’s learn how to develop an integration in Anypoint Code Builder (ACB) by following the previous examples of the American Flights API.</p><p>In this video, we’ll create a simple Mule application with an HTTP Listener that will output a string payload. We will learn how to run this application locally to make sure it works properly.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FhAHosASL-cA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DhAHosASL-cA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhAHosASL-cA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d94dce3431ec146363ce86389610298/href">https://medium.com/media/9d94dce3431ec146363ce86389610298/href</a></iframe><p><strong>Day 21</strong>: Connecting to a Database from the Mule app in Anypoint Code Builder (ACB)</p><p>We want to connect to the American Flights database so we can pull the details of the flights for our American Flights API.</p><p>In this video, we’ll learn how to set up the database configuration in the pom.xml and set it up in the Mule Configuration file. After that, we’ll test it to see if it works as-is or if we need some sort of transformation 👀</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPFrBliD2W7I%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPFrBliD2W7I&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPFrBliD2W7I%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/40331a3b271d32de01afa9b6ea2fc206/href">https://medium.com/media/40331a3b271d32de01afa9b6ea2fc206/href</a></iframe><p><strong>Day 22</strong>: Transforming Flight Data with DataWeave in Anypoint Code Builder (ACB)</p><p>We were able to connect to the Database in the previous video, but we weren’t able to get a successful response just by doing this.</p><p>In this video, we explore the Transform Message component in Anypoint Code Builder so we can correctly transform the data we receive from the database into the JSON structure we had defined in our API Specification.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F62w45KzekXM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D62w45KzekXM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F62w45KzekXM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/06dfd56085ced90f8345ebb895c37236/href">https://medium.com/media/06dfd56085ced90f8345ebb895c37236/href</a></iframe><p><strong>Day 23</strong>: Implementing the American Flights API Spec in Anypoint Code Builder (ACB)</p><p>In this series of videos, we started by designing the American Flights API and then we developed some code to get the data from the database.</p><p>In this video, we are putting it all together. We can scaffold the flows from the API specification that was published to Exchange and then call the MySQL flow with a Flow Reference.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUxDPOjUZUCg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUxDPOjUZUCg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUxDPOjUZUCg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5922a460ad68ed47fed106076b0c8b21/href">https://medium.com/media/5922a460ad68ed47fed106076b0c8b21/href</a></iframe><p><strong>Day 24</strong>: Debugging the American Flights App in Anypoint Code Builder (ACB)</p><p>It’s very important to learn how to debug your code in Anypoint Code Builder (ACB) because it will give you more insights into what is happening in the flow of your application.</p><p>In this video, we’ll learn how to start a debugging session to test the app, how to add a watch expression to take a look at the payload’s media type, how to add, disable, or enable breakpoints, and how to stop debugging.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDZGkrtxTyNY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDZGkrtxTyNY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FDZGkrtxTyNY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6956856b29e8878123d0de38370dcf29/href">https://medium.com/media/6956856b29e8878123d0de38370dcf29/href</a></iframe><p><strong>Day 25</strong>: Implement &amp; test a GraphQL API in Anypoint Code Builder (ACB)</p><p>Even if you’re not familiar with GraphQL, you can generate/scaffold a whole Mule project based on a GraphQL schema that we publish in Exchange. After publishing the schema in Exchange, we can implement the API locally using Anypoint Code Builder in minutes!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fla0GM2KUbio%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dla0GM2KUbio&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fla0GM2KUbio%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e5d317bc46e54da16ea2d000a7246fdc/href">https://medium.com/media/e5d317bc46e54da16ea2d000a7246fdc/href</a></iframe><p><strong>Day 26</strong>: Using the Transform Message component (DataWeave) in Anypoint Code Builder</p><p>We know how to define metadata in Anypoint Studio to see a preview of our DataWeave code to transform the data using the Transform Message component. But how to do this in Anypoint Code Builder (ACB)?</p><p>In this video, we’ll use a Transform Message component in a Mule project to transform an input into an expected output according to our “business requirements.” Then, we learn how to create the payload.json input and how to run the script according to this JSON file. You can also use the Enable Autopreview button to get the same functionality from the DataWeave Playground!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fv7Qv3s_RDK0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dv7Qv3s_RDK0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fv7Qv3s_RDK0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5a6e5ea0592fe8180486dd1a8d8f341/href">https://medium.com/media/b5a6e5ea0592fe8180486dd1a8d8f341/href</a></iframe><p><strong>Day 27</strong>: Using branches in Design Center &amp; Anypoint Code Builder for API specs</p><p>Have you ever had to work on a single API specification but divide the work between more than 2 people? Isn’t it messy? You can use the branching system (or version control system) that Design Center provides for this type of scenario.</p><p>Whenever you work on a change to the API spec, you can create a new branch, make the changes, and then review the changes to merge to the master/main branch. You can do this same thing from Anypoint Code Builder (ACB) using the Source Control plugin from Visual Studio Code (VS Code). Here I’ll tell you how!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FimPeV-JJrmc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DimPeV-JJrmc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FimPeV-JJrmc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/dac9dfbafafcad45425220c2123f2269/href">https://medium.com/media/dac9dfbafafcad45425220c2123f2269/href</a></iframe><p><strong>Day 28</strong>: Testing Mule flows with the MUnit recorder in Anypoint Studio</p><p>In MuleSoft, we use MUnit tests to make sure we create unit tests for our Mule flows and Mule projects. There is this tool called the MUnit recorder that runs your Mule application locally and records how you interact with it in order to create some tests.</p><p>In this video, we create a simple MUnit test to assert the expected output from what we send into the app. The app uses a Choice router and Set Payloads to see the different routes.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FF8jeqW93x2E%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DF8jeqW93x2E&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FF8jeqW93x2E%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fddf0d6b71cac06200ec74076a88a80/href">https://medium.com/media/0fddf0d6b71cac06200ec74076a88a80/href</a></iframe><p><strong>Day 29</strong>: Enable Multi-Factor Authentication in MuleSoft with the Salesforce App</p><p>When you sign in to Anypoint Platform, you can select to enable Multi-Factor Authentication (MFA) for your account to protect it from any dangers on the web 👀</p><p>In this video, we’ll learn how to enable MFA for Anypoint Platform using the Salesforce Authenticator app (available for iOS and Android devices).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fu13IzP7YiEg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Du13IzP7YiEg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fu13IzP7YiEg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/66117953b938ed3e103e6672a767af20/href">https://medium.com/media/66117953b938ed3e103e6672a767af20/href</a></iframe><p><strong>Day 30</strong>: Differences between the DataWeave extension &amp; Anypoint Code Builder</p><p>One thing is the DataWeave extension for Visual Studio Code which was mostly created for you to create new DataWeave libraries but can also be used instead of the online DataWeave Playground.</p><p>Another thing is Anypoint Code Builder (ACB), where you create Mule projects and can use DataWeave inside one of these projects.</p><p>You can use both of these tools independently or together. But what’s the difference then? In summary, you will have more DataWeave functionality if you install the DW extension and use it with ACB. You can also use ACB without having the DW extension, but there will be less functionality available for you. That’s why I’d recommend you to use both.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7fTitIdCT3s%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7fTitIdCT3s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7fTitIdCT3s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cca6f538783a48b809da16ba2d8b535/href">https://medium.com/media/3cca6f538783a48b809da16ba2d8b535/href</a></iframe><p><strong>Day 31</strong>: Export a Mule project as a deployable JAR file in Anypoint Code Builder</p><p>A lot of times it’s just easier to export a deployable JAR file from your Mule project to upload it directly in Runtime Manager instead of using the IDE (whether it’s Studio or ACB) to deploy it from there.</p><p>Whichever it’s your preferred use case and method of deploying a Mule app into CloudHub or any other runtime plane, here is how you can export the Mule application into a .jar file from Anypoint Code Builder.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKOTG9AHS13A%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKOTG9AHS13A&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKOTG9AHS13A%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/92e932af89e5bf8be449327c684006fb/href">https://medium.com/media/92e932af89e5bf8be449327c684006fb/href</a></iframe><p>You can subscribe to my <a href="https://www.youtube.com/prostdev">YouTube channel</a> to get notifications as soon as I publish new videos!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b380d7594d46" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/codetober-2023-31-mulesoft-related-videos-under-10min-each-b380d7594d46">#Codetober 2023 ~ 31 MuleSoft-related videos under 10min each!</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MuleSoft from Start: A Beginner’s Guide — Session 7: Deploy the Mule App to CloudHub]]></title>
            <link>https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-7-deploy-the-mule-app-to-cloudhub-363fc1239b3?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/363fc1239b3</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Thu, 27 Jul 2023 21:30:53 GMT</pubDate>
            <atom:updated>2023-07-27T21:30:53.135Z</atom:updated>
            <content:encoded><![CDATA[<h3>MuleSoft from Start: A Beginner’s Guide — Session 7: Deploy the Mule App to CloudHub</h3><p>In the <a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-6-debug-the-mule-app-in-anypoint-studio-ab7602d5b788">last session</a>, we reviewed how to implement the <strong>articles</strong> logic, created a Postman collection with its local+dev environments, and learned how to debug our Mule application.</p><p>In this week’s session, we confirmed the API works locally, so we deployed it to CloudHub (located in Runtime Manager) to test it in the dev environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZrUrs-Z_DLCkojW3PNLumw.png" /></figure><blockquote><strong>Note: </strong>The links and notes from the session have been added to the <a href="https://github.com/alexandramartinez/mulesoft-from-start">GitHub repository</a> for you to follow through with what I’m doing in the video. You can find both recordings (the complete and the shorter one) at the end of the post.</blockquote><h3>Homework from the last session</h3><p>In the last session, we had started our Postman collection and we did the <strong>articles</strong> requests. Your homework was to finish creating the other requests to match our API specification. You should now have something similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*bVgPq8uNaAEeTslCLHIgXQ.png" /></figure><p>You can also just import the Postman collection from the repo <a href="https://github.com/alexandramartinez/mulesoft-from-start/tree/main/postman">here</a>.</p><h3>Testing locally</h3><p>You can download <a href="https://github.com/alexandramartinez/mulesoft-from-start/tree/main/sessions/7/in-session-mule-project">this Mule project</a> if you want to follow along with what we did in this session. In summary, the API already works for the <strong>articles</strong> and <strong>categories</strong> resources. We can run this application locally and use our Postman collection with the <strong>local</strong> environment to verify it works.</p><p>Once we have verified we do have the functionality we need, we can move on to deploying this app to CloudHub.</p><h3>Deploying to CloudHub</h3><p>We’re going to deploy this application manually from Anypoint Studio. For this, you have to right-click on your project and select <strong>Anypoint Platform</strong> &gt; <strong>Deploy to CloudHub</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*JfbNz3EZTJjLw-vN6_5png.png" /></figure><p>If you haven’t signed in to your Anypoint Platform account, it will ask you to sign in at this point.</p><p>If you experience some issues at this point, you can also go to <strong>Anypoint Studio</strong> &gt; <strong>Settings</strong> and navigate to <strong>Anypoint Studio </strong>&gt; <strong>Authentication</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*3zIrt1nvAhRNIdlJdbXzAA.png" /></figure><p>You can remove and re-add your Anypoint Platform credentials and try to deploy again. Any issues should be fixed with this.</p><p>Make sure you have selected the latest runtime version and check the <strong>Object Store v2</strong> checkbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*kRI6qaFgUudJY8lKj3sWuw.png" /></figure><p>Because we have different properties per environment (local and dev) in our Mule application, we have to make sure our environment property is correctly updated. In our case, we have to set the <strong>env</strong> property to <strong>dev</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*o1hEl2gsFgLTARelHvUWFw.png" /></figure><p>After confirming those changes, you can deploy your application.</p><p>You can confirm that your application is being deployed in Runtime Manager. Once it’s running, you can retrieve the Public Endpoint to replace the URL in your Postman environment to test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*elQzxxt_kkV0FGw3KE0aGQ.png" /></figure><p>You can also find this CloudHub URL from the Dashboard view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*b6XFr-zmdRXeXLBOEsSsOg.png" /></figure><p>Once you have copied the URL, you can go to Postman and replace it in the dev environment. Make sure you add <strong>/api</strong> at the end of the URL. For example <a href="https://maxines-blog-p9b1jf.5sc6y6-1.usa-e2.cloudhub.io/api">https://maxines-blog-p9b1jf.5sc6y6-1.usa-e2.cloudhub.io/api</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6mBgopIZanO6TwLs04zJw.png" /></figure><p>Now you just have to switch the environment from local to dev in Postman and you’ll be able to test the requests in CloudHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9lJoC5P2T_2y_CVx3A5p-g.png" /></figure><h3>Recordings</h3><p>Finally, here are the two recordings you can find about this session.</p><ul><li>The complete video on <a href="https://www.twitch.tv/devalexmartinez">Twitch</a></li><li>The edited/clean/shorter version on <a href="https://www.youtube.com/prostdev">YouTube</a></li></ul><p>Here you can find the shorter version from YouTube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FSUwnqoq8ZbI&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSUwnqoq8ZbI&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0cf838cc8530787495529765d4b41cbd/href">https://medium.com/media/0cf838cc8530787495529765d4b41cbd/href</a></iframe><p>And here you can find the complete video from Twitch (note that there are two videos this time because my internet was acting up so the live stream was split in two 🥹):</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.twitch.tv%2F%3Fvideo%3D1882370337%26muted%3Dtrue%26autoplay%3Dfalse%26parent%3Dcdn.embedly.com&amp;display_name=Twitch.tv&amp;url=https%3A%2F%2Fwww.twitch.tv%2Fvideos%2F1882370337&amp;image=https%3A%2F%2Fstatic-cdn.jtvnw.net%2Fcf_vods%2Fd2nvs31859zcd8%2Fab69a3b96a0688541f76_devalexmartinez_23170013781_9784759600%2Fthumb%2Fcustom-ca20da2c-fea8-4170-ab75-cbc34e4bbc62-640x360.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=twitch" width="620" height="351" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5b3004abae18f330b684aaef629f94a/href">https://medium.com/media/a5b3004abae18f330b684aaef629f94a/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.twitch.tv%2F%3Fvideo%3D1882370336%26muted%3Dtrue%26autoplay%3Dfalse%26parent%3Dcdn.embedly.com&amp;display_name=Twitch.tv&amp;url=https%3A%2F%2Fwww.twitch.tv%2Fvideos%2F1882370336&amp;image=https%3A%2F%2Fstatic-cdn.jtvnw.net%2Fcf_vods%2Fd2nvs31859zcd8%2F6429c6104b122659a7d5_devalexmartinez_44509631331_5606014066%2Fthumb%2Fcustom-a60a6fe5-e58b-4282-9c4f-00dff8ba5eb7-640x360.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=twitch" width="620" height="351" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d0dfe81ccac508dcadee9f1d24ae15f/href">https://medium.com/media/5d0dfe81ccac508dcadee9f1d24ae15f/href</a></iframe><p>Please let me know if you have any comments, suggestions, or just general feedback for me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=363fc1239b3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-7-deploy-the-mule-app-to-cloudhub-363fc1239b3">MuleSoft from Start: A Beginner’s Guide — Session 7: Deploy the Mule App to CloudHub</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MuleSoft from Start: A Beginner’s Guide — Session 6: Debug the Mule App in Anypoint Studio]]></title>
            <link>https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-6-debug-the-mule-app-in-anypoint-studio-ab7602d5b788?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab7602d5b788</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Tue, 25 Jul 2023 21:12:15 GMT</pubDate>
            <atom:updated>2023-07-25T21:12:15.229Z</atom:updated>
            <content:encoded><![CDATA[<h3>MuleSoft from Start: A Beginner’s Guide — Session 6: Debug the Mule App in Anypoint Studio</h3><p>In the <a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-5-develop-the-api-in-anypoint-studio-a7dcfc43655c">last session</a>, we modified our newly created Mule project to follow best practices like having a specific file for Global Elements or creating properties files per environment.</p><p>In this week’s session, we reviewed how to implement the <strong>articles</strong> logic, created a Postman collection with its local+dev environments, and learned how to debug our Mule application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxD6zNh0SjDnD1N8065Q4g.png" /></figure><blockquote><strong>Note: </strong>The links and notes from the session have been added to the <a href="https://github.com/alexandramartinez/mulesoft-from-start">GitHub repository</a> for you to follow through with what I’m doing in the video. You can find both recordings (the complete and the shorter one) at the end of the post.</blockquote><h3>Homework from the last session</h3><p>You can see the full list of changes I did for this solution in <a href="https://github.com/alexandramartinez/mulesoft-from-start/pull/1/files">this Pull Request</a> or read the step-by-step <a href="https://github.com/alexandramartinez/mulesoft-from-start#-session-5">here</a>. The homework was to:</p><ul><li>Create new Mule Configuration Files to keep each resources’ logic separate from the main maxines-blog-api.xml file. Like so:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*FtRecQzz_RKg-wFSOtXE5A.png" /></figure><ul><li>Add sub-flows inside these new config files instead of flows. For example:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*Z2yKk5dJw0bkLAxjkkZHlw.png" /></figure><ul><li>Reference these new sub-flows from the main flows from the APIKit router. Like so:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*TbXKtKf8qCkWuuQxkyMNtw.png" /></figure><ul><li>Finish creating the logic for the articles resource (happy path).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*f3nYRESDHhuKPaybJ1r6Sg.png" /></figure><ul><li>Improve the code to avoid duplicating the same code (like we do with the Retrieve connector named GET articles) -- this helps to prevent human error.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*Y0oEwvpWK4X9M7yK2zF7Yg.png" /></figure><h3>Postman collection</h3><p>We ended up starting a Postman collection to keep all our basic requests to be able to test this API. We created the following requests:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*ne22oWbaqMiwaWNQ9JaMAA.png" /></figure><p>We also created two different environments in Postman to be able to switch between local and dev (once we deploy the application to CloudHub).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*au2VxPInGac9Y9Eo5HGC3Q.png" /></figure><p>You can download this collection we generated <a href="https://github.com/alexandramartinez/mulesoft-from-start/blob/main/sessions/6/mulesoft-from-start.postman_collection.json">here</a>.</p><h3>Debugging a Mule app</h3><p>It is important you learn how to debug your Mule application so you can see the flow of the app running step by step. It is also useful to understand better how your Mule message is being transformed in every component.</p><p>You can debug by adding a breakpoint to any component — this means the application will pause running in the spot where you put the breakpoint so you can advance and see step by step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*3LrYWRVS7OyojTXIWaJ8VQ.png" /></figure><p>And instead of running the application, click on debug.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*3e6iCyNIQ6p-ONC_ApMlrQ.png" /></figure><p>Make sure you change your perspective to be able to see the debugging windows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*zGNVm6VdI8PuGVTO1xdy8w.png" /></figure><p>Once the app has been started (you can confirm in the Console), you can send a request and see where it stops.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lvbv44B4rcUY9uEO4WerYw.png" /></figure><p>In the <strong>Mule Debugger</strong> window, you will be able to see a preview of the Mule message and other properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*cXqX95jHSsAQYSVBMzgnxQ.png" /></figure><p>You can use the <strong>Evaluate DataWeave Expression</strong> window to run some DataWeave code and see a preview of the output without affecting the rest of the running application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*hDxkm5IfyLShR-Uw9BB_Qg.png" /></figure><p>You can use the debugger control buttons at the top-right to be able to step into/out of or continue running the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/202/1*XTztWFOY-hcrge6gz5uqbA.png" /></figure><p>Finally, you can change perspectives using the top-right buttons to change from development and debug views.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/99/1*EPxt203FU_y98mpGrPHnBQ.png" /></figure><h3>Recordings</h3><p>Finally, here are the two recordings you can find about this session.</p><ul><li>The complete video on <a href="https://www.twitch.tv/devalexmartinez">Twitch</a></li><li>The edited/clean/shorter version on <a href="https://www.youtube.com/prostdev">YouTube</a></li></ul><p>Here you can find the shorter version from YouTube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F75IJ1WFa9iA&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D75IJ1WFa9iA&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5bca29c9f50d79f36a0ba42ad5955280/href">https://medium.com/media/5bca29c9f50d79f36a0ba42ad5955280/href</a></iframe><p>And here you can find the complete video from Twitch:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.twitch.tv%2F%3Fvideo%3D1876220306%26muted%3Dtrue%26autoplay%3Dfalse%26parent%3Dcdn.embedly.com&amp;display_name=Twitch.tv&amp;url=https%3A%2F%2Fwww.twitch.tv%2Fvideos%2F1876220306&amp;image=https%3A%2F%2Fstatic-cdn.jtvnw.net%2Fcf_vods%2Fd2nvs31859zcd8%2F5849d391e6be8471916f_devalexmartinez_10721645267_9697452679%2Fthumb%2Fcustom-816e4ce3-1c13-4d62-a0fb-72db982a855c-640x360.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=twitch" width="620" height="351" frameborder="0" scrolling="no"><a href="https://medium.com/media/326a735228e18708b2d4e537d648c3ae/href">https://medium.com/media/326a735228e18708b2d4e537d648c3ae/href</a></iframe><p>Please let me know if you have any comments, suggestions, or just general feedback for me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab7602d5b788" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-6-debug-the-mule-app-in-anypoint-studio-ab7602d5b788">MuleSoft from Start: A Beginner’s Guide — Session 6: Debug the Mule App in Anypoint Studio</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MuleSoft from Start: A Beginner’s Guide — Session 5: Develop the API in Anypoint Studio]]></title>
            <link>https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-5-develop-the-api-in-anypoint-studio-a7dcfc43655c?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7dcfc43655c</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Thu, 06 Jul 2023 19:25:42 GMT</pubDate>
            <atom:updated>2023-07-06T19:25:42.608Z</atom:updated>
            <content:encoded><![CDATA[<h3>MuleSoft from Start: A Beginner’s Guide — Session 5: Develop the API in Anypoint Studio</h3><p>In the <a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-4-test-publish-the-api-specification-7dcca81e0b07">last session</a>, we finished creating our API Specification, tested it, and published it to Exchange. After that, we used that asset from Exchange to create a Mule project with the scaffolded flows from the API Spec.</p><p>In this week’s session, we modified our newly created Mule project to follow best practices like having a specific file for Global Elements or creating properties files per environment. We also started the development of our API Implementation using the Object Store to keep our API data instead of connecting to an external database or a third-party service (for simplicity purposes).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*649HcNIz0dusRdt38qrmyw.png" /></figure><blockquote><strong>Note: </strong>The links and notes from the session have been added to the <a href="https://github.com/alexandramartinez/mulesoft-from-start">GitHub repository</a> for you to follow through with what I’m doing in the video. You can find both recordings (the complete and the shorter one) at the end of the post.</blockquote><h3>Global Elements file</h3><p>Right-click on src/main/mule and create a new Configuration File. Name it <strong>global.xml</strong>. We will use this file to keep the Global Elements from the whole project inside just one Configuration File, instead of having them spread across different files.</p><p>Now go back to the main Configuration File that was created before (with the APIKit router), go to the XML view, and cut the two configurations for the HTTP Listener and for the Router. You will paste these into the new global.xml file, inside the <strong>&lt;mule&gt;&lt;/mule&gt;</strong> brackets.</p><p>That’s it! Moving on, you will be able to use this global.xml file to keep all the Global Elements. This will save you time in the future so you don’t have to look into all the Configuration Files to find your Global Elements.</p><h3>Properties</h3><p>There are certain values that you don’t want to keep hardcoded into the XML code in case you want to change them later. For example, the HTTP host or port. Besides that, you want to be able to have different values depending on the environment the application is running in. For this purpose, it is recommended to have different properties files located under src/main/resources.</p><blockquote><strong>Note</strong>: The properties files can be of type <strong>.properties</strong> or <strong>.yaml</strong>, but in this example we’re going to use .properties.</blockquote><p>Right-click on src/main/resources and create two new files: <strong>dev.properties</strong> and <strong>local.properties</strong>.</p><p>Inside the local properties file, add the following properties:</p><pre>http.host=0.0.0.0<br>http.port=8082</pre><p>Inside the dev properties file, add the following properties:</p><pre>http.host=0.0.0.0<br>http.port=8081</pre><p>Now you can go to the Global Elements and edit the HTTP Listener configuration to refer to the properties we just created using the syntax <strong>${property}</strong>. Like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*coBOEbulrwxvXxzlIa_Y7Q.png" /></figure><p>In order for the Mule app to know which configuration file should it take depending on the name of the environment, we’re gonna have to add a few more configurations to connect all of these files.</p><p>In Global Elements, create a new <strong>Global Property </strong>with the name <strong>env</strong> and the value <strong>local</strong>. This way, every time we run this Mule app, it’s gonna know the environment is local. When we deploy this application to the cloud, we are going to create another property there to tell it the environment is now dev.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/207/1*D0ANCzyccF14dAYDcb6hOA.png" /></figure><p>The final step is to actually add the files to read depending on this env property. To do this, create a new Global Element that is a <strong>Configuration Properties.</strong> In the File field, write <strong>${env}.properties</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*frNOR1kRuhSPD83pkRttKg.png" /></figure><p>This configuration will now read the value from the env property we set up (either local or dev), and replace it in the ${env} part to end up with either local.properties or dev.properties.</p><h3>Developing the API</h3><p>We decided to use the <a href="https://docs.mulesoft.com/object-store/">Object Store</a> to keep our data instead of spending time creating a database, just for the sake of simplicity. During the video, we finished implementing the logic for <strong>GET /articles</strong> and <strong>POST /articles</strong>. In other words, to read all the articles and to post a new article.</p><p>This is the configuration we ended up creating for the <strong>GET</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*jjxFu2XLPGLx1BnuMFxhcA.png" /></figure><pre>&lt;flow name=&quot;get:\articles:maxines-blog-api-config&quot;&gt;<br>  &lt;logger level=&quot;INFO&quot; message=&quot;Starting GET /articles&quot; doc:name=&quot;START&quot; /&gt;<br>  &lt;os:retrieve doc:name=&quot;GET articles&quot; doc:id=&quot;d86a63ee-6e86-4301-b189-2c79f606f52c&quot; key=&quot;#[Mule::p(&#39;os.articles&#39;)]&quot; objectStore=&quot;Object_store&quot; &gt;<br>    &lt;os:default-value &gt;&lt;![CDATA[#[output application/json --- []]]]&gt;&lt;/os:default-value&gt;<br>  &lt;/os:retrieve&gt;<br>  &lt;logger level=&quot;INFO&quot; doc:name=&quot;END&quot; doc:id=&quot;be2cfaf5-dd3f-473f-97dc-2f46323b9230&quot; message=&quot;Ending GET /articles&quot; /&gt;<br>&lt;/flow&gt;</pre><p>And for the <strong>POST</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*gIo6kXalrov8aVvXV7hDDQ.png" /></figure><pre>&lt;flow name=&quot;post:\articles:application\json:maxines-blog-api-config&quot;&gt;<br>  &lt;logger level=&quot;INFO&quot; message=&quot;Starting POST /articles&quot; doc:name=&quot;START&quot;/&gt;<br>  &lt;os:retrieve doc:name=&quot;articles&quot; doc:id=&quot;86c79bf7-248f-452d-afde-1f5605d69937&quot; key=&quot;#[Mule::p(&#39;os.articles&#39;)]&quot; objectStore=&quot;Object_store&quot; target=&quot;articles&quot;&gt;<br>    &lt;os:default-value &gt;&lt;![CDATA[#[output application/json --- []]]]&gt;&lt;/os:default-value&gt;<br>  &lt;/os:retrieve&gt;<br>  &lt;ee:transform doc:name=&quot;append new article&quot; doc:id=&quot;db752066-af0c-4635-9f1f-9340d20aef67&quot; &gt;<br>    &lt;ee:message &gt;<br>      &lt;ee:set-payload &gt;&lt;![CDATA[%dw 2.0<br>output application/json<br>---<br>(vars.articles default []) + payload]]&gt;&lt;/ee:set-payload&gt;<br>    &lt;/ee:message&gt;<br>  &lt;/ee:transform&gt;<br>  &lt;os:store doc:name=&quot;new article to &#39;articles&#39;&quot; doc:id=&quot;92d29f4d-58d7-4130-924b-32df7ae1be16&quot; key=&quot;#[Mule::p(&#39;os.articles&#39;)]&quot; objectStore=&quot;Object_store&quot;/&gt;<br>  &lt;remove-variable doc:name=&quot;articles&quot; doc:id=&quot;72fe56a1-3265-4982-a670-98eaaebd0459&quot; variableName=&quot;articles&quot;/&gt;<br>  &lt;logger level=&quot;INFO&quot; doc:name=&quot;END&quot; doc:id=&quot;0fefc982-dc69-4f25-bf9b-0b7ebbec86e2&quot; message=&quot;Ending GET /articles&quot;/&gt;<br>&lt;/flow&gt;</pre><h3>Homework</h3><p>For you to practice — <em>and because I can’t do it all in the 1-hour live stream :’D</em> — we’ll work on the following things offline:</p><ul><li>Create new Mule Configuration Files to keep each resources’ logic separate from the main maxines-blog-api.xml file</li><li>Add subflows inside these new config files instead of flows</li><li>Reference these new subflows from the main flows from the APIKit router</li><li>Finish creating the logic for the rest of the resources (we just did articles in this session)</li><li>Improve the code to avoid duplicating the same code (like we do with the Retrieve connector named GET articles) -- this helps to avoid human mistake</li></ul><p>I will post my homework solution before July 12 and we’ll meet again on July 19 to continue with the sessions :)</p><h3>Recordings</h3><p>Finally, here are the two recordings you can find about this session.</p><ul><li>The complete video on <a href="https://www.twitch.tv/devalexmartinez">Twitch</a></li><li>The edited/clean/shorter version on <a href="https://www.youtube.com/prostdev">YouTube</a></li></ul><p>Here you can find the shorter version from YouTube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FK9ntwKz9vds&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DK9ntwKz9vds&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1604de985aefdc36dcc810979f6af51c/href">https://medium.com/media/1604de985aefdc36dcc810979f6af51c/href</a></iframe><p>And here you can find the complete video from Twitch:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.twitch.tv%2F%3Fvideo%3D1864154096%26muted%3Dtrue%26autoplay%3Dfalse%26parent%3Dcdn.embedly.com&amp;display_name=Twitch.tv&amp;url=https%3A%2F%2Fwww.twitch.tv%2Fvideos%2F1864154096&amp;image=https%3A%2F%2Fstatic-cdn.jtvnw.net%2Fcf_vods%2Fd2nvs31859zcd8%2F68c2b50fe25a72094d4e_devalexmartinez_63650154389_9630888552%2Fthumb%2Fcustom-99557c0d-3a66-4680-9fc6-6d1705bb79e1-640x360.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=twitch" width="620" height="351" frameborder="0" scrolling="no"><a href="https://medium.com/media/8d13db58b208a74cb97f950666cea0cd/href">https://medium.com/media/8d13db58b208a74cb97f950666cea0cd/href</a></iframe><p>Please let me know if you have any comments, suggestions, or just general feedback for me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7dcfc43655c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-5-develop-the-api-in-anypoint-studio-a7dcfc43655c">MuleSoft from Start: A Beginner’s Guide — Session 5: Develop the API in Anypoint Studio</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MuleSoft from Start: A Beginner’s Guide — Session 4: Test & Publish the API Specification]]></title>
            <link>https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-4-test-publish-the-api-specification-7dcca81e0b07?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7dcca81e0b07</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[api-design]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 20:07:11 GMT</pubDate>
            <atom:updated>2023-06-29T20:07:11.220Z</atom:updated>
            <content:encoded><![CDATA[<h3>MuleSoft from Start: A Beginner’s Guide — Session 4: Test &amp; Publish the API Specification</h3><p>In the <a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-3-design-an-api-specification-2a315899f22f">last session</a>, we started creating an API specification using the UI in Design Center. We designed the data types and the articles resource. Our homework was to finish the API specification for this session.</p><p>In this week’s session, we finished the design of our API specification, tested and adjusted it, to finally publish it to Exchange. After publishing to Exchange, we scaffolded the necessary flows from Anypoint Studio using the APIKit Router so we don’t have to start our Mule application from scratch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_tVF8l0FBjMJsljMiGzWQ.png" /></figure><blockquote><strong>Note: </strong>The links and some notes from the session have been added to the <a href="https://github.com/alexandramartinez/mulesoft-from-start">GitHub repository</a> for you to follow through with what I’m doing in the video. You can find both recordings (the complete and the shorter one) at the end of the post.</blockquote><h3>Homework from the last session</h3><p>After careful consideration and because I’m already experienced in RAML, I decided to move away from the GUI and design my own specification using RAML 1.0 directly (still in Design Center tho). This is the list of resources I ended up with:</p><pre>/articles<br>/articles/{id}<br>/articles/{id}/comments<br>/articles/{id}/comments/{id}<br>/writers<br>/writers/{id}<br>/categories</pre><p>I decided to use a query parameter on the /categories resource to query if a specific category (string) exists or not. A similar approach would be done with the comments. If you don&#39;t want to have such a long URI like /articles/1/comments/1, you can also decide to use query parameters instead. This is completely up to your design/preference.</p><h3>Test your API Specification</h3><p>Once you have a base specification, you can start testing how the experience would feel for the developers using your API. To do this, you first have to click on an HTTP method from the right (in Design Center).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/171/1*MiOlMp0rm9ii2ktvSo-ezQ.png" /></figure><p>Then, you can click on the <strong>Try it</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*auZKrGVBhGRkb9XGBOGr_w.png" /></figure><p>This will let you send any Query Parameters or Headers in the request but since this is a GET method, we don’t have to send anything and we can just click on <strong>Send.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*Lpt6m2RpaikLy6OP1mwWYA.png" /></figure><p>After clicking Send, we’ll receive the example we had set before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*QIdodeKa5HxiJ7XVca0fbQ.png" /></figure><p>It is important to know that this is not a working application, it is just a mock that will return the examples you set in the API specification. This is just so you can double-check all the specification details and make sure the design is correct.</p><p>Test the rest of the methods to make sure they’re working as expected or make adjustments if needed before we publish it to Exchange.</p><h3>Publish to Exchange</h3><p>Once you’ve made sure the specification is ready, you can click on the <strong>Publish </strong>button at the top right, leave the versions as they are (1.0.0 and v1), select the <strong>Stable</strong> state, and click on <strong>Publish to Exchange</strong>.</p><p>That’s all! We can now create our Mule project in Studio.</p><h3>Anypoint Studio</h3><p>You can download Studio from <a href="https://www.mulesoft.com/platform/studio">here</a> and see the installation instructions <a href="https://docs.mulesoft.com/studio/latest/to-download-and-install-studio">here</a>. Once it’s installed, click on <strong>Create a Mule project</strong>, add your project name, and import the published API from Exchange.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*ccAagCpT6xUXlSa5bjGQew.png" /></figure><p>Make sure you are logged in to your Anypoint Platform account and search for the API Specification you just published to Exchange. Click on the <strong>Add &gt;</strong> button in the middle of the window and click on <strong>Finish</strong>.</p><p>Once the scaffolding is done, you will have your Mule project with the APIKit router and the necessary flows to continue your implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*ZWAdtq3PfMSymkgUY4J1VQ.png" /></figure><p>You can test your new Mule application by running it locally (right-click on the canvas and select <strong>Run project…</strong>)<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*LUHUnzn01l0uEDCQfCrAaA.png" /></figure><p>Once you see the <strong>DEPLOYED </strong>message in the console, you can open a terminal window and send a request using <a href="https://curl.se/">curl</a>. You can also use Postman or your browser if you don’t want to use the terminal.</p><pre>curl localhost:8081/api/articles</pre><p>You may not get a response back because we haven’t implemented any changes, but you can check the console for new lines being logged.</p><h3>Recordings</h3><p>Finally, here are the two recordings you can find about this session.</p><ul><li>The complete video on <a href="https://www.twitch.tv/devalexmartinez">Twitch</a></li><li>The edited/clean/shorter version on <a href="https://www.youtube.com/prostdev">YouTube</a></li></ul><p>Here you can find the shorter version from YouTube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fho5GQJD8Hxo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dho5GQJD8Hxo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fho5GQJD8Hxo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d835a1223a1b18f86596bbd366dba8d5/href">https://medium.com/media/d835a1223a1b18f86596bbd366dba8d5/href</a></iframe><p>And here you can find the complete video from Twitch:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.twitch.tv%2F%3Fvideo%3D1858212063%26muted%3Dtrue%26autoplay%3Dfalse%26parent%3Dcdn.embedly.com&amp;display_name=Twitch.tv&amp;url=https%3A%2F%2Fwww.twitch.tv%2Fvideos%2F1858212063&amp;image=https%3A%2F%2Fstatic-cdn.jtvnw.net%2Fcf_vods%2Fd1m7jfoe9zdc1j%2F1d2206cfb9b6248635bd_devalexmartinez_30977411515_2003568594%2F%2Fthumb%2Fthumb1858212063-640x360.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=twitch" width="620" height="351" frameborder="0" scrolling="no"><a href="https://medium.com/media/8271810df304545d32aee8c69c4d446a/href">https://medium.com/media/8271810df304545d32aee8c69c4d446a/href</a></iframe><p>Please let me know if you have any comments, suggestions, or just general feedback for me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7dcca81e0b07" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-4-test-publish-the-api-specification-7dcca81e0b07">MuleSoft from Start: A Beginner’s Guide — Session 4: Test &amp; Publish the API Specification</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MuleSoft from Start: A Beginner’s Guide — Session 3: Design an API Specification]]></title>
            <link>https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-3-design-an-api-specification-2a315899f22f?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a315899f22f</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[api-design]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Thu, 15 Jun 2023 20:43:35 GMT</pubDate>
            <atom:updated>2023-06-15T20:45:21.267Z</atom:updated>
            <content:encoded><![CDATA[<h3>MuleSoft from Start: A Beginner’s Guide — Session 3: Design an API Specification</h3><p>In the <a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-2-what-is-an-api-9a4602bbc51a">last session</a>, we learned the basics of an API and API-Led Connectivity.</p><ul><li>Analogies and Examples</li><li>HTTP Methods</li><li>URI</li><li>Query Parameters</li><li>HTTP Status Codes</li><li>API-Led Connectivity</li></ul><p>In this week’s session, we started designing our own API Specification for a blog API. Let’s see a summary of what we did!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKKQ0TWT3hOd64pFocMcaQ.png" /></figure><blockquote><strong>Note: </strong>The links and some notes from the session have been added to the <a href="https://github.com/alexandramartinez/mulesoft-from-start">GitHub repository</a> for you to follow through with what I’m doing in the video. You can find both recordings (the complete and the shorter one) at the end of the post.</blockquote><h3>Requirements</h3><p>Before jumping right into Anypoint Platform, we first created our requirements on a text file to have a clearer image of what we’re trying to make. We created some resources and data types.</p><p>We defined <strong>resources</strong> as “the nouns of our APIs — stuff we can use a <strong>CRUD</strong> operation on.”</p><h4>CRUD</h4><ul><li><strong>C</strong>reate</li><li><strong>R</strong>ead</li><li><strong>U</strong>pdate</li><li><strong>D</strong>elete</li></ul><h4>Resources</h4><ul><li>Articles</li><li>Writers</li><li>Categories</li><li>Comments</li></ul><h4>Data Types</h4><pre>- article<br>    - id<br>    - slug<br>    - title<br>    - content<br>    - writerId<br>    - categoryId<br>    - comments<br>- writer<br>    - id<br>    - name<br>    - bio<br>    - articles<br>- category<br>    - id<br>    - name<br>    - articles<br>- comment<br>    - id<br>    - content<br>    - author<br>    - articleId<br>- error<br>    - code<br>    - description</pre><p>After creating our notes, we were now able to start creating our API Specification in Design Center.</p><h3>Design Center</h3><p>In your Anypoint Platform account (you can use a free trial), go to Design Center and create a new API Specification. Make sure to select the <strong>Guide me through it</strong> option. Especially if you’re not familiar with RAML or OAS.</p><p>In the API Summary window, select the following values:</p><ul><li>Title = Blog API</li><li>Version = 1.0.0</li><li>Protocols = HTTP, HTTPS</li><li>Media type = application/json</li><li>Base URI = /</li><li>Description = # Welcome to Maxine’s Blog!</li></ul><h4>Data Types</h4><p>In the Data Types section from the left side of the screen, click on the + button to start creating more items. Create the following data types with the properties listed below.</p><p><strong>Comment (Object)</strong></p><ul><li>id — Required — Number</li><li>content — Required — String</li><li>author — Required — String</li><li>articleId — Required — Number</li></ul><p>Example:</p><pre>{<br> &quot;id&quot;: 1,<br> &quot;content&quot;: &quot;Hey, this was a nice post!&quot;,<br> &quot;author&quot;: &quot;Alex Martinez&quot;,<br> &quot;articleId&quot;: 1<br>}</pre><p><strong>Article (Object)</strong></p><ul><li>id — Required — Number</li><li>title — Required — String</li><li>content — Required — String</li><li>writerId — Required — Number</li><li>categoryId — Number</li><li>comments — Array of Comment</li><li>slug — Required — String</li></ul><p>Example:</p><pre>{<br> &quot;id&quot;: 1,<br> &quot;title&quot;: &quot;The Importance of Regular Exercise&quot;,<br> &quot;content&quot;: &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac est eu mauris faucibus consectetur. Nunc vehicula hendrerit nulla, non vulputate justo ultrices sit amet. Mauris varius lorem sit amet sem laoreet, id lacinia eros auctor. Donec tincidunt augue vel dolor pharetra tincidunt. Aliquam dapibus sed neque vitae sagittis. Sed sit amet nibh id nunc vehicula laoreet. Morbi fermentum auctor est, eu tempor tortor lobortis nec. Etiam tincidunt, lorem a viverra facilisis, nunc lorem aliquet magna, euismod ullamcorper ligula metus et augue.&quot;,<br> &quot;writerId&quot;: 1,<br> &quot;categoryId&quot;: 1,<br> &quot;comments&quot;: [<br>  {<br>   &quot;id&quot;: 1,<br>   &quot;content&quot;: &quot;Hey, this was a nice post!&quot;,<br>   &quot;author&quot;: &quot;Alex Martinez&quot;,<br>   &quot;articleId&quot;: 1<br>  }<br> ],<br> &quot;slug&quot;: &quot;importance-of-regular-exercise&quot;<br>}</pre><p><strong>Category (Object)</strong></p><ul><li>id — Required — Number</li><li>name — Required — String</li><li>articles — Array of Article</li></ul><p>Example:</p><pre>{<br> &quot;id&quot;: 1,<br> &quot;name&quot;: &quot;Mental Health&quot;,<br> &quot;articles&quot;: [<br>  {<br>   &quot;id&quot;: 1,<br>   &quot;title&quot;: &quot;The Importance of Regular Exercise&quot;,<br>   &quot;content&quot;: &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac est eu mauris faucibus consectetur. Nunc vehicula hendrerit nulla, non vulputate justo ultrices sit amet. Mauris varius lorem sit amet sem laoreet, id lacinia eros auctor. Donec tincidunt augue vel dolor pharetra tincidunt. Aliquam dapibus sed neque vitae sagittis. Sed sit amet nibh id nunc vehicula laoreet. Morbi fermentum auctor est, eu tempor tortor lobortis nec. Etiam tincidunt, lorem a viverra facilisis, nunc lorem aliquet magna, euismod ullamcorper ligula metus et augue.&quot;,<br>   &quot;writerId&quot;: 1,<br>   &quot;categoryId&quot;: 1,<br>   &quot;comments&quot;: [<br>    {<br>     &quot;id&quot;: 1,<br>     &quot;content&quot;: &quot;Hey, this was a nice post!&quot;,<br>     &quot;author&quot;: &quot;Alex Martinez&quot;,<br>     &quot;articleId&quot;: 1<br>    }<br>   ],<br>   &quot;slug&quot;: &quot;importance-of-regular-exercise&quot;<br>  }<br> ]<br>}</pre><p><strong>Writer (Object)</strong></p><ul><li>id — Required — Number</li><li>name — Required — String</li><li>bio — Required — String</li><li>articles — Array of Article</li></ul><p>Example:</p><pre>{<br> &quot;id&quot;: 1,<br> &quot;name&quot;: &quot;Esmeralda&quot;,<br> &quot;bio&quot;: &quot;20+ years of experience in IT and very smart.&quot;,<br> &quot;articles&quot;: [<br>  {<br>   &quot;id&quot;: 1,<br>   &quot;title&quot;: &quot;The Importance of Regular Exercise&quot;,<br>   &quot;content&quot;: &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac est eu mauris faucibus consectetur. Nunc vehicula hendrerit nulla, non vulputate justo ultrices sit amet. Mauris varius lorem sit amet sem laoreet, id lacinia eros auctor. Donec tincidunt augue vel dolor pharetra tincidunt. Aliquam dapibus sed neque vitae sagittis. Sed sit amet nibh id nunc vehicula laoreet. Morbi fermentum auctor est, eu tempor tortor lobortis nec. Etiam tincidunt, lorem a viverra facilisis, nunc lorem aliquet magna, euismod ullamcorper ligula metus et augue.&quot;,<br>   &quot;writerId&quot;: 1,<br>   &quot;categoryId&quot;: 1,<br>   &quot;comments&quot;: [<br>    {<br>     &quot;id&quot;: 1,<br>     &quot;content&quot;: &quot;Hey, this was a nice post!&quot;,<br>     &quot;author&quot;: &quot;Alex Martinez&quot;,<br>     &quot;articleId&quot;: 1<br>    }<br>   ],<br>   &quot;slug&quot;: &quot;importance-of-regular-exercise&quot;<br>  }<br> ]<br>}</pre><p><strong>Error (Object)</strong></p><ul><li>code — Required — Number</li><li>description — Required — String</li></ul><p>Example:</p><pre>{<br> &quot;code&quot;: 500,<br> &quot;description&quot;: &quot;There was an internal error. Nothing on your side tho!&quot;<br>}</pre><h4>Resources</h4><p>After creating the data types, we started creating the resources. Unfortunately, we were only able to finish the Articles resource. Your homework is to create the Writers, Categories, and Comments resources.</p><p><strong>/articles</strong></p><pre>- GET (to retrieve the list of articles)<br>  - Responses:<br>    - 200 - OK<br>      - Body:<br>        - Media type: application/json<br>        - Type: Array of Article<br>    - 404 - Not Found<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br>    - 500 - Internal Server Error<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br><br>- POST (to create a new article)<br>  - Responses:<br>    - 201 - Created<br>      - Body:<br>        - Media type: application/json<br>        - Type: Article<br>    - 400 - Bad Request<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br>    - 409 - Conflict<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br>    - 500 - Internal Server Error<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br>  - Body:<br>    - Media type: application/json<br>    - Type: Object<br>    - Properties:<br>      - title - Required - String<br>      - content - Required - String<br>      - writerId - Required - Number<br>      - categoryId - Number<br>      - slug - Required - String</pre><p><strong>/articles/{slug}</strong></p><ul><li>URI Parameter Name = slug</li><li>Required = true</li><li>Type = String</li></ul><pre>- GET (to retrieve one article)<br>  - Responses:<br>    - 200 - OK<br>      - Body:<br>        - Media type: application/json<br>        - Type: Article<br>    - 404 - Not Found<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br>    - 500 - Internal Server Error<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br><br>- PUT (to update an existing article)<br>  - Responses:<br>    - 200 - OK<br>      - Body:<br>        - Media type: application/json<br>        - Type: Article<br>    - 400 - Bad Request<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br>    - 500 - Internal Server Error<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br>  - Body:<br>    - Media type: application/json<br>    - Type: Article<br><br>- DELETE (to delete an existing article)<br>  - Responses:<br>    - 204 - No Content<br>    - 404 - Not Found<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error<br>    - 500 - Internal Server Error<br>      - Body:<br>        - Media type: application/json<br>        - Type: Error</pre><h3>Homework</h3><p>Before the next session, you have to finish creating the resources in our API Spec for <strong>Writers</strong>, <strong>Categories</strong>, and <strong>Comments</strong>. We just finished the <strong>Articles</strong> resource in the session.</p><h3>Recordings</h3><p>Finally, here are the two recordings you can find about this session.</p><ul><li>The complete video on <a href="https://www.twitch.tv/devalexmartinez">Twitch</a></li><li>The edited/clean/shorter version on <a href="https://www.youtube.com/prostdev">YouTube</a></li></ul><p>Here you can find the shorter version from YouTube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXIrCqwmTPQs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXIrCqwmTPQs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXIrCqwmTPQs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b641dfc03faa5b0816184e9fa4b73cd/href">https://medium.com/media/7b641dfc03faa5b0816184e9fa4b73cd/href</a></iframe><p>And here you can find the complete video from Twitch:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.twitch.tv%2F%3Fvideo%3D1846281214%26muted%3Dtrue%26autoplay%3Dfalse%26parent%3Dcdn.embedly.com&amp;display_name=Twitch.tv&amp;url=https%3A%2F%2Fwww.twitch.tv%2Fvideos%2F1846281214&amp;image=https%3A%2F%2Fstatic-cdn.jtvnw.net%2Fcf_vods%2Fd2nvs31859zcd8%2Ff8dea982076d7cfab4de_devalexmartinez_39150958657_8295738171%2Fthumb%2Fcustom-56774d9b-1fff-4e57-b0c6-efa24e06226d-640x360.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=twitch" width="620" height="351" frameborder="0" scrolling="no"><a href="https://medium.com/media/bac06a0f53cb8b5109d7a1a655f4b850/href">https://medium.com/media/bac06a0f53cb8b5109d7a1a655f4b850/href</a></iframe><p>Please let me know if you have any comments, suggestions, or just general feedback for me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a315899f22f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-3-design-an-api-specification-2a315899f22f">MuleSoft from Start: A Beginner’s Guide — Session 3: Design an API Specification</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MuleSoft from Start: A Beginner’s Guide — Session 2: What is an API?]]></title>
            <link>https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-2-what-is-an-api-9a4602bbc51a?source=rss-64a2de07cea2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a4602bbc51a</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Alex Martinez]]></dc:creator>
            <pubDate>Thu, 08 Jun 2023 18:58:14 GMT</pubDate>
            <atom:updated>2023-06-08T18:58:14.797Z</atom:updated>
            <content:encoded><![CDATA[<h3>MuleSoft from Start: A Beginner’s Guide — Session 2: What is an API?</h3><p>In the <a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-1-mulesoft-overview-62fa9307ea2f">last session</a>, we learned about the MuleSoft overview of products. We didn’t do a deep dive into them, but we learned that the main products are</p><ul><li>Anypoint Platform</li><li>Anypoint Studio</li><li>Composer</li><li>MuleSoft RPA</li><li>DataWeave</li></ul><p>We also took a look at the community overview like the Ambassadors, Mentors, Meetups, and Help Center.</p><p>In this week’s session, we focused on understanding the basics of APIs and learning more about MuleSoft’s API-led connectivity approach. Let’s see a summary of what we learned!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v9gHMbhuu5kv8XRyOKedfA.png" /><figcaption>and, yes, I cut my hair 😂</figcaption></figure><blockquote><strong>Note: </strong>The links and some notes from the session have been added to the <a href="https://github.com/alexandramartinez/mulesoft-from-start">GitHub repository</a> for you to follow through with what I’m doing in the video. You can find both recordings (the complete and the shorter one) at the end of the post.</blockquote><h3>Understanding APIs</h3><p>Because I had already written a series of blog posts about simplifying your road to learning the basics of APIs, I referenced those posts when explaining them. In the GitHub repo, or here, you can find the links to read them on your own if you still have questions or want some further clarification.</p><h4><a href="https://www.prostdev.com/post/understanding-apis-part-1-what-is-an-api">Part 1: What is an API?</a></h4><p>The way that I look at APIs is something like the following diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*WdBQ9l7yPPl5C6Qe.png" /><figcaption>ProstDev.com</figcaption></figure><p>You, as a client consuming the API, don’t really care about how the API is really working. You don’t care about the programming language it’s written in or what tech stack it’s using. You only care about what you can send in and what it returns back.</p><p>Whatever you send into the API is a <strong>request</strong> and whatever it returns back to you is a <strong>response</strong>. In the request, you send your input data along with the data type and the operation (what you want the API to do with the input data). In the response, you get some output data along with its data type.</p><h4><a href="https://www.prostdev.com/post/understanding-apis-part-2-api-analogies-and-examples">Part 2: Analogies and Examples</a></h4><p><strong>Restaurant</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/0*1JAxCByLFrePAeJm.png" /></figure><p>In this analogy, you are the client. You arrive at this restaurant and take the menu to see the list of available food. You <strong>request</strong> the server to give you a hamburger. At this point, you don’t know exactly what the server is doing to make sure you get your order right. They may be writing the order down to pass to the kitchen, they may input your order in the computer, or whatever they do — you just care about getting your food exactly how you asked for it. After some time, the server comes back and gives you your order in <strong>response </strong>to your request.</p><p><strong>Calculator</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/0*ggTf3EF8VSrOHoor.png" /></figure><p>In this analogy, you input two numbers: 2 and 2; and select the addition (+) operation. After you press the equals button, the calculator does its thing and returns 4. Again, you don’t care much about what’s inside the calculator or what it does to give you the result. You just care about getting the correct result.</p><p><strong>Human Resources system</strong></p><p>First, you send the following <strong>request</strong> to your HR system with some CSV data. You ask the API to retrieve the listed employees’ first day of employment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*ZWDM2LvGCWiJ68WU.png" /><figcaption>Request</figcaption></figure><p>The HR API returns the same CSV information you had previously sent, but now adding a new field called <strong>First Day</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*_g5AZF9C2fwj1KfK.png" /><figcaption>Response</figcaption></figure><p>In the following picture, we can appreciate the same example, only using a JSON data type instead of a CSV data type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*-YS96OuYFWheE1aj.png" /></figure><h4><a href="https://www.prostdev.com/post/understanding-apis-part-3-what-are-http-methods">Part 3: What are HTTP Methods?</a></h4><p>There are 9 HTTP methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, and PATCH. However, the most popular ones are GET, POST, PUT, PATCH, and DELETE.</p><ul><li><strong>GET: </strong>Read or retrieve data from the server or the API.</li><li><strong>DELETE:</strong> Delete data from the server.</li><li><strong>POST: </strong>Create new data. Sending the same information more than once can result in duplicated data.</li><li><strong>PUT: </strong>Update or replace existing data. It can also be used to create new data. Sending the same information more than once will have the same effect as sending it just once.</li><li><strong>PATCH: </strong>Update or modify <em>parts</em> of existing data.</li></ul><p>Whether you’ll be using POST or PUT to create new data is really up to you. These are just <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods">Mozilla’s standards</a>. It is recommended that you follow them for the comfort of other developers using your API, but the design decision is really up to you.</p><h4><a href="https://www.prostdev.com/post/understanding-apis-part-4-what-is-a-uri">Part 4: What is a URI?</a></h4><p>If we take this URI as an example: <a href="https://official-joke-api.appspot.com/random_joke">https://official-joke-api.appspot.com/random_joke</a>, we can separate the parts of this URI into the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*d3M51F6G43gNVg0Z.png" /></figure><p>…And that’s all that we need to understand from this post! 😃</p><h4><a href="https://www.prostdev.com/post/understanding-apis-part-5-intro-to-postman-and-query-parameters">Part 5: Intro to Postman and Query Parameters</a></h4><p>If you go to the following link: <a href="https://www.google.com/search?q=cats">https://www.google.com/search?q=cats</a>, you are basically searching for <em>cats </em>in Google. Notice how there’s a <em>?q=cats</em> after the path of the URI. This is our query parameter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*nyGJayTtNX2utNMy.png" /></figure><p>Take a look at a more complex example from Expedia which contains more query parameters:</p><pre>https://www.expedia.com/Hotel-Search?adults=2&amp;d1=2020-11-23&amp;d2=2020-11-24&amp;destination=Toronto%20%28and%20vicinity%29%2C%20Ontario%2C%20Canada&amp;endDate=2020-11-24&amp;regionId=178314&amp;rooms=1&amp;semdtl=&amp;sort=RECOMMENDED&amp;startDate=2020-11-23&amp;theme=&amp;useRewards=false&amp;userIntent</pre><p>We can put this URI in Postman to see a more human-readable list of all the query parameters we have here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*w7pvgqkep8kUxCQH.png" /></figure><h4><a href="https://www.prostdev.com/post/understanding-apis-part-6-what-are-http-status-codes">Part 6: What are HTTP Status Codes?</a></h4><p>So far we have been focusing on the request part. Now, let’s see what other data can be returned in the response.</p><p>There are a lot of Status Codes reserved for certain API Responses, but we will be looking at the most popular ones: 200, 201, 202, 204, 400, 401, 403, 404, and 500. You can find a complete list <a href="https://www.restapitutorial.com/httpstatuscodes.html">here</a> with their definitions.</p><ul><li>All status codes starting with <strong>2</strong> mean that the process was a success. Like <strong>200 OK </strong>or <strong>201 Created</strong>.</li><li>Status codes starting with <strong>4</strong> mean that there was an issue with your request. Like <strong>400 Bad Request</strong> or <strong>404 Not Found</strong>.</li><li>Status codes starting with <strong>5</strong> mean that there was an issue from the server side and not with your request. Like <strong>500 Internal Server Error</strong>.</li></ul><p>And that is all for learning about APIs! Now let’s take a look at what is API-led connectivity in MuleSoft.</p><h3>What is API-led connectivity?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5JUaMoMvy4tNyN4kLYmTww.png" /><figcaption>Image taken from the MuleSoft for Salesforce Developers book.</figcaption></figure><p>This is an architectural approach that we tend to do with the APIs we design using MuleSoft. There are three layers to this approach: Experience, Process, and System APIs.</p><ul><li><strong>Experience layer</strong>: Top layer. These APIs connect with the client applications like a Mobile app, a Web app, or a Smartwatch app.</li><li><strong>Process layer</strong>: Middle layer. These APIs orchestrate the Experience and System layers.</li><li><strong>System layer</strong>: Bottom layer. These APIs connect with the server applications or third-party systems like SAP, Facebook, Salesforce, etc.</li></ul><h3>Recordings</h3><p>Finally, here are the two recordings you can find about this session.</p><ul><li>The complete video on <a href="https://www.twitch.tv/devalexmartinez">Twitch</a></li><li>The edited/clean/shorter version on <a href="https://www.youtube.com/prostdev">YouTube</a></li></ul><p>Here you can find the shorter version from YouTube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FM4gYW2o9IKc&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DM4gYW2o9IKc&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/86eed5d92b2340da034a9247760a43da/href">https://medium.com/media/86eed5d92b2340da034a9247760a43da/href</a></iframe><p>And here you can find the complete video from Twitch:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.twitch.tv%2F%3Fvideo%3D1840283988%26muted%3Dtrue%26autoplay%3Dfalse%26parent%3Dcdn.embedly.com&amp;display_name=Twitch.tv&amp;url=https%3A%2F%2Fwww.twitch.tv%2Fvideos%2F1840283988&amp;image=https%3A%2F%2Fstatic-cdn.jtvnw.net%2Fcf_vods%2Fd2nvs31859zcd8%2Ff80092dc5b6717071652_devalexmartinez_16438357085_1392582301%2Fthumb%2Fcustom-887e277d-7f12-4aea-a620-9c5f631e48af-640x360.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=twitch" width="620" height="351" frameborder="0" scrolling="no"><a href="https://medium.com/media/5326a91e4cd6f97542c66688e6f9257d/href">https://medium.com/media/5326a91e4cd6f97542c66688e6f9257d/href</a></iframe><p>Please let me know if you have any comments, suggestions, or just general feedback for me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a4602bbc51a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/mulesoft-from-start-a-beginners-guide-session-2-what-is-an-api-9a4602bbc51a">MuleSoft from Start: A Beginner’s Guide — Session 2: What is an API?</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>