Table of Contents |
---|
Introduction
This page gives generic setup instructions and prerequisites to run API Manager samples.
Info | ||
---|---|---|
| ||
Executing these steps only once is enough to try multiple samples in a single API Manager installation. |
The API Manager binary distribution comes with a number of samples to demonstrate API Manager's basic functionality. These samples are located in <APIM_HOME>/samples
folder. Inside this directory, there are sub directories for each sample. Each sub directory contains the relevant configurations, scripts and instructions required to run the a sample. Each sample contains an APIPopulator
script, which drives the API Manager via a REST API.
The sections below describe the generic setup instructions and prerequisites to run API Manager samples:
Table of Contents |
---|
Info | ||
---|---|---|
| ||
Executing these steps only once is enough to try multiple samples in a single API Manager installation. |
Prerequisites
- Java Development Kit/JRE version 1.6.* or 1.7.*
- Apache Ant 1.7.0 or later.
- An HTTP client tool such as cURL (http://curl.haxx.se).
- A JavaScript compatible web browser.
- An active Internet connection.
...
- Download and install the API Manager according to the instructions given in Getting Started.
- Before installing samples, there are various libraries to be configured. Run ant by typing "ant" from the you must configure libraries. Go to
<APIM_HOME>/bin
directory in using a command prompt (on Windows) or text Linux console (on Linux) .
and typeant
command. This step populates master data required for the API Manager to start up. For example, on Windows: - Start the API Manager by executing
<APIM_HOME>/bin/wso2server.bat
(on Windows) or<APIM_HOME>/bin/wso2server.sh
(on Linux). More information can be found in section For more information, see Running the API Manager. This will populate step also populates more master data required for the server to start up. Next, shut down the API Manager and run 'ant' inside
<APIM_HOME>/samples/Data
directory.
You will see an iconInfo Warning false It is necessary a must to shut down the server before running ant in this case.
executing step 5 below.
Run the
ant
command inside<APIM_HOME>/samples/Data
directory. An output similar to following appears:It executes the
UserPopulator.sql
, which creates two user accounts asprovider1
andsubscriber1
, which can be used.
You can use them to log - in to the API Publisher and API Store respectively.Start the API Manager again and log in to the API Publisher (
http://localhost:9763/publisher
) using username/password as provider1/provider1. Similarly, you should be able to log in to the API Store (https://localhost:9443/store
) using username/password as subscriber1/subscriber1.