Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

  1. Log in to the Management Console (https://<hostname>:9443/carbon) of the API Manager using admin/admin credentials.

  2. Select the Users and Roles menu under the Configure menu.
  3. Click the Roles link and then click Add New Role.
  4. Give the role name as creator and click Next.
  5. 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    

  6. Similarly, create the publisher role with the following permissions.

    • Login
    • Manage > API > Publish
  7. Note that the API Manager comes with the subscriber role available by default. It has the following permissions:

      • Login
      • Manage > API > Subscribe
  8. Note that you have the following roles added:

    Let's create users for each of the roles. 
  9. Click the Users and Roles menu under the Configure menu again.
  10. Click the Users link and then click Add New User.
  11. Give the username/password and click Next. For example, lets create a new user by the name apipublisher.
  12. 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.

  13. 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.

  1. Open the API Publisher (https://<hostname>:9443/publisher) and log in as apicreator.
  2. Click the Add link and provide the information given in the table below.
    Image Removed Click Implement once you are done.

    FieldValue DescriptionSample value
    Name 
    PhoneVerification
    Name of API as you want it to appear in the API
    store
    ContextContext
     
    /phoneverify
    URI context path that is used by to API consumers
    VersionVersion 1.0.0API version (in the form of version.major.minor)
  3. 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.

  4. The Implement tab opens. Provide the following information.

    Image Removed

    Production endpoint
    FieldValueDescription
    Implementation methodBackend endpointIf 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 typeHTTP endpoint 
    Visibility Public
    ResourcesURL patternCheckPhoneNumber
     Request typesGET, POST, OPTIONS

    Image Added

  5. Give the following information in the Implement tab that opens and click Manage once you are done.

    the endpoint is .
    FieldSample value
    Implementation methodBackend
    Endpoint typeHTTP
    Production endpoint

    This sample service has two operations as CheckPhoneNumber and CheckPhoneNumbers. Let's use CheckPhoneNumber here.
    http://ws.cdyne.com/phoneverify/phoneverify.asmx

     

    To verify the URL, click the Test button next to it.

    Endpoint security schemeNon Secured (If secured, user is asked for credentials of the backend service)

    Image Added

  6. Click Manage to go to the Manage tab and provide the following information. 

    Image Removed

    FieldValueDescription
    Tier AvailabilityBronze/Gold/Silver/UnlimitedThe 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.
    TransportsHTTP/HTTPS 

    Image Added

    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.

...