# Interactive MuleSoft tutorial: Anypoint Platform API Catalog by Rolando Carrasco | UAPIM | Exchange

> A walkthrough of an interactive, browser-based MuleSoft tutorial built by Ambassador Rolando Carrasco on Killercoda — create a Connected App, install and authenticate the API Catalog CLI, introspect API specs, and publish assets to Exchange, all in a remote environment.

- **Watch:** https://www.youtube.com/watch?v=wBllgVhIrg8
- **Page:** https://prostdev.com/video/interactive-tutorial-anypoint-platform-api-catalog-killercoda
- **Series:** Other MuleSoft videos
- **Duration:** 14:19

## About this video

A walkthrough of an interactive, browser-based MuleSoft tutorial built by Ambassador Rolando Carrasco on Killercoda — create a Connected App, install and authenticate the API Catalog CLI, introspect API specs, and publish assets to Exchange, all in a remote environment.

## Resources

- [Read the article](https://www.prostdev.com/post/interactive-tutorial-mulesoft-anypoint-platform-api-catalog-by-rolando-carrasco)
- [Interactive tutorial on Killercoda](https://killercoda.com/borlandc/scenario/mule-tester)

## Transcript

### Intro

Hello everyone, my name is Alex Martinez and today I am super excited to talk to you about this amazing dynamic tutorial where you can actually go and interact with it, do stuff, and learn about it. This awesome tutorial was created by Rolando Carrasco, who is one of the MuleSoft mentors — I believe he might be an Ambassador, I'm not sure at this point — but it's amazing because you will be able to learn about what you're doing and do it in an actual new environment. You don't have to do it on your local computer; you can just use this remote computer, access everything there, and learn to do it right there.

Right now I just accessed the link that you will be able to find in the description of the video or in the article. Once you enter, it will just take a moment — as you were seeing, a lot of things were running and everything was being installed. Once it's installed, here it says you just have to select "keep the local version currently installed", as you can see here. So click on that, or just leave it like that and press enter so you can select it. Now it will continue installing some stuff, and once that is done you will be able to get started with the tutorial.

On the right side of the screen you will be able to see everything that is running, and on the left side of the screen you will be able to see the actual tutorial that Rolando created for us. So after you do that, just wait a moment for this to be installed.

There are also some prerequisites: an Anypoint Platform account, API Catalog CLI permissions, acquiring the organization ID, and having Node.js and npm. All of this is going to be installed here automatically. The code editor will also be used here, and the project files will come from a GitHub repo that was generated by one of the technical product marketing managers at Salesforce.

In this scenario, here is what you will learn: how to create a Connected App, how to install the API Catalog CLI, how to authenticate the API Catalog CLI, how to introspect the set of API specs, and how to use different MuleSoft Anypoint Platform API Catalog commands.

### Getting started

All right, this has finished, so we can just click on start. Now we are going to start. This is our whole system — this is our terminal. If you click here on "editor" you will be able to see what is actually happening behind the scenes. This is Visual Studio Code, as you can see here. You have another terminal, and here you have the Explorer of all the files that you have in case you want to take a look at them, but you can just stay here on the terminal tab.

### Installing the prerequisites

The first thing that you have to do is to install curl, jq, node, and npm. You can do this on your own; I am just going to guide you through it and do it myself so you can see how this is done. In case you have any issues or get stuck on anything, you can come back to this video and follow through.

You can simply click on this and it will automatically execute everything for you. As you saw, I just clicked on it and it started automatically installing everything (I zoomed in a little bit). That installs curl, jq, node, and npm.

Now you need yq for some expressions, so let's click here. This is running, and that was installed.

Now validate node and npm again — you can just click on the command and it will run it for you. As we can see from here, it's on version 20.12.1.

### Installing the API Catalog CLI

Then we're going to install the MuleSoft API Catalog CLI, so click on that and it will install. It's going to take a little bit of time to install. While that's being installed, I just wanted to quickly show you here: if you take a look at this part, it says that I have 53 minutes to finish this. To be honest with you, I did it once already and it took me about 20 minutes. So you do not need to have the Plus membership — just with the regular membership it's okay, and you will be able to finish this in less than 60 minutes.

All right, this has been installed. Now let's click on "API catalog" to see that everything was installed correctly, and we are able to see this output right here, which is what we need.

### Cloning the GitHub repo

Let's click on next. Now this is telling us to clone the GitHub repo, so let's do that. Once we have that, we will change the directory to that place. You can also go back to the editor here and see that the repo was actually cloned. Now let's go back to tab one and click on next.

### Creating the Connected App in Anypoint Platform

Now we are going to start creating the Connected App from Anypoint Platform. First of all, you have to open Anypoint Platform, so let's open it by clicking it here. It's asking us to sign in. I'm just going to go ahead and sign up and create a new account. All right, I'm pretty much ready — let's create this account. My account was created.

Now let's see what we need to do. We have to go to Access Management and click on Connected Apps, so let's do that: here, Access Management, and then Connected Apps. Then we need to create a new app, put the name, and click on "App acts on its own behalf". So, create app, "killercoda" — whatever name you want to put — just click on this and then add scopes.

Which scopes are we going to be adding here? We have an "API Catalog Contributor" scope — so this one. Then in the general section we have "View Environment", this one right here. And that is all, just two scopes. Click on next. This is my business group; click on next. In my case it's sandbox, so click on next, and that's it. Perfect. Click on "Add Scopes". Now you have the two scopes, and click on Save. Perfect, now you have it here.

So now we just have to copy the ID and secret that we will need in a moment. Let's click on next step.

### Setting up credentials and authenticating

Now we're going to be setting up our credentials. I can just click on this, and this is going to ask me to add the client ID. If I go back here, I can click on "copy ID", then go back and paste it here and press enter. That's it. Now let's do the same for the secret: let's go back, copy the secret, then go back and paste it. There we go, click enter.

Then we are going to create the auth string. We are going to be setting up the client ID, then a colon, and then the client secret. So let's click on that. Let's validate that it was created by echoing the auth string, and we do — awesome, there's that.

Now let's click on next. Now we need to authenticate to Anypoint Platform, so we need to run this, which is doing a curl POST request to `anypoint.mulesoft.com` setting up the access token. Let's run that, and we can see that we received an access token.

### Getting the organization ID

Now we need to get our organization ID. Rolando here is telling us to go to API Manager and get it from the URL. If we go to API Manager, you can indeed get it from the URL — in this case it's like "4500..." and it ends on "EDB".

Another way is to click here on "Environment Information" and you will also see it right here: business group ID, and we have the same one, which is "4500...EDB".

Just another way, because I want to show you all the ways: if you go to Access Management, click on Business Groups, and then this is your business group, you can get it from here as well — business group ID "4500...EDB". So whichever way you want to retrieve this org ID, just retrieve it. Now run this, paste it here, and press enter. There's that.

### Generating the descriptor file

Now let's click on next. Now we need to generate a descriptor file. If we run `api-catalog create descriptor`, we can run this, and that created the descriptor. Awesome, there's that.

We can also check that it was created. If we go to "follow tutorial", we have here the `catalog.yaml`, and this is what was created. So you can also go check it out there in the files if you want. Let's go back here. When you're following the whole tutorial, you can of course take a look at everything that's happening here; I will just skip that for a moment.

So we were here — we want to copy the following text. You can simply click on it and it will copy, and then we want to paste it here in the `catalog.yaml`. Paste it, and it's saved (it's automatically saved, you don't have to save it).

### Publishing assets to Exchange

Now get back to tab one. You can execute the following command to publish the asset: `api-catalog publish assets`. Before I do that, I am going to go to my Exchange to show you that I have nothing else here. So here we go, this is my root and I have nothing here. Let's go ahead and run this.

Okay, so that was a dry run, so you can see the contents from the dry run here, and it actually says that it's processing — so that's good. Now let's actually run it. If we click on it, it will actually start. Now it's doing the whole thing; you can see that it's publishing to Exchange. We're seeing the output, and after that we will be able to see the asset actually on Exchange.

All right, so the API was successfully published. Now if we go back to Exchange, let's just refresh this, and now we can see that we have the Shipping API, the Invoice Payment System API, and we actually have a connector of the Invoice Payment System API. So there's that — we have that new thing. Click on next, and that is all.

If you check out the Shipping API, this is what we published, which is awesome. You have everything here — you even have the snippets. Well, this one doesn't work well, but this one works, awesome. You can just do everything from here, and this is a great way to learn because you can see all of the commands and execute them by just clicking on them. You don't have to set up anything else.

### Ending

It took me, again, less than 60 minutes. If we take a look at my screen and see how much time I have left, I now have 40 minutes left, so as you can see it did take me less than 60 minutes. You can just go back and restart, or do more stuff about this. This is an awesome way of learning. Thank you, Rolando, for creating this — I really appreciate it. I don't know how long it took you to do this, but it's awesome.

You can get all of the information in the description of the video or in the article. If I already created the article, it's going to be in the description of the video; if not, you can just go to prostdev.com or check out everything in the description of the video on YouTube. And that's all. This is awesome — thank you, Rolando, again, and I hope I get to see more people creating interactive tutorials on this platform called Killercoda.

That is how you solve it, in case for any reason you weren't able to do it all on your own — that is totally fine. You can also send some feedback here for Rolando, or you can contact him on LinkedIn or on Slack if you're on the MuleSoft community Slack workspace.

So from my side, remember to follow us on youtube.com/ProstDev, or remember to subscribe at prostdev.com, because you will receive notifications as soon as we publish new stuff. All right, that's all for this video. I hope you liked it, I hope this was useful, and I hope there are more tutorials from this platform. See you later, bye!