Learning Library

← Back to Library

IBM API Connect LoopBack Tutorial

Key Points

  • IBM API Connect leverages the LoopBack framework for model‑driven API creation, and this tutorial walks through building and testing an API using the API Designer.
  • After installing API Connect, a LoopBack project is generated with `apic loopback -d APIConnectDemo`, accepting default names and a “hello world” application type.
  • Running `apic edit` launches the API Designer in a browser, where users can explore the API’s Design, Assemble (policy), and Source (Swagger) tabs.
  • The microservice and gateway are started from the Designer’s Run button, displaying service status, IP address, and ports at the bottom of the UI.
  • The API is tested by opening the Assemble view, invoking the `message.greet` operation, approving a certificate warning, and confirming a 200 response with the greeting message.

Full Transcript

# IBM API Connect LoopBack Tutorial **Source:** [https://www.youtube.com/watch?v=Lj_57iM8Jjc](https://www.youtube.com/watch?v=Lj_57iM8Jjc) **Duration:** 00:03:25 ## Summary - IBM API Connect leverages the LoopBack framework for model‑driven API creation, and this tutorial walks through building and testing an API using the API Designer. - After installing API Connect, a LoopBack project is generated with `apic loopback -d APIConnectDemo`, accepting default names and a “hello world” application type. - Running `apic edit` launches the API Designer in a browser, where users can explore the API’s Design, Assemble (policy), and Source (Swagger) tabs. - The microservice and gateway are started from the Designer’s Run button, displaying service status, IP address, and ports at the bottom of the UI. - The API is tested by opening the Assemble view, invoking the `message.greet` operation, approving a certificate warning, and confirming a 200 response with the greeting message. ## Sections - [00:00:00](https://www.youtube.com/watch?v=Lj_57iM8Jjc&t=0s) **Creating and Testing APIs with IBM API Connect** - This segment walks through generating a LoopBack project using the apic CLI, opening the API Designer in a browser, and starting the service to design, assemble policies, and test the API. ## Full Transcript
0:00IBM API connect provides a model driven 0:03approach leveraging the loop back 0:05framework to create apis in this 0:08tutorial I'll show how to create and 0:10test apis using API connects API 0:14designer if you have not already 0:16installed API connect on your laptop 0:18please refer to the previous tutorial or 0:20product documentation and install IBM 0:23API connect on your laptop before 0:25attempting these steps to create a loop 0:28back project go to a a terminal window 0:30and type apic loopback d-name API 0:35connect demo this command will generate 0:38several questions we will accept the 0:40defaults name of the application API 0:43connect demo name of the directory where 0:46the project is saved API connect demo 0:49and the kind of application hello world 0:52this will create my API connect DDO 0:54loopback project and I will return to 0:57the command prompt we will change to 1:00project directory API connect DDO and 1:02run the command apic edit to start the 1:06API 1:10designer the API designer opens in a 1:13browser window log in using your Bloomix 1:16user ID and password click on the got it 1:19button on any informational Pages you 1:22see click on the API API connect demo to 1:26explore it in the design assemble and 1:28Source tabs the design tab is for 1:31designing your API the assemble tab 1:34allows you to assemble enforcement 1:35policies for apis the source tab 1:38provides the source view of an open API 1:41definition or API Swagger definition to 1:44test the project we need to start the 1:46service first the service can be started 1:49either in the API designer or the 1:51command line in this tutorial I'll use 1:54the API 1:56designer in the API designer click the 1:59Run button on the bottom left of the 2:01screen to start the micro service and 2:03the Gateway 2:04service once the services are started 2:07you will see the status of the services 2:09on the bottom of the screen along with 2:11the IP address and port 2:15numbers now we will test the API by 2:18clicking on the apis tab and selecting 2:20the API API connect demo we will click 2:23on the assemble tab to open the API in 2:26assemble mode and the invoke assembly 2:28will be opened by default here we have 2:31the option to test the API click on the 2:33test button and we will be able to 2:35select an operation to 2:37test click on operation to see the pull 2:40down items and scroll down until you see 2:43message. greet select message. greet and 2:46scroll down in the navigation pane until 2:49you see the invoke button click invoke 2:52you may see a digital certificate 2:54related warning as the certificate's 2:56common name is not Local Host review an 2:59approve then click invoke again for a 3:02successful invoke you will see a status 3:05code 200 under response in the 3:07navigation pain and the greeting message 3:09under body this concludes the tutorial 3:13on creating a loop back project 3:15exploring its apis starting the service 3:17and testing the project by displaying 3:19the stored 3:21greeting thanks for watching