Lab 07 - API Developer Portal

Return to Workshop

Lab 7

API Developer Portal

Publishing APIs to Developer Portal


<img src="../images/agenda-04.png “Login” width=“900” />

Overview

The focal point of your developers’ experience is the API developer portal, and the level of effort you put into it will determine the level of decreased support costs and increased developer engagement.

Why Red Hat?

3scale provides a built-in, state-of-the-art CMS portal, making it very easy to create your own branded hub with a custom domain to manage developer interactions and increase API adoption.

You can customize the look and feel of the entire Developer Portal to match your own branding. You have complete control over every element of the portal, so you can make it as easy as possible for developers to learn how to use your API.

Lab Instructions

Step 1: Customizing Developer Portal

  1. Open a browser window and navigate to the 3scale admin app. Please check with your instructor.

  2. Log into 3scale using your designated user and password. Click on Sign In.




  3. Click on the Developer Portal tab to access the developer portal settings.




  4. On the right menu select Home Page, and replace the entire content with what’s in the example link example




  5. Replace the CHANGE_ME_URL to the PLAN_URL you get from last lab.




  6. Click the Publish button at the bottom of the editor to save the changes and made them available in the site.




  7. Click on the API Tab, select the Integration link under SSO Location API, and click on the Application Plans on the left menu when it shows up.

  1. Go back to your Developer Portal tab. Click on the Visit Developer Portal to take a look of how your developer portal looks like.




Step 2: Register New Accounts Using Developer Portal

  1. Take the place of one of your developers and signup for the Secure plan.




  2. Fill in your information and an email to register as a developer. Click on the Sign up button.

  1. The system will try to send a message with an activation link.




    Currently the lab environment doesn’t have a configured email server, so we won’t be able to receive the email.

  2. Go back to your Admin Portal tab and navigate to Developers to activate the new account.




  3. Find your user under the Accounts and click the Activate link.




    Your user is now active and can log into the portal.

  4. Now we need to make sure the the application will redirect the user to the correct page after successful login. Go to the Developer tab and click on the user you have create in the previous steps.




  5. Select the application for the SSO Location API service




  6. Update redirect link to your locations application link. Please update userX and OCP_URL http://www-[userX].apps.[OCP_URL]/*




Step 3: Login to Developer Portal

  1. As your portal is not currently public, you will need your portal code to login. You can get the code in your admin portal navigating to: Settings > Developer Portal > Domains & Access.




  2. Open a new Incognito/Private browser window to test the Developer Portal login. Navigate to the following. Make sure your user and Openshift environment is correct.

     http://[userX].apps.[OCP_URL]
    
  3. Type your portal code to finish the login.




  4. Sign in to the portal with your developer account you created previously.




  5. You will land in the developers homepage, where you will be able to check your developers settings and retrieve your newly created Client ID and Client Secret for the Workshop App you created.


    <img src="../images/16g-user-credentials.png" “Application Credentials” width=“900” />

Copy down this credentials as it you will use them to authenticate yourself to the managed API in the next lab.

Congratulations! You have successfully customized your Developer Portal and completed a Sign Up process.

Steps Beyond

So, you want more? Click the Documentation link. Where does it takes you? API Docs is where you can add your interactive documentation for your APIs. Is based on the known Swagger UI interface.

You can add from the Admin Portal under API Docs the API definition to generate the live testing.

Summary

In this lab you discovered how to add a developer facing experience to your APIs. Developers in your organization or outside of it can now register, gain access to API keys and develop sample applications.

Notes and Further Reading

Red Hat 3scale Developer Portal’s CMS consists of a few elements:




Liquid is a simple programming language used for displaying and processing most of the data from the 3scale system available for API providers. In 3scale, it is used to expose server-side data to your API developers, greatly extending the usefulness of the CMS while maintaining a high level of security.

Return to Workshop