...
In Users and roles, we introduced a set of users that are commonly found in many enterprises. Let's see how you can log in to the Management Console as an admin and create these roles.
To create these users in the API Manager, you log in to the management console as an admin (credentials: admin/admin). Alternatively, you can use the default admin The admin use can play the creator, publisher and subscriber roles described earlier. In this section, we explain how to set up these users or custom users and roles.
Log in to the Management Console (
https://<hostname>:9443/carbon)
of the API Manager using admin/admin credentials.- Select the Users and Roles menu under the Configure menu.
- Click the Roles link and then click Add New Role.
- Give the role name as
creator
and click Next. - A list of permissions opens. Select the following and click Finish.
- Configure > Governance and all underlying permissions.
- Login
- Manage > API > Create
- Manage > Resources > Govern and all underlying permissions
Similarly, create the
publisher
role with the following permissions.- Login
- Manage > API > Publish
Note that the API Manager comes with the
subscriber
role available by default. It has the following permissions:- Login
- Manage > API > Subscribe
- Note that you have the following roles added:
Let's create users for each of the roles. - Click the Users and Roles menu under the Configure menu again.
- Click the Users link and then click Add New User.
- Give the username/password and click Next. For example, lets create a new user by the name
apipublisher
. Select the role you want to assign to the user (e.g.,
publisher
) and Finish. Given below is a list of usernames and the roles we assign to them in this guide.Similarly, create a new user by the name
apicreator
and assign the creator role.
...
An API creator uses the API Publisher to create and publish APIs into to the API Store. In this section, we explain how to Let's create an API and attach add interactive Swagger-based documentation to it.
In this guide, we work with a service exposed by the Cdyne services provider (www.cdyne.com). We use their phone validation service, which has SOAP and REST interfaces and is documented using a WSDL file. This service is documented at : http://wiki.cdyne.com/index.php/Phone_Verification.Let's create this API and add it to the API Store.
- Open the API Publisher (
https://<hostname>:9443/publisher)
and log in asapicreator
. Click the Add link and provide the information given in the table below.
Click Implement once you are done.
FieldValue DescriptionSample value Name PhoneVerificationName of API as you want it to appear in the APIstoreContextContext/phoneverifyURI context path that is used by to API consumersVersionVersion 1.0.0 API version (in the form of version.major.minor) Under the Resources section, create a resource by the name CheckPhoneNumber and select its GET, POST and OPTIONS methods. Once you are done, click Implement.
Tip Tip: Selecting the
OPTIONS
method is mandatory if you want to allow subscribers to invoke the API using the API Console, which is in the API Store.The Implement tab opens. Provide the following information.
Field Value Description Implementation method Backend endpoint If you have a real backend implementation to your API, select that option. Else, you can specify implementation in-line. The latter approach is usually used in mock-up implementation for prototyped APIs. Endpoint type HTTP endpoint Production endpoint Visibility Public Resources URL pattern CheckPhoneNumber Request types GET, POST, OPTIONS Give the following information in the Implement tab that opens and click Manage once you are done.
Field Sample value Implementation method Backend Endpoint type HTTP Production endpoint This sample service has two operations as
CheckPhoneNumber
andCheckPhoneNumbers
. Let's useCheckPhoneNumber
here.
http://ws.cdyne.com/phoneverify/phoneverify.asmxTo verify the URL, click the Test button next to it.
Endpoint security scheme Non Secured (If the endpoint issecured, user is asked for credentials of the backend service .) Click Manage to go to the
Manage
tab and provide the following information.Field Value Description Tier Availability Bronze/Gold/Silver/Unlimited The API can be available at different level of service; you can select multiple entries from the list. At subscription time, the consumer chooses which tier they are interested in. Transports HTTP/HTTPS Tip Tip: For resources that have methods requiring authentication (i.e., Auth Type is not NONE), you set None as the Auth type of
OPTIONS
to support CORS (Cross Origin Resource Sharing) between the API Store and Gateway.
...