Skip to content

Quick Start Guide

New to WSO2 API Manager? No worries; we'll guide you through the basics!

In this step-by-step guide, you’ll learn how to create, publish, and invoke an API using the Publisher Portal and Developer Portal.

Before you begin...

Choose a deployment option to start WSO2 API Manager All-in-one package. The All-in-one package contains all core components in a single JVM for simplified deployment.

Here's how you can download and run WSO2 API Manager All-in-one package locally on a VM:

  1. Install Java SE Development Kit (JDK) version 21 and set the JAVA_HOME environment variable.

    Tip

    For more information on setting the JAVA_HOME environment variable for different operating systems, see Setup and Install

  2. Download WSO2 API-Manager All-in-one package.

  3. Open Source Distribution
  4. WSO2 Official Distribution

  5. Extract the downloaded zip file.

  6. Navigate to the <API-M_HOME>/bin folder from your command line.

  7. To start WSO2 API Manager, execute the relevant command:

    sh api-manager.sh
    
    api-manager.bat --run
    

To use Kubernetes (K8s) and Helm resources for container-based deployments of WSO2 API Manager (API-M), follow the steps in Deploying API-M on Kubernetes using Helm Resources.

What you'll build

In this sample scenario, you'll implement the full lifecycle of an API using WSO2 API Manager.

Here are the steps that we are going to follow:

Let's get started...

Step 1: Create, Deploy and Publish an API

Follow the instructions below to create, deploy and publish an API via the Publisher Portal of WSO2 API-M.

  1. Navigate to the Publisher Portal.

    https://localhost:9443/publisher

  2. Sign in with admin/admin as the credentials.

    Publisher portal home page

  3. Next, let's create a REST API in the API Manager to proxy an existing REST service by selecting REST API from the home screen and then click Start From Scratch.

    Design a new REST API

  4. Fill the following API details in the relevant fields.

    Name RandomUUID
    Context /uuid
    Version 1.0.0
    Endpoint https://dev-tools.wso2.com/gs/helpers/v1.0/uuid

  5. Select Universal Gateway as the Gateway type and click Create & Publish.

    Create an API

    This will publish your first API on the Developer Portal as well as deploy it on the gateway. You now have an OAuth 2.0 secured REST API that is ready to be consumed.

Step 2: Subscribe to the API

Follow the instructions below to subscribe to the API via the Developer Portal of WSO2 API-M.

  1. Navigate to the Developer Portal.

    https://localhost:9443/devportal

    The published RandomUUID API is listed in the Developer Portal as shown below.

    Developer Portal home page

  2. Click Sign-In and enter admin/admin as your credentials to sign in to the Developer Portal.

  3. Once you click on the RandomUUID API, you will be redirected to the API overview page. Then, go ahead and click on the TRY OUT button.

    API try out

    And with that, we have subscribed to the API using the DefaultApplication.

Step 3: Invoke the API

Follow the instructions below to invoke the created API.

  1. Click on Try OutAPI Console from the left menu. Then, click on GET TEST KEY to generate an access token.

    Note

    If this is the first time you are using the API console from your browser, open a new tab and navigate to the https://localhost:8243/ URL.

    This will prompt your browser to accept the certificate used by the gateway. This is required because by default the gateway uses a self-signed certificate that is not trusted by web browsers.

    When running in production, since a trusted certificate is used, you won't have to do this step.

    Test API

  2. Click on the GET resource of the API to expand the resource and Click Try It Out.

    GET resource

  3. Click Execute.

    GET resource

    You should see the {"uuid" : "<random-uuid-here>"} response from the API.

    Successful response

Congratulations! With that, you've created, deployed, and published your first API. Next, you subscribed to it and put it to the test. Your journey with WSO2 API Manager has officially begun!