0% found this document useful (0 votes)
217 views670 pages

Study APIC

This document provides an overview of IBM API Connect 10 and discusses key concepts: - IBM API Connect 10 is an API management platform that allows users to create, secure, and publish APIs. It includes components for API development, management, and consumption. - The API lifecycle in API Connect involves phases such as design, development, publishing, and improving APIs. It supports roles like API owners and developers. - The API Connect cloud topology includes elements such as the API developer portal, API products, and API proxies to manage the full lifecycle of APIs.

Uploaded by

Kapil Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
217 views670 pages

Study APIC

This document provides an overview of IBM API Connect 10 and discusses key concepts: - IBM API Connect 10 is an API management platform that allows users to create, secure, and publish APIs. It includes components for API development, management, and consumption. - The API lifecycle in API Connect involves phases such as design, development, publishing, and improving APIs. It supports roles like API owners and developers. - The API Connect cloud topology includes elements such as the API developer portal, API products, and API proxies to manage the full lifecycle of APIs.

Uploaded by

Kapil Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 670

V12.

cover

Front cover
Notebook
Create, Secure, and Publish APIs with IBM
API Connect 10
Course code WD515 / ZD515 ERC 2.0

IBM Training
Individually Licensed to Kapil Jain
August 2021 edition
Notices
This information was developed for products and services offered in the US.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM
representative for information on the products and services currently available in your area. Any reference to an IBM product, program,
or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent
product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this
document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive, MD-NC119
Armonk, NY 10504-1785
United States of America
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some jurisdictions do not allow disclaimer of express or implied
warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein;
these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s)
and/or the program(s) described in this publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an
endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those
websites is at your own risk.
IBM may use or distribute any of the information you provide in any way it believes appropriate without incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other
publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any
other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible,
the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to
actual people or business enterprises is entirely coincidental.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many
jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM
trademarks is available on the web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.
© Copyright International Business Machines Corporation 2020, 2021.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Individually Licensed to Kapil Jain


V11.2
Contents

TOC

Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

Course description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi

Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii

Unit 1. Introduction to IBM API Connect 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Key concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Key concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
1.1. Overview of APIs and API Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Overview of APIs and API Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
What is an API? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Classification of APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
API Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11
API Management use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Benefits of API management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Common business drivers for API initiatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
1.2. IBM API Connect V10 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
IBM API Connect V10 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
IBM API Connect overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
Components of API Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
API Connect user interfaces: By function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
Cloud Manager user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
IBM API Connect deployment options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Installation considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
Installation utility program (APICUP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
1.3. API lifecycle management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26
API lifecycle management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
API lifecycle (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28
API lifecycle (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29
API roles and the development workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
1.4. Configuring the cloud topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
Configuring the cloud topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
What is the API Connect Cloud? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-34
API Connect cloud topology (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-35
API Connect cloud topology (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-36
API Connect cloud and user interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-37
Stand-alone topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-38
1.5. Registering services in Cloud Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-39
Registering services in Cloud Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-40
Services that are registered in Cloud Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41
Configure the cloud environment: SMTP server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-42
Configure the cloud environment: Endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-43
1.6. Configuring the DataPower Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-44
Configuring the DataPower Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-45
API Gateway (DataPower) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-46
AP gateway types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-47

© Copyright IBM Corp. 2020, 2021 iii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC API gateway types comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-48


DataPower Gateway security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-49
DataPower in the cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-50
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-51
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-52
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-54
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-55
Exercise: Reviewing the API Connect development and runtime environment . . . . . . . . . . . . . . . . 1-56
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-57

Unit 2. Managing catalogs and organizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
2.1. Overview of organizations and catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Overview of organizations and catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Structure of organizations and catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Organizations (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Organizations (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
2.2. Creating a catalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
Creating a catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Create a catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Catalog settings: Overview tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Catalog settings: Gateway services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Catalog settings: API Endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Catalog settings: Portal tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
2.3. Creating a consumer organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18
Creating a consumer organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
Create a consumer organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Result of adding a consumer organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Sign on to the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Consumer organization owner manage options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23
Add a member to a consumer organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
Consumer organization member list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
Consumer organization default roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
2.4. Creating a Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27
Creating a Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Email activation for Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
One-time sign in for Developer Portal admin user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
Signed into the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31
Developer Portal administration menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
2.5. Assigning roles and permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-33
Assigning roles and permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34
Role-based administration of the cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-35
API Connect cloud, user interfaces, and owners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-36
Role of owners of the provider and consumer organizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-37
Assign further roles to the member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-38
Portal roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39
Example of members that are assigned Drupal roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40
Password lockout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-41
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-43
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-44
Exercise: Managing catalogs and consumer organizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-45

© Copyright IBM Corp. 2020, 2021 iv


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-46

Unit 3. Defining APIs in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3.1. Overview of APIs and API types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Overview of APIs and API types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
What is an API definition? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
API types (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
API types (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
3.2. Structure of the API definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Structure of the API definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Parts of an API definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Parts of an API operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
3.3. Creating a SOAP API in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
Creating a SOAP API in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Options for creating an API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
SOAP API scenario (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16
SOAP API scenario (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Creating a SOAP API in API Manager (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Creating a SOAP API in API Manager (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Creating a SOAP API in API Manager (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
3.4. Editing the API definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Editing the API definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
API Manager user interface (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
API Manager user interface (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
API Manager user interface: Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Design view: API setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
Design view: Security definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27
Design view: Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Design view: Paths (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
Design view: Paths (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Design view: Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
Design view: Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32
Design view: Target services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
Design view: Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34
Design view: Activity log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35
API Manager user interface: Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-36
API Manager user interface: Endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38
API Manager user interface: Assemble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39
3.5. Testing the API definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-40
Testing the API definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-41
Testing an API in API Manager (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-42
Testing an API in API Manager (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-45
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-46
Exercise: Defining an API that calls an existing SOAP service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-47
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48

Unit 4. Defining a REST API in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
4.1. Overview of the OpenAPI standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Overview of the OpenAPI standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Swagger petstore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6

© Copyright IBM Corp. 2020, 2021 v


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC OpenAPI: REST API interface standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7


OpenAPI definition structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Sample OpenAPI definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
OpenAPI 3.0 specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
4.2. IBM extensions to the OpenAPI standard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
IBM extensions to the OpenAPI standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
IBM extensions to the OpenAPI definition format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Extensions: Lifecycle settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
4.3. Creating a REST API in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Creating a REST API in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
Create a REST API definition in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Define the base path and target endpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19
Edit the generated OpenAPI definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
Select the gateway type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21
Add definitions for response data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22
Add a path and operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23
Configure the gateway to call the REST application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24
Message processing policy assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
4.4. Defining REST operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26
Defining REST operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27
HTTP methods in REST architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Example: GET /pet/{petId} . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29
Define a GET operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30
Example: POST /pet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31
Define a POST operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35
Exercise: Defining a REST API from a target service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-37

Unit 5. Assembling message processing policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
5.1. Overview of message processing policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Overview of message processing policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
What is a message processing policy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
API policies and logic constructs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
User-defined policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Message processing policies at run time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
5.2. Using the assembly editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
Using the assembly editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
Assembly editor: Creating policy assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
Assembly editor: Palette and canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
Assembly editor: Magnify and zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
Assembly editor: Filter, search, and gateway type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Assembly editor: Properties editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16
Assembly editor: palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17
API policies and logic constructs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
5.3. Example scenarios for policy assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19
Example scenarios for policy assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20
Example scenarios for policy assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21
Example one: Forward an API call with the invoke policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-22
Example two: Switch case by API operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23
Example three (1 of 3): Map multiple API calls into a response . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-24
Example three (2 of 3): Map multiple API calls into a response . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25

© Copyright IBM Corp. 2020, 2021 vi


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC Example three (3 of 3): Map multiple API calls into a response . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Example four (1 of 2): Transform SOAP to REST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27
Example four (2 of 2): What is the message payload? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28
Example five: Validate properties in an HTTP message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
Example six: Store message payload in API analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30
Example seven: Redact specific fields from the response body to obfuscate sensitive data . . . . . . 5-32
5.4. Changing the version of an API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-33
Changing the version of an API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-34
Change an API version (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-35
Change an API version (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-36
Change an API version (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-37
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-38
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-39
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-40
Exercise: Assembling message processing policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-41
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-42

Unit 6. Declaring client authorization requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
6.1. Managing authentication and security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Managing authentication and security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
Working with user registries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Authenticating with user registries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
TLS profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Default TLS profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
6.2. API security concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
API security concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
Authentication and authorization: API security definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12
How do you secure your APIs in API Connect? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13
What types of security definitions can you define? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-14
6.3. Identify client applications with API key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
Identify client applications with API key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
API key: A unique client application identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17
Example: Secure with Client ID (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
Example: Secure with Client ID (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19
Example: Add client secret security definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20
Applying security definitions (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
Applying security definitions (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-22
Rules for defining client ID and client secret . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23
Example: Client ID and client secret in the message header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-24
6.4. Authenticate clients with HTTP basic authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25
Authenticate clients with HTTP basic authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-26
Verifying identity with HTTP basic authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-27
Example: Storing credentials in HTTP request header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-28
Setting up a user registry (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-29
Setting up a user registry (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
Setting up a user registry (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-31
Example: Basic authentication security definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-32
Example: Apply basic authentication security to the API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-33
6.5. Introduction to OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-34
Introduction to OAuth 2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-35
What is OAuth? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-36
Example: Allow third-party access to shared resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-37
Example: Third-party access to inventory API resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-38
OAuth Step 1: Resource owner requests access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-39

© Copyright IBM Corp. 2020, 2021 vii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC OAuth Step 2: OAuth client redirection to owner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-40


OAuth Step 3: Authenticate owner with authorization service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-41
OAuth Step 4: Ask resource owner to grant access to resources . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-42
OAuth Step 5: Resource owner grants client access to resources . . . . . . . . . . . . . . . . . . . . . . . . . . 6-43
OAuth Step 6: Authorization service sends authorization grant code to client . . . . . . . . . . . . . . . . . 6-44
OAuth Step 7: Client requests access token from authorization service . . . . . . . . . . . . . . . . . . . . . 6-45
OAuth Step 8: Authorization server sends authorization token to client . . . . . . . . . . . . . . . . . . . . . . 6-46
OAuth Step 9: OAuth client sends access token to resource service . . . . . . . . . . . . . . . . . . . . . . . . 6-47
OAuth Step 10: Resource server grants access to OAuth client . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-48
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-49
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-50
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-51

Unit 7. Creating an OAuth 2.0 provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
7.1. What is an OAuth provider? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
What is an OAuth provider? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
What is an OAuth Provider? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Role of IBM API Connect in the OAuth flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
What are the steps to secure an API with OAuth 2.0? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8
7.2. Create an OAuth provider. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Create an OAuth Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10
OAuth Provider types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11
Create an authentication registry (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12
Create an authentication registry (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13
Create an authentication registry (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14
Create a Native OAuth Provider (1 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-15
Create a Native OAuth Provider (2 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16
Create a Native OAuth Provider (3 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17
Create a Native OAuth Provider (4 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
Create a Native OAuth Provider (5 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-19
Native OAuth Provider in Cloud Manager resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20
OAuth Provider: OAuth flow and grant types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-21
OAuth Provider: Client types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22
Configure the catalog to use the resources (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23
Configure the catalog to use the resources (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24
7.3. Secure an API with an OAuth 2.0 authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25
Secure an API with an OAuth 2.0 authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-26
What is an OAuth 2.0 security definition? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27
Configure OAuth security settings for the API (1 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28
Configure OAuth security settings for the API (2 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-29
Configure OAuth security settings for the API (3 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-30
Configure OAuth security settings for the API (4 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-31
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-33
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-34
Exercise: Implementing OAuth security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-35
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-36

Unit 8. Testing and debugging APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
8.1. Activating an API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Activating an API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5
Activating an API (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6

© Copyright IBM Corp. 2020, 2021 viii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC Activating an API (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7


Activating an API (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8
Locating API information on the Endpoints tab (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9
Locating API information on the Endpoints tab (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10
8.2. Testing options in API Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
Testing options in API Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12
Testing options in API Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
Testing an API with the Assembly tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
Using the Test tab to debug your API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16
Testing an API with the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-17
8.3. Using the Test tab to debug your API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-18
Using the Test tab to debug your API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
Using the Test tab to debug your API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-20
Prepare your API for debugging with the Test tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-21
Send the API request (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-23
Send the API request (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-25
Review the API response and trace (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-26
Review the API response and trace (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-27
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-28
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-29
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-30
Exercise: Introduction to the Test tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-31
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-32

Unit 9. Creating and testing a GraphQL API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
9.1. Introduction to GraphQL APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
Introduction to a GraphQL API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
What is a GraphQL API? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6
Advantages and Disadvantages of GraphQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7
Compare and Contrast REST and GraphQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
9.2. Building a GraphQL API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-10
Building a GraphQL API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
Creating a GraphQL API (1 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12
Creating a GraphQL API (2 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13
Creating a GraphQL API (3 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14
Creating a GraphQL API (4 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15
Creating a GraphQL API (5 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16
9.3. Testing a GraphQL API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
Testing a GraphQL API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18
What is a GraphQL schema? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19
Querying a GraphQL API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-20
Testing a GraphQL API with the Test tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24
Exercise: Creating and testing a GraphQL API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-26

Unit 10. Testing an API in the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
10.1. Installing and starting the local test envionment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
Installing and starting the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5
What is the Local Test Environment? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6

© Copyright IBM Corp. 2020, 2021 ix


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC Installing the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-7


Starting the API Designer in the LTE (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8
Starting the API Designer in the LTE (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9
10.2. Testing an API in the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10
Testing an API in the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11
Test an API in the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12
10.3. Creating a TLS client profile in the Local Test Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13
Creating a TLS Client profile in the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14
Why create a TLS Client profile? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-15
Create a TLS Client profile in the LTE (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16
Create a TLS Client profile in the LTE (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17
Create a TLS Client profile in the LTE (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-18
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-19
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-20
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-21
Exercise: Testing an API in the Local Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-23

Unit 11. Publishing and managing products and APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3
11.1. Overview of products and plans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4
Overview of products and plans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5
Product, plan, API hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-6
Define product and plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7
API product definition file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8
11.2. Adding a product. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9
Adding a product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-10
Add a product (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11
Add a product (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-12
Add a product (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-13
11.3. Staging and publishing a product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-14
Staging and publishing a product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-15
Catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-16
Stage a product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
Publish a product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18
Review the published products (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-19
Review the published products (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-20
11.4. Managing products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-21
Managing products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22
Lifecycle of products and API resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-23
Stage and publish a previously published product (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-24
Stage and publish a previously published product (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25
Manage published products in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-26
Remove a product from the catalog (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-27
Remove a product from the catalog (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-28
Permissions for managing products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-29
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-30
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-32
Exercise: Define and publish an API product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-33
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-34

Unit 12. The product lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3

© Copyright IBM Corp. 2020, 2021 x


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC 12.1. Managing catalog roles and permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4


Managing catalog roles and permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5
Default provider organization roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-6
Default provider organization permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
View members and permissions for a catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-9
12.2. Managing product lifecycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10
Managing product lifecycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-11
Lifecycle of products and API resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-12
Catalog production mode setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
Manage the lifecycle of Products in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14
12.3. Staging a product to a development catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-15
Staging a product to a development catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
Stage a product to a development catalog (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-17
Stage a product to a development catalog (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
Stage a product to a development catalog (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19
12.4. Publishing a product to a development catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-20
Publishing a product to a development catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21
Publish a product to a development catalog (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-22
Publish a product to a development catalog (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-23
Publish a product to a development catalog (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-24
Published product on the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
12.5. Lifecycle actions for published products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-26
Lifecycle actions for published products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-27
Lifecycle actions for published products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-28
Deprecate a product version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-29
Retire a product version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-30
Delete from catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-31
Stage a product to a production catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-32
12.6. Versioning APIs and products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-33
Versioning APIs and products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-34
Change an API version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-35
Change a product version (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-36
Change a product version (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-37
Change a product version (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-38
Add the later version of the API to the product (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-39
Add the later version of the API to the product (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-40
Add the later version of the API to the product (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-41
Replace a product version with another version (1 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-42
Replace a product version with another version (2 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-43
Replace a product version with another version (3 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-44
Replace a product version with another version (4 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-45
Supersede a product version with another version (1 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-46
Supersede a product version with another version (2 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-47
Supersede a product version with another version (3 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-48
Supersede a product version with another version (4 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-49
Product on the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-50
12.7. Migrating app subscribers to new product versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-51
Migrating app subscribers to new product versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-52
Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-53
Migrating app subscribers to new product versions (1 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-54
Migrating app subscribers to new product versions (2 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-55
Migrating app subscribers to new product versions (3 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-56
Migrating app subscribers to new product versions (4 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-57
12.8. Managing subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-58
Managing subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-59
Unsubscribing from a product and plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-60

© Copyright IBM Corp. 2020, 2021 xi


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC Manage subscriptions in API Manager (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-61


Manage subscriptions in API Manager (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-62
Manage subscriptions in API Manager (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-63
Enable approvals for lifecycle state changes (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-64
Enable approvals for lifecycle state changes (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-65
Lifecycle state changes when approvals are enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-66
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-67
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-68
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-69
Exercise: Managing and approving API Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-70
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-71

Unit 13. Subscribing and testing APIs in the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1
Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
13.1. Role of the application developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4
Role of the application developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5
Role of application developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-6
Application developer versus API developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-7
Self-registration on the Developer Portal (1 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-8
Self-registration on the Developer Portal (2 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-9
Self-registration on the Developer Portal (3 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-10
Self-registration on the Developer Portal (4 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-11
Self-registration on the Developer Portal (5 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-12
13.2. Creating an application and subscription in the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . 13-13
Creating an application and subscription in the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . 13-14
Creating an application and subscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-15
Create an application in Developer Portal (1 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-16
Create an application in Developer Portal (2 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-17
Create an application in Developer Portal (3 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-18
Create an application in Developer Portal (4 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-19
Subscribe an application to a product plan (1 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-20
Subscribe an application to a product plan (2 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-21
Subscribe an application to a product plan (3 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-22
Subscribe an application to a product plan (4 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-23
Subscribe an application to a product plan (5 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-24
Subscribe an application to a product plan (6 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-25
Approval requests (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-26
Approval requests (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-27
Approval requests (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-28
13.3. Testing an API in the Developer Portal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-29
Testing an API in the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-30
Testing an API in the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-31
Testing an API in the Developer Portal (1 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-32
Testing an API in the Developer Portal (2 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-33
Testing an API in the Developer Portal (3 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-34
Testing an API in the Developer Portal (4 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-35
Testing an API in the Developer Portal (5 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-36
Testing an API in the Developer Portal (6 of 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-37
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-38
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-39
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-40
Exercise: Subscribing and testing APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-41
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-42

© Copyright IBM Corp. 2020, 2021 xii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC Unit 14. API Analytics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
14.1. API analytics overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4
API analytics overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5
API analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6
Open-source analytics and visualization platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-7
Catalogs, Spaces, and Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-8
14.2. Where to view API analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-9
Where to view API analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-10
Where analytics are accessed in API Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-11
Analytics in the Developer Portal (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12
Analytics in the Developer Portal (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-13
Analytics in API Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-14
14.3. Dashboards and visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-15
Dashboards and visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-16
Analytics dashboard for catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-17
Example dashboard: Catalog default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-18
Example dashboard: Monitoring status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-19
Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-20
Example visualization: API calls per day . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-21
Visualization filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-22
Example visualization: Top 5 APIs overall (daily usage) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-24
Example visualization: Status codes (detailed) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-25
Example visualization: Status codes (detailed) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-26
14.4. Creating visualizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-27
Creating visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-28
Create visualizations (1 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-29
Create visualizations (2 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-30
Create visualizations (3 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-31
Create visualizations (4 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-32
Create visualizations (5 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-33
Create visualizations (6 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-34
Create visualizations (7 of 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-35
14.5. API events and records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-36
API events and records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-37
API events and records (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-38
API events and records (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-39
14.6. Exporting data from visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-41
Exporting data from visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-42
Export data from visualizations (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-43
Export data from visualizations (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-44
Export data from visualizations (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-45
Offloading analytics data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-46
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-47
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-48
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-49
Exercise: Calling an API on the gateway and monitoring API usage . . . . . . . . . . . . . . . . . . . . . . . 14-50
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-51

Unit 15. Customizing the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2
Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-3
15.1. Developer portal overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-4
Developer portal overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-5
Developer Portal terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-6

© Copyright IBM Corp. 2020, 2021 xiii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Contents

TOC Components of API Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-7


Features of the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-8
Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-9
Developer Portal: Public interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-10
Developer Portal: Administration menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-11
15.2. Developer portal members and roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-12
Developer portal members and roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-13
List all members displayed in the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-14
Portal roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-15
Developer Portal: Authenticated user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-16
15.3. Introduction to Drupal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-17
Introduction to Drupal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-18
Powered by Drupal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-19
Drupal modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-20
Disable modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-21
Status report (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-22
Status report (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-23
15.4. Creating a custom theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-24
Creating a custom theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-25
Drupal themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-26
Subthemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-27
View the enabled themes (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-28
View the enabled themes (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-29
Theme creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-30
Generate a subtheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-31
Customize the subtheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-32
Install the subtheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-33
Enable the theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-34
Set the customized theme as the default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-35
Change the site logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-36
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-37
Review questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-38
Review answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-39
Exercise: Customizing the Developer Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-40
Exercise objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-41

Unit 16. Course Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2
Course objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3
Course objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4
IBM credentials: Badges and certifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-5
Learn more about this product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-6
Additional resources (1 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-7
Additional resources (2 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-8
Additional resources (3 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-9
Additional resources (4 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-10
Additional resources (5 of 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-11
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-12
Course completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-13

© Copyright IBM Corp. 2020, 2021 xiv


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V11.2
Trademarks

TMK

Trademarks
The reader should recognize that the following terms, which appear in the content of this training
document, are official trademarks of IBM or other companies:
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International
Business Machines Corp., registered in many jurisdictions worldwide.
The following are trademarks of International Business Machines Corporation, registered in many
jurisdictions worldwide:
Bluemix® Cloudant® DataPower®
DB™ Express® IBM API Connect™
IBM Bluemix™ IMS™ Notes®
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Windows is a trademark of Microsoft Corporation in the United States, other countries, or both.
Java™ and all Java-based trademarks and logos are trademarks or registered trademarks of
Oracle and/or its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other countries.
LoopBack® and StrongLoop® are trademarks or registered trademarks of StrongLoop, Inc., an IBM
Company.
Social® is a trademark or registered trademark of TWC Product and Technology, LLC, an IBM
Company.
Other product and service names might be trademarks of IBM or other companies.

© Copyright IBM Corp. 2020, 2021 xv


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Course description

pref

Course description
Create, Secure, and Publish APIs with IBM API Connect 10

Duration: 5 days

Purpose
This course teaches you how to configure a newly built API Connect V10 environment. You are
taught how to configure a catalog with the gateway, portal, and analytics services and set up the
environment for API development. You then define API interfaces according to the OpenAPI
specification. You build SOAP and REST based APIs along with a GraphQL API. You assemble
message processing policies and define client authorization schemes, such as OAuth 2.0, in the
API definition. You verify the proper sequencing of policies in the assembly tester and further test
your APIs in the new Test tab and Local Test Environment. After building and testing your APIs,
you publish them and make them available on the Developer Portal. You manage all aspects of the
provider organization in the API Manager user interface to create, publish, version, and retire API
artifacts such as products, plans and APIs themselves. You also learn how to manage consumer
organizations who use the APIs that are made available on the Developer Portal. You learn how to
add members to the consumer organization that provides access to the APIs on the Developer
Portal. You learn how the layout of the Developer Portal can be customized. Finally, you call the
APIs on the secure gateway and you view the graphs and metrics of API usage.

Audience
This course is designed for API developers: software developers who define and implement API
operations

Prerequisites
• Basic understanding of web services and protocols
• Basic understanding of application programming
• Conceptual knowledge of APIs
• Basic understanding of Red Hat Linux

Objectives
• Configure services in Cloud Manager for an on-premises installation of API Connect
• Create a catalog and Developer Portal
• Create consumer and provider organizations
• Create, test, and publish SOAP, REST, and GraphQL APIs
• Create message processing policies that transform API requests and responses

© Copyright IBM Corp. 2020, 2021 xvi


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Course description

pref • Authorize client API requests with security definitions


• Enforce an OAuth flow with an OAuth 2.0 API security provider
• Perform advanced testing of APIs by using the Test tab and the Local Test Environment
• Define products and plans in API Manager
• Stage, publish, version, migrate, deprecate, and retire products and APIs
• Manage member roles and permissions in the Developer Portal
• Create an application and subscribe to a plan
• Review API analytics in the Developer Portal
• Review analytics dashboards and visualizations in API Manager
• Customize the Developer Portal

Contents
• Unit 1: Introduction to IBM API Connect V10
• Unit 2: Managing catalogs and organizations
• Unit 3: Defining APIs in API Manager
• Unit 4: Defining a REST API in API Manager
• Unit 5: Assembling message processing
• Unit 6: Declaring client authorization requirements
• Unit 7: Creating an OAuth 2.0 provider
• Unit 8: Testing and debugging APIs
• Unit 9: Creating a GraphQL API and testing with the Test tab
• Unit 10: Testing an API with the Local Test Environment
• Unit 11: Publishing and managing products and APIs
• Unit 12: The product lifecycle
• Unit 13: Subscribing and testing APIs in the Developer Portal
• Unit 14: API Analytics
• Unit 15: Customizing the Developer Portal

© Copyright IBM Corp. 2020, 2021 xvii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Agenda

pref

Agenda

Note

The following unit and exercise durations are estimates, and might not reflect every class
experience.

Day 1
(00:15) Course introduction
(01:30) Unit 1. Introduction to IBM API Connect V10
(01:00) Exercise 1. Reviewing the API Connect development and runtime environments
(01:00) Unit 2. Managing catalogs and organizations
(02:00) Exercise 2. Managing catalogs and consumer organizations
(01:30) Unit 3. Defining APIs in API Manager
(01:30) Exercise 3. Defining an API that calls an existing SOAP service

Day 2
(01:00) Unit 4. Defining a REST API in API Manager
(01:30) Exercise 4. Defining a REST API from a target service
(01:00) Unit 5. Assembling message processing policies
(02:30) Exercise 5. Assembling message processing policies
(01:00) Unit 6. Declaring client authorization requirements

Day 3
(01:00) Unit 7. Creating an OAuth 2.0 provider
(01:30) Exercise 6. Implementing OAuth 2.0 security
(00:30) Unit 8. Testing and debugging APIs
(01:00) Exercise 7. Introduction to the Test tab
(01:00) Unit 9. Creating and testing a GraphQL API

Day 4
(03:00) Exercise 8. Creating and testing a GraphQL API
(01:00) Unit 10. Testing an API in the Local Test Environment
(02:00) Exercise 9. Testing an API in the Local Test Environment
(00:45) Unit 11. Publishing and managing products and APIs
(00:45) Exercise 10. Define and publish an API product
(02:00) Unit 12. The product lifecycle

© Copyright IBM Corp. 2020, 2021 xviii


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Agenda

pref
Day 5
(00:45) Exercise 12. Subscribing and testing APIs in the Developer Portal
(01:15) Exercise 11. Managing and approving API Products
(01:00) Unit 13. Subscribing and testing APIs in the Developer Portal
(01:00) Unit 14. API Analytics
(01:15) Exercise 13. Calling an API on the gateway and monitoring API usage
(01:00) Unit 15. Customizing the Developer Portal
(01:30) Exercise 14. Customizing the Developer Portal

© Copyright IBM Corp. 2020, 2021 xix


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Unit 1. Introduction to IBM API Connect


10
Estimated time
01:30

Overview
This unit explains the scope and purpose of IBM API Connect V10 from the perspective of an API
developer and cloud administrator. You review the key capabilities of API Connect. You examine
the nature of an on-premises cloud and how the cloud is configured in the API Cloud Manager user
interface. You review the different gateway types for securing and managing APIs. You also learn
how to manage security, configure the cloud topology, register services and set up organizations
and catalogs for an API Connect installation.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 1-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Unit objectives • Describe the key capabilities of API Connect

• Describe what an API is and the different classifications of APIs

• Explain the key benefits and use cases of API management

• Describe how API Connect manages APIs through the entire API lifecycle

• Identify the components of an API Connect on-premises cloud

• Describe the use of the Cloud Manager user interface to administer the cloud topology and
resources

• Describe the different gateway types for securing and managing APIs

• Review the topology of an API Connect cloud

• Explain how DataPower secures the API Gateway

• Describe the roles and activities involved in the development of an API

• Identify the requirements for installing an API Connect on-premises cloud

• Describe the API Connect user interfaces by function

• Identify deployment options for API Connect at installation

• Describe the function of the installation assist utility

• Identify the components of the runtime environment

© Copyright IBM Corporation 2020, 2021

Figure 1-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 1-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Topics • Overview of APIs and API Management


• IBM API Connect 10 overview
• API lifecycle management
• Configuring the cloud topology
• Registering services in Cloud Manager
• Configuring the DataPower Gateway

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-2. Topics

© Copyright IBM Corp. 2020, 2021 1-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Acronyms Acronym Definition


API Application Programming Interface
JSON JavaScript Object Notation
JWT JSON Web Token
OVA Open Virtual Appliance
REST Representational State Transfer
SMTP Simple Mail Transfer Protocol
SOAP Simple Object Access Protocol
TLS Transport Layer Security
URL Uniform Resource Locator
XML Extensible Markup Language

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-3. Acronyms

This slide displays acronyms that are used throughout this unit. It is important that you
understand these acronyms and the key concepts that are discussed in the following slides.

© Copyright IBM Corp. 2020, 2021 1-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Key concepts • API gateway


ƒ An API gateway is an API management tool that sits between a client and a
collection of backend services. An API gateway acts as a reverse proxy to
accept all application programming interface (API) calls, aggregate the
various services that are required to fulfill them, and return the appropriate
result.
• Endpoints
ƒ An endpoint is a remote service that communicates back and forth with a
network to which it is connected.
• Kubernetes
ƒ Kubernetes is an extensible, open source platform for managing
containerized workloads and services that facilitate both declarative
configuration and automation. It has a large, rapidly growing ecosystem.
• OpenShift
ƒ Red Hat OpenShift is a hybrid cloud, enterprise Kubernetes
application platform
• VSphere
ƒ VMware’s suite of server virtualization products
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-4. Key concepts

© Copyright IBM Corp. 2020, 2021 1-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Key concepts • General Data Protection Regulation (GDPR)


ƒ GDPR is a European Union law on data protection. The GDPR's primary aim
is to give individuals control over their personal data and to simplify the
regulatory environment for international business.
• Open Virtual Appliance (OVA)
ƒ A virtual appliance is a pre-configured virtual machine image, ready to run
on a hypervisor. OVA files are used to store Open Virtualization Format files
for packaging and distributing virtual appliances or software to be run in
virtual machines.
• OAuth
ƒ OAuth (Open Authorization) is a token-based authorization protocol that
allows third-party websites or applications to access user data without
requiring the user to share personal information.
• YAML
ƒ YAML has been repurposed as YAML Ain't Markup Language. YAML is a data
serialization standard and is used for configuration files and applications
where data is being stored or transmitted.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-5. Key concepts

© Copyright IBM Corp. 2020, 2021 1-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
1.1. Overview of APIs and API Management

© Copyright IBM Corp. 2020, 2021 1-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Overview
w off APIss
and
d APII
Management

Figure 1-6. Overview of APIs and API Management

• An API is a public persona for a company or a product, where the API exposes business
capabilities and services. APIs form a bridge for interactions between services, such as
mainframe and databases and customer-facing services. APIs enable organizations to share
information with external developers, business associates, and other teams within the same
organization.
• APIs allow you to expose some functions of a program or service in a managed and secure
environment. API providers can share portions of their code with developers but do not have
to release everything for new applications and services to be developed. APIs from different
providers are be combined by developers to create new applications as well.
• A high-quality API facilitates the development of applications by allowing different
functionalities to be created independently while offering a complete set of capabilities for
development.

© Copyright IBM Corp. 2020, 2021 1-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

What is an API?
• What is an API?
ƒ An application programming interface is
WebApp
a collection of remote service operations that you Appliance Mobile
Device
make available to API consumers
ƒ In IBM API Connect, the API is a collection of Tablet

REST service operations


• What is an API consumer? API
Connected
Car
Your API
ƒ An API consumer is an application that calls Organization

remote operations in an API Websites


Enterprise
• What is an API provider? Apps

ƒ An API provider is an application or a system that


Smart
implements the REST service operation in an API Phone Partners

• What is an API gateway?


ƒ An API gateway manages access to a set of API operations
ƒ The gateway enforces service policies to restrict consumer access to APIs
Introduction to IBM API Connect 10 8 © Copyright IBM Corporation 2020, 2021

Figure 1-7. What is an API?

• The term “application programming interface (API)” is used in many areas of software
development. In the context of IBM API Connect, an API is a collection of service operations
that you make available on a network.
• In IBM API Connect, the API is a collection of REST service operations.
• Representation State Transfer (REST) is an architectural style that uses a simple set of
HTTP-based operations, such as GET, POST, PUT, and DELETE.
• API Connect also supports calling XML-based web services, which are another architectural
style.
• The clients that call these API operations are known as API consumers. The organization that
makes a set of services available is the API provider.
• The API gateway is between the API consumer and the API provider. This gateway server or
network appliance authorizes and regulates requests to the posted API services. It enforces a
set of rules, or services policies, that define how API consumers can access the API.

© Copyright IBM Corp. 2020, 2021 1-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Classification of APIs

Partner

Private
Public

• Share data sets • Open to • Internal APIs


and services selected are the
business predominant
• Foster
partners category of
relationships
APIs, as most
between • Designed to APIs start
internal and support access privately inside
external to specific organizations
developers business and later evolve
functions for public or
partner access.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-8. Classification of APIs

• Public (External) APIs


External APIs present the API provider or business an opportunity to share certain data sets,
services, and capabilities with developers to use the business’s assets to develop innovative
new applications and allow for existing applications and services to be modified. External APIs
help foster relationships between internal and external developers and drive the creation of
new applications and services that are not possible without the business publicly sharing
some of its data and services.
• Partner APIs
These APIs are open to select business partners of a company. They are designed for partners
to be able to access business functions in context to the business relationship. Examples
include the online catalog, ordering, and reconciliation. In this type of API, typically the
companies want to control who has access to the data they are exposing and want to have a
greater control over how the data is used.
• Private (Internal) APIs
Organizations use APIs internally or privately to develop new ways of operating and managing
their business. These internal APIs can be developed to more efficiently process internal
documents, manage processes, share information, account for assets, and other business
processes in order to drive increased productivity. Businesses also use internal APIs to build
publicly available applications.

© Copyright IBM Corp. 2020, 2021 1-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API Examples

Partner

Private
Public

• Twitter Ride Services • New employee


• Yelp • Find driver • Request days
• Facebook • Cancel ride off
• Google Maps • Paycheck
• Google Search Banks services
• Yahoo Finance • Get balance • Document
processing
• Update acct
• Payment
services

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-9. API Examples

© Copyright IBM Corp. 2020, 2021 1-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API Management use cases


• API management platforms benefit organizations in a number of ways. Here are a few
everyday use cases when implementing an API management solution:
• Supporting digital transformation strategies
ƒ API management is becoming an essential part of digital transformation strategies, giving
organizations the ability to create seamless connections between their digital assets. As businesses
continue to scale their day-to-day operations, it becomes necessary that they adopt new tools and
services that help them evolve their digital ecosystem.
• GDPR and compliance considerations
ƒ API gateways are a perfect way to address many of the GDPR requirements for data privacy and
compliance when accessing and moving large volumes of data. Gateways are designed to protect
user data and the access points as information is transmitted through an API.
• Ensuring data security
ƒ API management solutions are becoming the gold standard for securing API integrations in an
enterprise setting. Using a managed solution, enterprises can encrypt all of their data and require
signatures to ensure that the right users are accessing their data.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-10. API Management use cases

© Copyright IBM Corp. 2020, 2021 1-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Benefits of API management


• API management gives enterprises greater flexibility when reusing the functionality of API
integrations and helps save time and money without trading off security.
• By managing all of your APIs on one unified and centrally visible platform, enterprises can
easily share the API documentation and coding constructs between teams, significantly
reducing development costs and time to market.
• API management platforms also help to keep
existing services much safer by tracking API usage
and allowing for the integration of state-of-the-art
security protocols, including OAuth, JWT, and
OpenID.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-11. Benefits of API management

Once your APIs are externalized, you can explore new ways to use them to help drive revenue. In
addition to making it easy to implement a simple tiered monthly access model, API management
can assist with other revenue-driving models, including models based on transaction fees, zero
fees, and developer payments, as well as indirect revenue drivers like partnerships.

© Copyright IBM Corp. 2020, 2021 1-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Common business drivers for API initiatives

Speed Reach Internet of Things Domain

The speed To reach new markets Typically, domains refer to In many industries,
driver focuses and obtain new interactions across devices are used
on allowing the customers, you can make multiple lines of business. along with APIs to
business and IT APIs available to other Lines of business can provide new and
organization to enterprises, such as largely work innovative
run at different partners who, through independently but benefit solutions.
speeds. their interaction with by sharing data or the
clients, can generate occasional need to share
additional revenue and data.
new customers for your
enterprise.
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-12. Common business drivers for API initiatives

© Copyright IBM Corp. 2020, 2021 1-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
1.2. IBM API Connect V10 overview

© Copyright IBM Corp. 2020, 2021 1-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

IBM
M APII Connectt 10
0
overview

Figure 1-13. IBM API Connect V10 overview

© Copyright IBM Corp. 2020, 2021 1-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

IBM API Connect overview


• What is IBM API Connect?
ƒ IBM API Connect is an integrated solution that includes creating, running, managing, and securing
APIs for a range of applications in a digital environment.

• What does IBM API Connect provide?


ƒ Automated, visual, and coding options for creating APIs
ƒ Node.js Loopback framework support for generating API
implementations
ƒ Creation of models and APIs from diverse data sources
ƒ Lifecycle and governance for APIs, products, and plans
ƒ Advanced API usage analytics and reporting
ƒ Customizable, self-service Developer Portal for publishing APIs
ƒ Policy enforcement, security, and control provided by the IBM
DataPower Gateway

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-14. IBM API Connect overview

• IBM API Connect is an integrated API management offering, with capabilities and tooling for
all phases of the API lifecycle. Key steps of the API lifecycle include create, secure, manage,
socialize, and analyze. IBM API Connect Version 10 delivers enhanced capabilities for the
market-leading IBM API management solution. In addition to the ability to deploy in complex,
multi-cloud topologies, this version provides enhanced experiences for developers and cloud
administrators in your organization.
• IBM API Connect has two main focuses: the first is providing best in class API Management
tooling, and the second is having a cloud native solution. This allows users to create, manage,
and secure applications that are deployed across various on-premises and cloud
environments.

© Copyright IBM Corp. 2020, 2021 1-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Components of API Connect

Gateway API Manager Developer Portal Analytics

API Connect uses IBM API manager is an Share your APIs with API analytics is built
DataPower Gateway intuitive user interface application on the Kibana V5.5.1
to provide the that lets you manage developers through a open source analytics
gateway service. IBM APIs for internal use, company-branded and visualization
API Connect provides or to externally portal. Developers can platform, which is
two gateway types, monetize and manage discover and designed to work with
DataPower API services as REST or subscribe to APIs as the Elasticsearch real-
Gateway and SOAP APIs. well as register and time distributed
DataPower Gateway deploy associated search and Analytics
(v5 compatible). applications. Engine.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-15. Components of API Connect

API Connect has four major components: Gateway, API Manager, Developer Portal, and Analytics.
These four components can be deployed in various hybrid and multi-cloud topologies. The API
Connect components provide a unified user experience across the API lifecycle. Changes in one
stage of the API lifecycle are automatically reflected in the other components of API Connect.
Gateway
• Gateways enforce runtime policies to secure and control API traffic, provide the endpoints
that expose APIs to the calling applications, and provide assembly functions that enable APIs
to integrate with various endpoints. They also log and report all API interactions to the API
Connect Analytics Engine, for real-time and historical analytics and reporting. The following
Gateway is available for use in API Connect: The DataPower Gateway is an enterprise API
Gateway that is built for departments and cross-enterprise usage. This Gateway provides a
comprehensive set of API policies for security, traffic management, mediation, acceleration,
and non-HTTP protocol support. The DataPower Gateway is deployed on a virtual or physical
DataPower appliance and supports multiple catalogs per instance or cluster. The DataPower
Gateway can handle enterprise-level complex integration and supports containers for flexible
runtime management.
• Your API Connect offering (or edition) can include a virtual DataPower Gateway, and support
for a physical DataPower Gateway is also available, subject to certain conditions.
API Manager
• The API Manager provides a user interface that facilitates promotion and tracking of APIs that
are packaged within Products and Plans. API providers can move the Products through their
lifecycle and manage the availability and visibility of APIs and Plans.
• Catalogs and Spaces are created in the API Manager to act as staging targets through which
APIs, Plans, and Products are published to consumer organizations. API providers can stage

© Copyright IBM Corp. 2020, 2021 1-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
their Products to catalogs or Spaces, and then publish them to make the APIs in those
Products visible on a Developer Portal for external discovery.
• To control access to the available API management functions, users in the provider
organization can be set up in the API Manager UI with assigned roles and permissions. API
providers can also use the UI to manage the consumer organizations that sign up to access
their APIs and Plans. Additionally, developer communities can be created as a way of grouping
a collection of consumer organizations to whom a particular set of Products and Plans can be
made available.
• The API Manager UI also includes functions to manage the security of the API environment
and provides access to analytics information about API invocation metrics within
customizable dashboard views.
Developer Portal
• The Developer Portal provides a customizable self-service web-based portal to application
developers to explore, discover, and subscribe to APIs.
• When API providers publish APIs in the API Manager, those APIs are exposed in the Developer
Portal for discovery and usage by application developers in consumer organizations.
Application developers can access the Developer Portal UI to register their applications,
discover APIs, use the required APIs in their applications (with access approval where
necessary), and subsequently deploy those applications.
• The Developer Portal provides additional features, such as forums, blogs, comments, and
ratings, for socialization and collaboration. API consumers can also view analytics information
about the APIs that are used by an application or used within a consumer organization.
Analytics
• API Connect provides the capability to filter, sort, and aggregate your API event data. This
data is then presented within correlated charts, tables, and maps, to help you manage service
levels, set quotas, establish controls, set up security policies, manage communities, and
analyze trends. API analytics is built on the Kibana V5.5.1 open source analytics and
visualization platform, which is designed to work with the Elasticsearch real-time distributed
search and Analytics Engine.

Important

All Management appliances in an API Connect cloud must run at the same firmware level as each
other. Gateway appliances can run on different firmware levels to each other, but it is
recommended that all of the Gateway appliances that are run on the same level as each other.

© Copyright IBM Corp. 2020, 2021 1-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API Connect user interfaces: By function

User interface Function Screen capture

Cloud Manager Configure resources

Create, assemble,
stage, publish, retire,
API Manager
archive, and version
APIs

Developer Search for APIs and


Portal register applications

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-16. API Connect user interfaces: By function

API Connect provides built-in user interfaces to access cloud-based resources:


• Cloud Manager: The graphical user interface that is used to configure and manage the
resources of the on-premises cloud.
• API Manager: A graphical user interface that facilitates the creation, versioning, and lifecycle
management of APIs.
• Developer Portal: A portal where APIs are published to encourage the development of new
applications.

© Copyright IBM Corp. 2020, 2021 1-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Cloud Manager user interface


Enables a Cloud Administrator to configure, and manage the API Connect on-premises cloud
• Configure:
ƒ Declare settings such as timeout values for
invitations to join an organization
ƒ Configure member roles and role defaults
ƒ Define user registries
ƒ Define provider organizations
ƒ Connect to an existing SMTP mail server
ƒ Configure endpoints for the analytics, gateway, and
portal services
• Manage
ƒ Register new services and manage existing services
ƒ Manage Transport Layer Security (TLS) server and
client profiles
ƒ Manage provider organizations
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-17. Cloud Manager user interface

You configure and manage the servers that comprise your IBM API Connect on-premises cloud by
using the Cloud Manager user interface.
• The first time that you access the Cloud Manager user interface, you are prompted to change
the cloud administrator password and address. The initial password change is already done
for you in the course exercises.
• The default user registry for Cloud Manager is an API Connect internal registry.
• This registry holds the administrator account and any other users that you define to manage
the on-premises cloud.
These Cloud Manager administration tasks are already done on the student image where the
exercises are run.
You can use the Cloud Manager to define the API Connect cloud with these functions:
• Create Provider organizations and invite a user to serve as the owner
• Create and manage user roles and role defaults
• Create availability zones for services
• Register the relevant gateway, analytics, and portal services within availability zones to
securely create, publish, and track APIs.
• Associate an analytics service with a gateway to enable reports for API Events
• Configure resources for user authentication, TLS security, and OAuth providers and make the
resources visible to all or selected provider organizations
• Connect to an existing SMTP mail server and edit templates for system-generated emails
• Set the default gateway service for catalogs

© Copyright IBM Corp. 2020, 2021 1-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
You get to perform some of these functions and review the configuration for the on-premises
cloud in the first exercise.
More about consumer and provider organizations is covered in the next unit.

© Copyright IBM Corp. 2020, 2021 1-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

IBM API Connect deployment options


There are three ways in which you can deploy API
Connect:
Deploying on Kubernetes
• Runtime that is used in course lab environment
• Uses Docker containers that are orchestrated by
Kubernetes
Deploying on OpenShift
• You can install API Connect in an OpenShift
environment and as part of IBM Cloud Pak for
Integration.
Deploying into a VSphere environment
• Deploy by using OVA files

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-18. IBM API Connect deployment options

• The API Connect infrastructure is either deployed and managed by an IBM team in an IBM
Cloud environment, or it is deployed and managed by the customers in their own dedicated
environment or third-party cloud. There is also the option for having hybrid scenarios, for
example, with the API Connect Reserved Instance Offering, users are able to have their API
Manager and Developer Portal running in the IBM Cloud, but then place remote gateways next
to their back-end services.
• For the exercises in this class, IBM API Connect was deployed to the Kubernetes runtime
environment. The API Connect product is fully installed at the start of the class and students
only need to configure some of the settings in Cloud Manager.

© Copyright IBM Corp. 2020, 2021 1-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Installation considerations
• Stand-alone API Analytics component to scale
independently based on API project growth
• Zero to N portal clusters can be configured to an API Connect
deployment to align with API project growth
• Native install of API Connect toolkit for enhanced user
experience
• V5 to V10 Upgrade through automated migration scripts with
a parallel stack setup that follows modern software practices
• Single Manager Cluster per API Connect Cloud, as it is the
brain of the API Management system
• Manager can span multiple Availability Zones, giving
flexibility in deployment scenarios
• Multiple Portal, Analytics and Gateway Cluster per Cloud,
and are scoped to an Availability Zone
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-19. Installation considerations

To ensure that your IBM API Connect Cloud Functions, your cloud must have the necessary
system requirements to support the installation. During the installation process, the components
of IBM API Connect can be configured to satisfy your requirements.

© Copyright IBM Corp. 2020, 2021 1-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Installation utility program (APICUP)


• Install Assist tool contains the APICUP installation utility
program, which provides an automated installation process for
API Connect
• Install Assist provides a script-based installation into the
Kubernetes runtime environment
ƒ YAML-based installation script
ƒ Reference the YAML file when you are registering services in Cloud
Manager
• The APICUP installer creates charts and secrets that are
managed by Helm.
• Using APICUP, you can generate an installation plan and
confirm it is correct before running the installation. You can
then install the subsystem from the plan.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-20. Installation utility program (APICUP)

• API Connect V10 can be installed by using the Install Assist installation method.
• The Install Assist tool provides script-based installation into a Kubernetes runtime
environment.
• The Install Assist tool contains the APICUP installation utility program.
• An example of the apiconnect-up installation utility programs is shown.
• Reference the endpoints that are defined in the installation utility program when you register
the Analytics, Gateway, and Portal services in Cloud Manager.

© Copyright IBM Corp. 2020, 2021 1-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
1.3. API lifecycle management

© Copyright IBM Corp. 2020, 2021 1-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

APII lifecycle
e
management

Figure 1-21. API lifecycle management

© Copyright IBM Corp. 2020, 2021 1-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API lifecycle (1 of 2)
With IBM API Connect, you can manage APIs through the API lifecycle.
• Define and import REST or SOAP Create Run

services so that customers can evolve


their existing corporate assets. Secure Manage

• Package APIs into product groupings


to target specific development teams
or consumer organizations.
• Publish and promote products and APIs across
different catalogs to align with DevOps practices.
• API lifecycle and version management from the
initial staging of the APIs to deprecation and
retirement to meet corporate governance needs.
• API subscription and application access control.
Corporations need to control the access to the
APIs and impose rate limits on API use.
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-22. API lifecycle (1 of 2)

With API Connect, you can perform all of the lifecycle steps in a single integrated offering,
removing the requirement to use multiple API management offerings to obtain the same
capability. API Connect includes the following key capabilities to cover the lifecycle of an API:
• Automated, visual, and coding options that API providers can use to create scalable APIs
• Node.js and Java support for creating microservices applications and APIs with integrated
tooling
• Integrated enterprise grade clustering, management, and security for Node.js and Java
• Lifecycle management and governance for APIs
• Set pricing details in plans to define revenue-producing subscription plans for your APIs
• Access control over APIs for both API providers and consumers by using role-based
permissions, API packaging constructs, and subscription and community management
• Customizable, self-service portals for publishing APIs for discovery and use
• Runtime enforcement of built-in and user-defined policies, and mechanisms to secure,
control, and optimize API traffic
• API usage analytics for both API providers and consumers, with runtime and historical
reporting on usage patterns and performance metrics

© Copyright IBM Corp. 2020, 2021 1-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API lifecycle (2 of 2)
• Create and run APIs
ƒ Develop and write the API definition and implementation and test the API. C reate Run

• Secure and control APIs


Secure Manage
ƒ Incorporate access control, monitoring, and logging to properly secure the API.

• Manage APIs
ƒ Create and manage self-service portals that expose the API-to-API consumers.
ƒ Monitor the set of rules and conditions that govern the API to ensure it is fulfilling its intended purpose
and adjust if necessary.
ƒ Retire and archive the API when appropriate.

• Socialize APIs
ƒ Socializing the APIs means that the APIs can be browsed and tested on the Developer Portal.

• Analyze APIs
ƒ The analytics that are provided with API Connect provide you with visibility into API usage.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-23. API lifecycle (2 of 2)

• Create and run APIs


▪ In the API Manager, you can add a REST API definition either by composing the API
definition, and its operations, from scratch, or by importing an OpenAPI definition file. You
can also use the tooling to quickly create a proxy API that calls an existing endpoint.
▪ If you have an existing SOAP service that you want to expose more widely, you can add a
SOAP API to IBM API Connect. You can use the Developer Portal to publicize the SOAP
service to the developers. If a developer wants to use the SOAP API, you can use API
Connect to manage their sign-up and access to the service and track the usage of that API.
• Secure and control APIs
▪ The API gateway enforces a set of security and message processing policies that you
defined in the API gateway.
- Purpose-built, secure, and scalable gateway to enforce API policies at run time
- Comprehensive set of built-in security, traffic management, and mediation policies
- Ability to define custom user-defined policies with a gateway script
▪ You can choose the gateway type that meets your requirements. For example, the
DataPower API Gateway generates and validates JSON Web Tokens, WS-Security
metadata, and OAuth 2.0 authorization tokens.
▪ The gateway also manages call quota and rate limits and transformations between
message formats and transport protocols.
• Manage APIs
▪ The API Management server manages the configuration and metadata on your published
APIs.

© Copyright IBM Corp. 2020, 2021 1-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
▪ Catalogs separate APIs according to their state in development or production.
▪ Spaces can be used to group APIs by development group or line of business.
▪ You review or update API versions and lifecycle events through the API Manager web
interface. You share and make your APIs available to consumers on the Developer Portal.
▪ Analyze API usage data to gain visibility and insight
• Socialize APIs
▪ You socialize your APIs by using a Developer Portal. Socializing the APIs means that the
APIs can be browsed and tested on the Developer Portal. For your application developers,
the Developer Portal provides a highly customizable website to review, subscribe, and test
APIs.
▪ The Developer Portal is based on Drupal, which is a free and open source platform that you
can use to manage the content of your website. The Developer Portal that is part of the API
Connect software includes blogs, forums, and ratings for APIs as part of the standard
offering.
▪ Developers can create client applications after they are authorized to sign on to the
Developer Portal. Developers can use a set of developer community tools to share
information. Application developers can browse available APIs, view the API details, and
test API operations. Application developers can also register applications, generate API
keys, and view analytics on API usage.
• Analyze APIs
▪ The analytics that are provided with API Connect provide you with visibility into API usage.
▪ Retrieve API analytics in a dashboard view, based on the Elastic Stack open source
project.
▪ API providers can retrieve API analytics in a customizable dashboard view that displays
visualizations that include API call volumes, error rates, and response times. Provider
analytics can be viewed from the API Manager user interface. Consumer API analytics can
be viewed from the Developer Portal.

© Copyright IBM Corp. 2020, 2021 1-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API roles and the development workflow


1. API Developers create and run APIs
by using API Manager. An API Product Create Run

Manager oversees the management


and socialization of the APIs. Secure Manage
API Product Application
2. API Developers deploy APIs to the Manager Developer
API Gateway. IBM DataPower secures 1 3 4
the APIs and acts as the API Gateway. Create Manage &
& Run Socialize
3. API Developers socialize their APIs, API Developer
packaging them into products and Manager Portal Legend
publishes them to the Developer API Development
API Management
Portal. API Usage
API
4. Application Developers consume Developer
APIs by using the Developer Portal. 5
2 API Gateway
5. Application Users run the secured Deploy Target Secure APIs Application
Application
APIs. endpoint
User
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-24. API roles and the development workflow

This slide depicts the workflow that is associated with the development, management,
socialization, and use of APIs in API Connect.
• The top portion of the workflow depicts the overall development of the API.
▪ Create & Run, Manage & Socialize
• The bottom portion depicts the runtime use of the API.
▪ Deploy, Secure APIs
• The left portion of the workflow includes users of API Connect to build and manage their APIs.
▪ API Developer
▪ API Product Manager
• The right portion of the workflow depicts Developers and users of the APIs.
▪ Application Developer
▪ Application User

© Copyright IBM Corp. 2020, 2021 1-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
1.4. Configuring the cloud topology

© Copyright IBM Corp. 2020, 2021 1-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Configuring
g the
e
cloud
d topology

Figure 1-25. Configuring the cloud topology

© Copyright IBM Corp. 2020, 2021 1-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

What is the API Connect Cloud?


The API
Connect cloud
The API Management • The API Connect Toolkit is
is a collection service maintains the a set of development tools
of services that runtime configuration of that run on the API
make up an the API Connect Cloud: developer’s workstation
the servers, the API, the • It can stage, publish, and
API Connect Management
plans, and products
API Connect
service Toolkit test APIs in the API
installation, Connect Cloud
including
configuration
information
• The API Gateway • The Developer Portal is a
and metadata. secures runtime repository for published
access to APIs API definitions, plans, and
• It enforces a set of products
API Gateway
message processing Developer
• Application developers
policies against API Portal register apps that use APIs
requests on the portal

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-26. What is the API Connect Cloud?

The API Connect Cloud is a collection of services that make up an API Connect installation,
including configuration information and metadata.
• The API Management service maintains the runtime configuration of the API Connect Cloud:
the servers, the API, the plans, and products.
• The API Gateway secures runtime access to APIs. It enforces a set of message processing
policies against API requests.
• The API Connect Toolkit is a set of development tools that run on the API Developer’s
workstation. It can stage, publish, and test APIs in the API Connect Cloud.
• The Developer Portal is a repository for published API definitions, plans, and products.
Application developers register apps that use APIs on the portal.
• The Analytics Service (not shown) provides visibility into API usage.

© Copyright IBM Corp. 2020, 2021 1-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API Connect cloud topology (1 of 2)


The API Connect
Platform APIs Gateway layer Management layer
cloud is:
ƒ The combination of
V
virtual appliances
(v
V ) or Docker
V
containers that are V
needed to host your
APIs
ƒ A set of servers and
services that are
provided by an API
Connect
installation, Platform APIs allow other API configurations are The management layer
whether it is products to interact with deployed to the gateway, embodies the capability
the API Management which provides the for organizations to define,
installed on- system enforcement point for manage, and control APIs
premises or hosted runtime policies to control
as a cloud-based API traffic
service
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-27. API Connect cloud topology (1 of 2)

• When you install IBM API Connect, you define an on-premises cloud. To determine the
topology of appliances for this cloud, consider the number of Management and Gateway
services that are required to address your API needs.
• The Gateway provides the enforcement point for runtime policies to control API traffic.
• The Management layer embodies the capability for organizations to define, manage, expose,
and control APIs.
• At least one Management service and one Gateway service are required to create a cloud
capable of running the API Connect solution.
▪ It’s in the management layer where you create, manage, and run your APIs.
• Not shown in the figure is the consumer organization components that include the Developer
Portal.
• IBM API Connect has a range of installation and management options that range from
on-premises through hosted services that run on the public IBM Cloud architecture.
• IBM API Connect is an on-premises, single, or multi-organization, cloud-based solution.
• The on-premises solution runs in-house on the customer's network, hardware, and software
infrastructure.
• The on-premises cloud can be a combination of new and existing physical appliances and
virtual appliances or can be entirely composed of virtual appliances.

© Copyright IBM Corp. 2020, 2021 1-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API Connect cloud topology (2 of 2)

• The Cloud Manager


topology consists of Management Service
availability zones
that contain the API Gateway Service Gateway Service Gateway Service
Connect services.
• Availability zones
can contain one or
more gateway Analytics Service Analytics Service Analytics Service
services, analytics
service, and portal
service, but there is
one management Portal Service Portal Service Portal Service
service that spans
all availability
zones.
Availability zone Availability zone Availability zone
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-28. API Connect cloud topology (2 of 2)

• A default availability zone is created during installation that includes a Management service.
• An availability zone is a logical or physical set of data centers that contain one or more API
Connect services. Availability zones provide redundancy and failover in the event of network
issues.
• The management service is the control point. Within each availability zone, you can configure
extra components for scalability

© Copyright IBM Corp. 2020, 2021 1-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API Connect cloud and user interfaces


1. The API Manager user
interface provides API Manager Developer Portal
1 2
authorized access to the
APIs, Products, and plans
and related linked
services capability for the
API provider.
2. The Developer Portal
provides access for
consumer organizations to
the Products, plans, and Provider Consumer
APIs that are published by organizations organizations
an API provider Provide APIs Use APIs
organization to a catalog.
3. The Cloud Manager user 3
interface provides access V Email
for authorized users to Cloud server
administer the servers and Manager Cloud User Configuration
Clusters registry
user registries that make administrator of servers or
containers Identity provider
up the cloud
infrastructure. Cloud
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-29. API Connect cloud and user interfaces

The diagram shows the infrastructure and organizations for an API Connect on-premises cloud.
1. The API Manager user interface provides authorized access to the APIs, Products, and plans
and related linked services capability for the API provider.
2. The Developer Portal provides access for consumer organizations to the Products, plans, and
APIs that are published by an API provider organization to a catalog.
3. The Cloud Manager user interface provides access for authorized users to administer the
servers and user registries that make up the cloud infrastructure.

© Copyright IBM Corp. 2020, 2021 1-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Stand-alone topology
• Non high-availability (HA), single instance deployment
Gateway
• Single instance of each component that is defined for a non-HA instance
deployment
• Non-HA deployment suitable for small projects and workloads
Analytics
• HA deployment is recommended for larger projects and workloads, instance
running critical applications
• One API Management cloud with Single Instance of each component
• Can be deployed on the same physical machine or can be a hybrid Manager
cloud setup instance

Portal
instance

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-30. Stand-alone topology

• Depending on what you want to use your API Connect cloud for, consider the topology that
you want to implement.
• For small projects, install a single instance of each component by specifying the deployment
mode of dev in the Install Assist YAML file. The other mode option is standard.
• The stand-alone topology was used to create the environment for the course exercises.

© Copyright IBM Corp. 2020, 2021 1-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
1.5. Registering services in Cloud Manager

© Copyright IBM Corp. 2020, 2021 1-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Registering
g servicess
in Cloud
d Manager

Figure 1-31. Registering services in Cloud Manager

© Copyright IBM Corp. 2020, 2021 1-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Services that are registered in Cloud Manager


• Gateway Service, Portal Service, and Analytics Service are registered
• The default availability zone contains the Management Service.
• When the Gateway Service,
Portal Service, and Analytics
Service are registered, the
API Connect Cloud is
configured for the stand-
alone topology that is used
in the class exercises.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-32. Services that are registered in Cloud Manager

© Copyright IBM Corp. 2020, 2021 1-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Configure the cloud environment: SMTP server


• To define the email server, select the Resources option
ƒ Then, selected Notifications

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-33. Configure the cloud environment: SMTP server

• In the Cloud Manager, you configure an email server from the Resources > Notifications
option.
• You must configure an email server in Cloud Manager.
• Email notifications are sent for invitations for members to join a provider organization or a
consumer organization. The member joins the organization by responding to the activation link
that is sent in the email message.
• In the example on the page, the smtp server is configured as the email server.

© Copyright IBM Corp. 2020, 2021 1-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Configure the cloud environment: Endpoints


• View endpoint settings from Cloud Settings
• API Manager endpoint is the URL used to sign on to the API Manager user interface

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-34. Configure the cloud environment: Endpoints

• In Cloud Manager, the Cloud Settings option in the navigation menu is used to configure the
cloud environment.
• From the Endpoints option, you can view the endpoints that are configured for the cloud
environment.

© Copyright IBM Corp. 2020, 2021 1-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
1.6. Configuring the DataPower Gateway

© Copyright IBM Corp. 2020, 2021 1-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Configuring
g the
e
DataPowerr Gateway

Figure 1-35. Configuring the DataPower Gateway

• Before registering a Gateway service in Cloud Manager, the DataPower API Connect Gateway
Service must either be installed as a subsystem in your Kubernetes cluster or enabled on the
DataPower appliance.
• This section provides a high-level overview of the DataPower Gateway service. API Connect is
built on top of IBM DataPower. Courses on DataPower are offered as part of the IBM
Automation Education. For more courses on DataPower, refer to the IBM Automation
Education Course Information Page: https://ibm-learning-skills-dev.github.io.

© Copyright IBM Corp. 2020, 2021 1-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API Gateway (DataPower)


API Management Solution
Management endpoint
• URL that the Management
server connects to the
gateway

Consumer Provider
organizations organizations

Business
nes
ss
partners
ners API Gateway
(IBM
( DataPower Gateway)
t )

API invocation endpoint


Mobile & • Base portion of the URL
Web Apps App / API Provider,
• A public address appended Middleware, Data store,
Enterprise with paths that are specific to z System
Apps
your API calls On-premise or Cloud
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-36. API Gateway (DataPower)

• Business partners and application developers (left side) use the Developer Portal to access
APIs by API programmers (right side) that develop APIs in the product.
• Business partners and application developers (left side) consume APIs and are members of
consumer organizations.
• API programmers build APIs and are members of provider organizations. API programmers
socialize and productize their APIs for consumers on the Developer Portal.

© Copyright IBM Corp. 2020, 2021 1-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

AP gateway types
IBM API Connect provides two gateway types, DataPower API Gateway and DataPower
Gateway (v5 compatible)

• DataPower API Gateway


ƒ Consider that use this gateway if you
are running applications in a public or
private cloud and want to use them as
APIs
• DataPower Gateway (v5 compatible)
ƒ Consider using this gateway if you are
an existing DataPower user and want
to use your DataPower resources and
knowledge

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-37. AP gateway types

IBM API Connect provides two gateway types, DataPower API Gateway and DataPower Gateway
(v5 compatible).
• DataPower API Gateway:
▪ The DataPower API Gateway is a new gateway that is designed with APIs in mind, and with
the same security focus as DataPower Gateway (v5 compatible).
▪ The DataPower API Gateway was built and optimized for the cloud. Consider to use this
gateway if you are running applications in a public or private cloud and want to use them as
APIs.
• DataPower Gateway (v5 compatible):
▪ Available with IBM API Connect for a number of years
▪ Broad range of policies
▪ More flexible when custom policies are required
▪ DataPower Gateway (v5 compatible) has been available with IBM API Connect for a
number of years. This gateway provides a broad range of policies that are built into the API
Connect API assembly, including transformations, security policies, logic, and
GatewayScript.
▪ Consider that use this gateway if you need custom policies or you have complex API
assembly requirements.
• The DataPower API Gateway is used in the course exercises.

© Copyright IBM Corp. 2020, 2021 1-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

API gateway types comparison

Feature DataPower Gateway (v5 compatible) DataPower API Gateway


Native policies No Yes
OAuth provider Full OAuth 2.0 Support Full OAuth 2.0 Support
OAuth policy No Yes
OpenID Connect Supported through a template Supported natively
Invoke policy Yes Yes
Custom policies Yes Yes
Conditional policies if, operation-switch, switch switch
Implicitly executed at the end of API Configured in the API design, outside of
Activity logging
assembly the API assembly.
Parse policy (threat detection) No Yes
Gateway extensions Yes Yes
Support for mutual TLS (mTLS) Yes Yes

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-38. API gateway types comparison

© Copyright IBM Corp. 2020, 2021 1-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

DataPower Gateway security


• Signed and encrypted gateway image without external software dependencies to minimize
risk
• Well-established API security policies to protect services and data across multi-clouds
• Scalable architecture to help meet high-availability workloads
• Optimized built-in policies for security, traffic management, and mediation
• Workload tenant isolation to optimize governance on a single appliance across multiple
lines of business

Secure, scalable, and optimized

IBM DataPower Gateway Virtual


IBM DataPower Gateway
Edition

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-39. DataPower Gateway security

© Copyright IBM Corp. 2020, 2021 1-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

DataPower in the cloud


• The DataPower Gateway is available in cloud, physical, virtual appliance, Linux, and Docker
form factors
• When DataPower runs in the cloud, it is running under a hypervisor, in Linux, or in a Docker
container
• DataPower in a Docker container is supported in:
ƒ IBM Cloud
ƒ Amazon Web Services (AWS)
ƒ Google Cloud
ƒ Microsoft Azure

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-40. DataPower in the cloud

• The DataPower Gateway is available in multiple form factors, including cloud, physical or
virtual appliance, Linux-based, and as a Docker image.
• All the DataPower form factors provide the same level of robustness and scalability.
• The Docker form factor has some limitations.
• The DataPower Gateway for Developers on Docker is targeted to developers that want to
perform local testing with a DataPower Gateway.

© Copyright IBM Corp. 2020, 2021 1-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Unit summary • Describe the key capabilities of API Connect

• Describe what an API is and the different classifications of APIs

• Explain the key benefits and use cases of API management

• Describe how API Connect manages APIs through the entire API lifecycle

• Identify the components of an API Connect on-premises cloud

• Describe the use of the Cloud Manager user interface to administer the cloud topology and
resources

• Describe the different gateway types for securing and managing APIs

• Review the topology of an API Connect cloud

• Explain how DataPower secures the API Gateway

• Describe the roles and activities involved in the development of an API

• Identify the requirements for installing an API Connect on-premises cloud

• Describe the API Connect user interfaces by function

• Identify deployment options for API Connect at installation

• Describe the function of the installation assist utility

• Identify the components of the runtime environment

© Copyright IBM Corporation 2020, 2021

Figure 1-41. Unit summary

© Copyright IBM Corp. 2020, 2021 1-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Review questions
1. True or False: API Connect enables both the creation of APIs and the full lifecycle
management of APIs.

2. What is the role of the API gateway?


a. It secures API endpoints
b. It manages and monitors API traffic
c. It transforms API requests and responses
d. All of the above

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-42. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 1-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Review questions
3. Which capability can you find in the DataPower Gateway (v5 compatible) but not the
DataPower API Gateway?
a. GatewayScript support
b. Rate limiting
c. Message transformation
d. Custom user-defined policies

4. All of the following are user interfaces of API Connect except:


a. Cloud Manager
b. API Manager
c. Gateway Manager
d. Developer Portal

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-43. Review questions

Write your answers here:


3.
4.

© Copyright IBM Corp. 2020, 2021 1-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Review answers
1. True or False: API Connect enables both the creation of APIs and the full lifecycle
management of APIs.
The answer is True.

2. What is the role of the API gateway?


a. It secures API endpoints
b. It manages and monitors API traffic
c. It transforms API requests and responses
d. All of the above
The answer is D.

Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-44. Review answers

© Copyright IBM Corp. 2020, 2021 1-54


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Review answers
3. Which capability can you find in the DataPower Gateway (v5 compatible) but not the
DataPower API Gateway?
a. GatewayScript support
b. Rate limiting
c. Message transformation
d. Custom user-defined policies
The answer is D.

4. All of the following are user interfaces of API Connect except:


a. Cloud Manager
b. API Manager
c. Gateway Manager
d. Developer Portal
The answer is C.
Introduction to IBM API Connect 10 © Copyright IBM Corporation 2020, 2021

Figure 1-45. Review answers

© Copyright IBM Corp. 2020, 2021 1-55


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty
Exercise: Reviewing the API Connect development and
runtime environment

Figure 1-46. Exercise: Reviewing the API Connect development and runtime environment

In this exercise, you test that you can access the Internet and that your private domain name
service is working. You review and validate that the Kubernetes runtime environment and API
Connect processes are running. Then, you sign on as the administrator to the Cloud Manager user
interface and review the cloud topology

© Copyright IBM Corp. 2020, 2021 1-56


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 1. Introduction to IBM API Connect 10

Uempty

Exercise • Review the network connectivity and domains


objectives • Review the Kubernetes certificates
• Review the Kubernetes runtime environment
• Review the API Connect installation file
• Review how notifications are configured
• Review the configured services in Cloud Manager Console
• Review the provider and consumer organization settings and user
registries

© Copyright IBM Corporation 2020, 2021

Figure 1-47. Exercise objectives

© Copyright IBM Corp. 2020, 2021 1-57


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Unit 2. Managing catalogs and


organizations
Estimated time
01:00

Overview
Users in consumer organizations subscribe to products, plans, and APIs that you create in API
Connect. In this unit, you learn how to define a catalog and Developer Portal in API Manager. You
see where the Developer Portal user registry is defined. You then create a consumer organization
in the API Manager and review the Developer Portal user interface.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 2-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Unit objectives • Describe the interaction between organizations and catalogs


• Explain the concept of a provider organization
• Explain how to create a catalog and a Developer Portal
• Describe the use of spaces within a catalog
• Configure a Developer Portal for the catalog
• Identify the administration menu options in the Developer Portal
• Describe the relationship between the provider organization owner and
the owner of the consumer organization
• Describe how to create a consumer organization
• Describe the management options that are available to the owner of a
consumer organization in the Developer Portal
• Describe how to add a member in the Developer Portal
• Describe the consumer roles that are defined in API Manager
• Identify the roles that are defined in the Developer Portal
• Explain the password lockout criteria © Copyright IBM Corporation 2020, 2021

Figure 2-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 2-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Topics • Overview of organizations and catalogs


• Creating a catalog
• Creating a consumer organization
• Creating a Developer Portal
• Assigning roles and permissions

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-2. Topics

© Copyright IBM Corp. 2020, 2021 2-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty
2.1. Overview of organizations and catalogs

© Copyright IBM Corp. 2020, 2021 2-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Overview
w off
organizationss
and
d catalogs

Managing
M
Ma
Mana
ana
ag
giing
ng ccatalogs
atta
allog
gs a
an
and
nd o
or
organizations
rga
gan
niiza
attiio
onns © Copyright IBM Corporation 2020, 2021

Figure 2-3. Overview of organizations and catalogs

© Copyright IBM Corp. 2020, 2021 2-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Structure of organizations and catalogs

Published plans and APIs Provider organization

Production
catalog
Published plans and APIs

Consumer organization

Test

Sandbox development
catalog
Developers
Developer Portal
Users'
apps
API developers

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-4. Structure of organizations and catalogs

• To become available to consumers, APIs must be staged and published to a catalog. A catalog
has an associated developer portal.
• After you create and test APIs, you publish one or more plans to expose the plan and API
resources on the Developer Portal.

© Copyright IBM Corp. 2020, 2021 2-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Organizations (1 of 2)
• Users can belong to one or more organizations
ƒ Users work on the APIs or applications that belong to the organization
• Provider organization
ƒ These organizations own APIs and associated plans
ƒ Defines members who can work on products, plans, and APIs
ƒ Members in the provider organization work mainly with the developer toolkit and the API Manager
user interfaces
ƒ Pre-configured roles are set in Cloud Manager
ƒ Initial provider organization is defined in Cloud Manager
ƒ Consumer organization
ƒ Members in these organizations use the APIs by creating applications that call the APIs
ƒ Pre-defined default roles are set in Cloud Manager
ƒ Initial consumer organization for a catalog is defined in API Manager

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-5. Organizations (1 of 2)

The providers and the consumers of APIs can be categorized into different roles.
• An API or software developer in the organization is responsible for implementing the API
operations. The API developer uses the API Connect Toolkit to develop, test, and publish
APIs, applications, plans, and products.
• The API product manager or organization owner is the owner of a provider organization. This
role is responsible for the review and approval of lifecycle changes within the API Manager
web user interface.
• The application developer (or app developer) builds an application that uses published APIs.
The app developer subscribes to APIs in the Developer Portal.
• The application user uses the application and its associated APIs that the app developer
creates.

© Copyright IBM Corp. 2020, 2021 2-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Organizations (2 of 2)
• APIs and Products are owned by a
Provider provider organization. They exist as
organization authored artifacts visible in the API
Products Sandbox catalog Manager. To become available to
Plans APIs
Portal consumers, APIs must be deployed to a
catalog and published to some or all
Deployed Products and APIs
organizations. A catalog has an associated
developer portal and runtime capability.
• A provider organization can have multiple
Users Portal
Portal
catalogs such as a sandbox catalog and a
Development catalog development catalog.
Apps
• Apps are registered to consume APIs via a
Deployed Products and APIs
selected plan, which determines the API
quota.
Apps Users
Consumer organization • A provider organization can have apps
that consume APIs from another provider.

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-6. Organizations (2 of 2)

© Copyright IBM Corp. 2020, 2021 2-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty
2.2. Creating a catalog

© Copyright IBM Corp. 2020, 2021 2-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Creating
ga
catalog

Managing
M
Ma
Mana
ana
ag
giing
ng ccatalogs
atta
allog
gs a
an
and
nd o
or
organizations
rga
gan
niiza
attiio
onns © Copyright IBM Corporation 2020, 2021

Figure 2-7. Creating a catalog

• APIs must be deployed to a catalog, and then published to organizations to become available
to consumers
• You can create multiple catalogs in a single installation
• Catalogs are useful for separating Products and APIs that you want to test before you publish
to an organization

© Copyright IBM Corp. 2020, 2021 2-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Catalogs
• Provider organizations can create separate deployment targets that are called catalogs for
testing and production
• Each catalog:
ƒ Is included in the path of a specific API endpoint
ƒ Has its own Developer Portal
• A default development catalog named “Sandbox” is provided
ƒ Used for testing
• A catalog is a staging target
ƒ The URL for API calls and the Developer
Portal is specific to a particular catalog

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-8. Catalogs

• While developing and maintaining APIs, members of a provider organization can create
separate deployment targets called catalogs for testing and production. Each contained
catalog is associated with a specific Developer Portal and endpoints. The URL for API calls and
the Developer Portal are specific to a particular catalog.
• By default, a development catalog is provided for you.
• The development catalog is named Sandbox.
• Other catalogs are added by the organization owner.
• In the exercise at the end of this Unit, you have an opportunity to configure the Staging
catalog.

© Copyright IBM Corp. 2020, 2021 2-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Create a catalog
• Sign in to API Manager as the owner of the provider organization
ƒ Select Manage catalogs from the Home page

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-9. Create a catalog

To add a catalog:
1. Sign in to API Manager as the owner of the provider organization.
2. Select the Manage catalogs tile from the home page. Then, click the Add icon to create a
catalog. Complete the fields in the dialog, by giving the catalog a name.
3. Then, click Create.
4. The catalog is added and is displayed as a tile in the list of catalogs from the Manage page.

© Copyright IBM Corp. 2020, 2021 2-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Catalog settings: Overview tab


• From the Manage menu item in API Manager
ƒ Select the catalog tile
ƒ Select Settings

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-10. Catalog settings: Overview tab

From the Manage navigation in API Manager, select the catalog that you want to configure. Then,
select Settings.
• From the Overview tab, there are toggles for setting production mode, spaces, and application
lifecycle.
• By default, the new catalog is a development catalog.
• To use the catalog in production, set the Production Mode slider control to the On position,
then click Confirm.
• In a development catalog, staging and publishing actions are forced, meaning that if you
republish a previously published Product, it is overwritten without warning.

© Copyright IBM Corp. 2020, 2021 2-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Spaces
• You can partition your catalog into spaces
• Each Space is used by a different API provider development team
ƒ Each team manages their APIs independently
• Coordinated offering on the Developer Portal
Products API Developer Portal
development team
Catalog

Stage APIs
Retail Space

Stage APIs
Wholesale Space

Stores API Publish APIs


development team

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-11. Spaces

• A catalog can be partitioned into multiple spaces that can be leveraged by different groups of
users. A space has its own set of management capabilities for product lifecycle, developers,
and subscriptions.
• Spaces can be set from the Overview tab in the Manage catalog page.

Information

The Staging catalog does not use spaces in the course exercises.

© Copyright IBM Corp. 2020, 2021 2-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Catalog settings: Gateway services


• Configure the gateway service
• Click Edit in the gateway service.
• Select the gateway service that was defined in Cloud Manager. Then, Save

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-12. Catalog settings: Gateway services

• A catalog requires a gateway service to handle incoming traffic for APIs.


• Before registering a Gateway service in Cloud Manager, the DataPower API Connect Gateway
Service has to either be installed as a subsystem in your Kubernetes cluster or enabled on the
DataPower appliance.

© Copyright IBM Corp. 2020, 2021 2-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Catalog settings: API Endpoints


• Customize the gateway URL
• The default API Connect gateway URL is in the format:
ƒ https://gateway_cluster_hostname/organization/catalog
• If you want to achieve custom branding for APIs that are deployed to API Connect, you can
specify a custom gateway URL
ƒ Specify a custom URL for your enterprise in the API Endpoints field of the catalog settings
ƒ Endpoints in the Developer Portal are displayed with the custom name

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-13. Catalog settings: API Endpoints

• You can create a custom gateway URL when you configure the catalog in API Manager.
• If you want to achieve custom branding for APIs that are deployed to API Connect, you can
specify a custom gateway URL.
• Specify a custom URL for your enterprise in the API Endpoints field of the catalog settings.
• Endpoints in the Developer Portal are displayed with the custom name. You must configure a
DNS entry that maps the custom name to the default name.
• Ensure that the same custom gateway URL is not applied to multiple catalogs.

© Copyright IBM Corp. 2020, 2021 2-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Catalog settings: Portal tab


• Configure a portal from the Portal tab
ƒ Click Create if no portal exists
• Specify:
ƒ Portal service to use for the catalog
ƒ Portal URL (usually pre-filled)
ƒ Click Create
• When you create a portal and no user registry is defined in the catalog settings, API Manager
automatically creates a separate local user registry for the portal

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-14. Catalog settings: Portal tab

• Each Availability Zone contains one or more Portal services. The Portal service provides a
developer portal that is used by application developers to discover APIs and onboard
consumers. An email server must be configured and set as the email server for the cloud
before registering a portal service.
• When you create a portal, and no user registry is configured in the settings for the catalog, API
Manager automatically creates a separate local user registry for the portal.
• The portal local registry stores members of consumer organizations.
• The API Manager local registry stores members of the provider organization.

© Copyright IBM Corp. 2020, 2021 2-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty
2.3. Creating a consumer organization

© Copyright IBM Corp. 2020, 2021 2-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Creating
ga
consumerr
organization

Managing
M
Ma
Mana
ana
ag
giing
ng ccatalogs
atta
allog
gs a
an
and
nd o
or
organizations
rga
gan
niiza
attiio
onns © Copyright IBM Corporation 2020, 2021

Figure 2-15. Creating a consumer organization

© Copyright IBM Corp. 2020, 2021 2-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Create a consumer organization


In API Manager, as the owner of the provider organization:
• Select the target catalog for the consumer organization
• Select the Consumers tab at the top
• Click Add
Then, Create Organization
• Specify:
ƒ Title
ƒ Organization name
ƒ User registry
ƒ Specify the owner

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-16. Create a consumer organization

If you have permission to manage developers, you can create consumer organizations.
The Developer Portal must be enabled and configured in API Manager before you perform this
task.
Create the consumer organization from the Consumer Organizations menu after you have
selected the catalog in API Manager.
In the Create Consumer Organization dialog box, type:
• Title
• Name
• User registry
• Owner information
If New User is selected, specify:
• Username
• Email address
• First name
• Last name
• Password
Then, click Create.
The consumer organization is added to the list of consumer organizations for the catalog.

© Copyright IBM Corp. 2020, 2021 2-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Result of adding a consumer organization


• The owner is automatically approved, and the new consumer organization is added to the
Consumers list

• The owner can sign on to the Developer Portal with the username and password credentials
that were provided during the creation of the consumer organization
Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-17. Result of adding a consumer organization

© Copyright IBM Corp. 2020, 2021 2-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Sign on to the Developer Portal


• Sign in to the Developer Portal as the consumer organization owner

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-18. Sign on to the Developer Portal

The consumer organization owner can sign on to the Developer Portal. When the owner is signed
in, the owner can manage the developer organization from the Developer Portal and does not use
the API Manager user interface. There are tools in the Portal to manage the consumer
organization. Next, you see some of the capabilities that the consumer organization owner has on
the Developer Portal.

© Copyright IBM Corp. 2020, 2021 2-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Consumer organization owner manage options


• Manage options for an
organization owner in
the Developer Portal:
ƒ My organization
ƒ Create organization
ƒ Select organization

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-19. Consumer organization owner manage options

• After signing on to the Developer Portal, the consumer organization owner can access the
manage organization menu from the menu drop-down.
• From this menu, owners can manage their own consumer organization.
• For development catalogs, the owner can also create a new organization.
• More about the Developer Portal is covered later in the next topic.

© Copyright IBM Corp. 2020, 2021 2-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Add a member to a consumer organization


• Sign in to the Developer Portal
• Select the organization from the list of consumer
organizations
• Select My Organization
• From the Manage tab, select Invite
• Type the email address for the user
• Assign a role
• Complete the captcha! characters
• Click Save

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-20. Add a member to a consumer organization

• The owner of the consumer organization can add members to the consumer organization with
the Invite panel. Those members can then access the Developer Portal and use the APIs that
have been made available to the consumer organization.
• Results: The member is added to the consumer organization with a status of pending, and an
email is sent to the member with the subject line: “Invitation to an API consumer organization
in the catalog_name developer portal". The member must click the link that is provided to
activate their account and complete the setup.

© Copyright IBM Corp. 2020, 2021 2-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Consumer organization member list


• The invitation is sent to the member and the state of the member is set to Pending
• The member accepts the invitation
and signs on to the Developer Portal
• The member status is then changed
to Active

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-21. Consumer organization member list

• The owner of the consumer organization can view or edit the members of the organization in
the Developer Portal. The member that was invited responds to the email invitation and joins
the consumer organization by signing on to the Developer Portal.
• The member status is changed to Active in the list of members.

© Copyright IBM Corp. 2020, 2021 2-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Consumer organization default roles


• Roles that are defined in Cloud Manager

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-22. Consumer organization default roles

• When the owner of a consumer organization invites a member to join the organization, the
member is assigned a role. The default roles that the owner can assign are administrator,
developer, or viewer. In the previous slides, the role of developer is assigned.
• The default roles for a consumer organization are defined in Cloud Manager.

© Copyright IBM Corp. 2020, 2021 2-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty
2.4. Creating a Developer Portal

© Copyright IBM Corp. 2020, 2021 2-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Creating
ga
Developerr
Portal

Managing
M
Ma
Mana
ana
ag
giing
ng ccatalogs
atta
allog
gs a
an
and
nd o
or
organizations
rga
gan
niiza
attiio
onns © Copyright IBM Corporation 2020, 2021

Figure 2-23. Creating a Developer Portal

• The Developer Portal is built on Drupal 8, an open source content management technology. A
good understanding of Drupal 8 concepts and terminology enhances your ability to work with
the Developer Portal.
• As well as enabling application developers to find and use your APIs, the Developer Portal also
provides features such as API analytics, forums, blogs, and rating facilities.

© Copyright IBM Corp. 2020, 2021 2-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Email activation for Developer Portal


• After the catalog is created and
a portal service registered, an
email is sent to the admin user.
• Respond to the email by
selecting the activation link for
the admin user in the email
message

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-24. Email activation for Developer Portal

• After the catalog is created and a portal service registered, an email is sent to the admin user.
• Respond to the email by selecting the activation link for the admin user in the email message.

© Copyright IBM Corp. 2020, 2021 2-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

One-time sign in for Developer Portal admin user


• The activation link opens the
Developer Portal
• Use the one-time link to sign in
and change the password for the
admin user

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-25. One-time sign in for Developer Portal admin user

© Copyright IBM Corp. 2020, 2021 2-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Signed into the Developer Portal


• The Developer Portal is created with the admin user signed in

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-26. Signed into the Developer Portal

• The portal for the catalog is created and the admin user is signed in.
• The admin user is used to administer and customize the Developer Portal.

© Copyright IBM Corp. 2020, 2021 2-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Developer Portal administration menu


• Workbench menu • Manage menu

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-27. Developer Portal administration menu

• The Developer Portal has responsive web pages, and the pages resize according to the
browser width.
• Displayed on the left side of the page is the admin Workbench menu items.
• On the right side of the page are the expanded Manage menu items.
• The administration menu uses the Drupal components of the Developer Portal.

© Copyright IBM Corp. 2020, 2021 2-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty
2.5. Assigning roles and permissions

© Copyright IBM Corp. 2020, 2021 2-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Assigning
g roless
and
d
permissions

Managing
M
Ma
Mana
ana
ag
giing
ng ccatalogs
atta
allog
gs a
an
and
nd o
or
organizations
rga
gan
niiza
attiio
onns © Copyright IBM Corporation 2020, 2021

Figure 2-28. Assigning roles and permissions

© Copyright IBM Corp. 2020, 2021 2-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Role-based administration of the cloud


• Cloud administrator
ƒ Installation process creates a user ID admin
ƒ Prompted to change the default password on first sign-in to Cloud Manager

Role Permissions Actions Description


Cloud Cloud-settings View, View, define, and configure
Administrator manage settings and defaults
Topology View, View, register, edit, and delete
manage analytics, gateway, and portal
services
Provider View, Add, update, and delete provider
organizations manage organizations
Users View, edit View, add, update, and delete
Cloud Manager users

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-29. Role-based administration of the cloud

• Cloud Administrator role.


▪ Installation process creates a user ID admin
▪ Prompted to change the default password on first sign in to Cloud Manager.
• The Cloud Manager URL is in the format: <cloud>.<hostname>.<domainname>
• The Cloud Administrator can create users who can be assigned roles that are given some
permissions for administering the cloud.
• A Topology Administrator is given the same permissions as the Cloud Administrator, except
the permissions to view and edit users.
• The Cloud Administrator can create, update, and delete provider organizations and their
owners.
• One of the important first tasks of the Cloud Administrator is to create a provider organization
account and add an owner to the account. Then, members can be added to the provider
organization to start creating and publishing APIs.

© Copyright IBM Corp. 2020, 2021 2-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

API Connect cloud, user interfaces, and owners


API Manager Developer Portal

Provider 2 3
organizations
Provide APIs
Provider org Consumer Consumer
owner org owner organizations
Use APIs

V Email
1 server
Cloud
Cloud Clusters User Configuration
Manager of servers registry
administrator
or Identity provider
containers
Cloud
Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-30. API Connect cloud, user interfaces, and owners

The diagram shows the sequence for the creation of users in API Connect.
1. The Cloud Administrator is created when the API Connect product is installed. The
administrator signs on to the Cloud Manager user interface to configure the resources and
topology of the on-premises cloud. The administrator creates the provider organization and
assigns an owner.
2. The owner of the provider organization signs on to the API Manager user interface and creates
the members of the provider organization who create APIs, Products, and plans. The owner of
the provider organization creates a consumer organization and assigns an owner.
3. The owner of the consumer organization signs on to the Developer Portal to create members
of the consumer organization and assign roles. Members of the consumer organization use
APIs and create applications and subscribe to Products and plans.

© Copyright IBM Corp. 2020, 2021 2-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Role of owners of the provider and consumer organizations


• Provider organization exposes business functions as APIs
• Provider organization owner
ƒ Works in the API Manager user interface
ƒ Manages API developers
ƒ Creates catalog and configures Developer Portal settings
ƒ Creates a Consumer Organization and assigns an owner

• Developer Portal administrator (admin)


ƒ Customizes the portal for all Developer organizations

• Consumer organization owner


ƒ Works on the Developer Portal
ƒ Manage and add members (application developers, administrators, viewers)

• Application developers
ƒ Discover APIs on the Developer Portal
ƒ Create applications and subscribe to plans
ƒ Create web or mobile apps that call Products, plans, and APIs with the key (client ID) provided by the application

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-31. Role of owners of the provider and consumer organizations

• After the owner of the provider organization has created a catalog and configured the portal
settings, the owner saves the changes in API Manager. At this point, the Developer Portal for
the catalog is created.
• The administrator of the Developer Portal activates the portal. The administrator does not
belong to any consumer organization. The administrator is responsible for the customization
of the Developer Portal.
• The owner of the provider organization adds the initial consumer organization and owner from
the Community tab in API Manager.
• The owner of the Developer organization then signs on to the Developer Portal to activate the
account.
• Depending on the permissions set for the Developer Portal in API Manager, the owner of the
Developer organization might be able to add more users (application developers) and
Developer organizations.

© Copyright IBM Corp. 2020, 2021 2-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Assign further roles to the member


• Developer Portal (Drupal) roles
• Assigned by the administrator of the Developer Portal by using the administrative menu
ƒ Manage > People > Permissions
• Drupal roles include:
ƒ Administrator
ƒ Anonymous user
ƒ Authenticated user
ƒ Content author
ƒ Forum moderator
ƒ Superuser

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-32. Assign further roles to the member

The administrator of the Developer Portal can assign additional portal-related roles to the
member of the organization.

© Copyright IBM Corp. 2020, 2021 2-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Portal roles
• By using roles, you can fine-tune the security and administration of Drupal
ƒ A role defines a group of users that have certain privileges as defined on the permissions page
• Anonymous user: Role that is used for users that do not have a user account or that are not
authenticated
• Authenticated user: This role is automatically granted to all logged in users
• Content author: Role that is used to edit or add content
• Forum moderator: Role that controls access to the portal forums
• Superuser:
Can see all the site content
Automatically assigned to the Administrator
• Administrator:
Manages all other roles

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-33. Portal roles

You can use roles to fine-tune the security and administration of Drupal. A role defines a group of
users that have certain privileges as defined on the permissions page. Examples of roles include
anonymous user, authenticated user, moderator, administrator, and other roles. The
administrator can define the names and order of the roles on your site. It is recommended to
order your roles from least permissive (anonymous user) to most permissive (administrator).
By default, Drupal comes with two user roles:
• Anonymous user: This role is used for users that do not have a user account or that are not
authenticated.
• Authenticated user: This role is automatically granted to all logged in users.

© Copyright IBM Corp. 2020, 2021 2-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Example of members that are assigned Drupal roles


• Members of the consumer organization have API Connect roles and Drupal roles

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-34. Example of members that are assigned Drupal roles

Members of the consumer organization can have both API Connect roles and Developer Portal
Drupal roles. In the example, the member with an Application Developer role in API Connect also
has a Forum Moderator role in the Developer Portal.

© Copyright IBM Corp. 2020, 2021 2-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Password lockout
• API Connect Local User Registries apply a lockout criteria
• Repeated unsuccessful login attempts can lock your account
• Length of time that you are locked out of using the account is based on the number of
consecutive failed attempts
ƒ Length of time increases as the number of consecutive failed attempts increases
ƒ Locks you out for 15 seconds after five consecutive failed attempts
ƒ Locks you out for 32 minutes after 12 consecutive failed attempts

• External user registries, such as LDAP, might enforce their own lockout criteria

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-35. Password lockout

Account lockout only applies to local user registries.

© Copyright IBM Corp. 2020, 2021 2-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Unit summary • Describe the interaction between organizations and catalogs


• Explain the concept of a provider organization
• Explain how to create a catalog and a Developer Portal
• Describe the use of spaces within a catalog
• Configure a Developer Portal for the catalog
• Identify the administration menu options in the Developer Portal
• Describe the relationship between the provider organization owner and
the owner of the consumer organization
• Describe how to create a consumer organization
• Describe the management options that are available to the owner of a
consumer organization in the Developer Portal
• Describe how to add a member in the Developer Portal
• Describe the consumer roles that are defined in API Manager
• Identify the roles that are defined in the Developer Portal
• Explain the password lockout criteria © Copyright IBM Corporation 2020, 2021

Figure 2-36. Unit summary

© Copyright IBM Corp. 2020, 2021 2-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Review questions
1. Provider organizations can create separate deployment targets for testing and production.
These targets are called:
ƒ Catalogs
ƒ Permissions
ƒ Roles
ƒ User registries

2. True or False: If you do not explicitly configure a user registry in the API User Registries
settings of the Manage catalog page in API Manager, then a local user registry is created
when the portal is created.

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-37. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 2-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Review answers
1. Provider organizations can create separate deployment targets for testing and production.
These targets are called:
ƒ Catalogs
ƒ Permissions
ƒ Roles
ƒ User registries
The answer is A.

2. True or False: If you do not explicitly configure a user registry in the API User Registries
settings of the Manage catalog page in API Manager, then a local user registry is created
when the portal is created.
The answer is True.

Managing catalogs and organizations © Copyright IBM Corporation 2020, 2021

Figure 2-38. Review answers

© Copyright IBM Corp. 2020, 2021 2-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Exercise: Managing catalogs and consumer organizations

Figure 2-39. Exercise: Managing catalogs and consumer organizations

This exercise shows you how to manage consumer organizations through the API Manager and
Developer Portal web interfaces. You review the role of the provider organization owner in
creating a consumer organization. You also learn how to manage members and configure member
roles and permissions in the Developer Portal.

© Copyright IBM Corp. 2020, 2021 2-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 2. Managing catalogs and organizations

Uempty

Exercise • Create a catalog


objectives • Configure settings for the Developer Portal
• Define a Developer Portal and user registry in API Manager
• Activate the admin user for the Developer Portal
• Configure modules in the Developer Portal
• Create a consumer organization in API Manager
• Add a member to the consumer organization
• Respond to the email message to activate the app developer
member
• Manage member roles and permissions in the Developer Portal

© Copyright IBM Corporation 2020, 2021

Figure 2-40. Exercise objectives

© Copyright IBM Corp. 2020, 2021 2-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Unit 3. Defining APIs in API Manager


Estimated time
01:30

Overview
This unit provides an overview of APIs and API types. It describes the structure of an API
definition and how to create a new API definition in API Manager. It explains the role of the
DataPower gateway in exposing existing web services. It also covers how to edit and test an API
definition in API Manager. Options for defining SOAP APIs are covered in more detail.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 3-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Unit objectives • Explain the concept of an API definition


• Describe how to create an API definition
• Define an API operation
• Explain the role of the API gateway in exposing existing services
• Identify the endpoint URL that gets called by the invoke message
processing policy
• Describe the purpose of the Assemble view in API Manager
• Explain how to test API operations in API Manager

© Copyright IBM Corporation 2020, 2021

Figure 3-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 3-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Topics • Overview of APIs and API types


• Structure of the API definition
• Creating a SOAP API in API Manager
• Editing the API definition
• Testing the API definition

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-2. Topics

© Copyright IBM Corp. 2020, 2021 3-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty
3.1. Overview of APIs and API types

© Copyright IBM Corp. 2020, 2021 3-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Overvieww off
APIss and
d APII
types

Defining
Defi
De fini
fining
gAAPIs
PIss iin
PI nAAPI
PI M
PI Manager
an
anag
a er
er © Copyright IBM Corporation 2020, 2021

Figure 3-3. Overview of APIs and API types

© Copyright IBM Corp. 2020, 2021 3-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

What is an API definition?


• An application programming interface (API) defines business or technical capability as a set
of operations
• An OpenAPI API definition is a standard, language-neutral way to specify the interface of a
REST API
• Application developers can call API operations without seeing the API implementation,
scanning API traffic, or relying on other documentation

API definition
Document that describes API operations

API application
API Software that implements API operations

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-4. What is an API definition?

• An API is a set of functions that provide some business or technical capability and are called
by applications by using a defined protocol. Applications are typically mobile or web
applications, and they use the HTTP protocol.
• The OpenAPI API definition specifies the interface of a REST API in a standard,
vendor-neutral, and language-neutral way. With a properly specified API definition, software
developers and applications can discover and understand the capabilities of the service
without access to the implementation source code, extra documentation, or inspecting
network traffic.
• IBM API Connect uses OpenAPI API definitions as the API interface format. You can import
API definitions that other editors create, or export API definitions.

© Copyright IBM Corp. 2020, 2021 3-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

API types (1 of 2)
An API definition is composed of paths, and can be one of the following types:
• REST is a simple set of HTTP-based interactions, found in web applications
ƒ You map functions to web resource paths
ƒ Applications call API paths with HTTP methods, such as GET and POST
ƒ Applications exchange data with an API in JSON or XML
ƒ Can work with plain text, XML, HTML, and JSON
ƒ Codified in the OpenAPI (swagger) definition
• SOAP is an enterprise integration standard and specification for XML-based message exchange
ƒ You map functions to SOAP operations
ƒ A standards-based web services access protocol that has been around for a long time
ƒ Applications call API operations in an XML-based SOAP message format
ƒ Applications exchange data in XML
ƒ Language, platform, and transport independent
ƒ Codified in the Web Service Description Language or WSDL
Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-5. API types (1 of 2)

You can define the following types of APIs in API Manager.


• The first type is a REST API: A set of operations based on simple HTTP interactions. In this
style, functions map to web resource paths. Applications send an HTTP request to a web path
to call API operations. The API and the application exchange data through JSON or XML
messages.
• The second type is a SOAP API: An enterprise integration standard, found in service-oriented
architecture (SOA) and enterprise service bus (ESB) infrastructure. In this style, functions map
to SOAP operations. Applications specify the name of an API operation in an XML-based SOAP
message format. The API and the application exchange data through XML data within the
SOAP message.

© Copyright IBM Corp. 2020, 2021 3-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

API types (2 of 2)
• GraphQL
ƒ GraphQL is an open-source data query language for APIs. GraphQL was developed by Facebook in
2012 before being publicly released in 2015.
ƒ GraphQL gives an application client greater control over what data it retrieves in an API request when
compared with a REST API request.
ƒ IBM API Connect enables you to create a GraphQL API proxy definition that proxies a backend
GraphQL server, and to define rate limiting controls that reflect the amount of data that is returned
from the server by a request to the GraphQL API.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-6. API types (2 of 2)

GraphQL provides the following particular advantages over REST APIs:


• The application client can request only the data that it needs. For example, when retrieving
bank account records, request only the account number and current balance for each account,
but not the customer's name and address details. With a REST API request, either the backend
REST service must provide separate endpoints for different data subsets, or the application
client must retrieve the complete records and then discard the unwanted data.
• The application client can retrieve multiple related resources in a single request. For example,
a customer's bank account record might include an array that references other finance
products that the customer holds. If an application client wants to retrieve the bank account
details for a specific customer, and details of the other finance products for that customer,
then with a REST API the client would first retrieve the bank account details, then make
separate requests for each of the other products. A GraphQL API can be designed to allow the
client to retrieve all this information in a single request.
However, this flexibility presents rate limiting challenges because two seemingly similar requests
might return vastly different amounts of data, and what might have required multiple REST API
requests, each counting toward the rate limit, might require only a single GraphQL API request.
Therefore, it is important that rate limiting controls are imposed that reflect the amount of data
that is retrieved. API Connect extends the GraphQL standard by providing, in a GraphQL API
definition, the ability to configure a range of settings that are used to calculate the complexity of a
GraphQL request and an associated cost that counts toward the rate limit.
GraphQL is covered in more detail in a later unit.

© Copyright IBM Corp. 2020, 2021 3-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty
3.2. Structure of the API definition

© Copyright IBM Corp. 2020, 2021 3-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Structuree off the


e
APII definition

Defining
Defi
De fini
fining
gAAPIs
PIss iin
PI nAAPI
PI M
PI Manager
an
anag
a er
er © Copyright IBM Corporation 2020, 2021

Figure 3-7. Structure of the API definition

The next two slides display the parts of an API and an API operation. The next topic covers where
this information can be edited in API Manager.

© Copyright IBM Corp. 2020, 2021 3-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Parts of an API definition


Type Description Example
Host • The name or address of the server https://rgw.think.ibm
that hosts the API or
• In API Connect, the host is the Leave blank
address of the API Gateway

Base path • The web route that identifies the API /InventoryService
• It appears immediately after the host
name

Consumes The MIME media type of the HTTP application/xml


request message
Produces The MIME media type of the HTTP application/json
response message
Properties Configuration settings that are applied target-url:
to a specific deployment environment http://rgw.think.ibm/InventoryRequest

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-8. Parts of an API definition

• This chart describes the functional parts of an OpenAPI definition file. The host entry lists the
API server name or IP address. In API Connect, you can provide an environment property that
the API gateway resolves at run time. If you omit this property, the host defaults to the API
gateway address.
• The base path entry displays the web route immediately after the API. The purpose of the
base path is to separate the operations in this API from other APIs on the same server.
• The consumes and produces entries explain how to interpret the data in the HTTP request
message and response message. For example, a web form has a media type of text/html. If
the API application returns a JSON object in the response message body, the message has a
media type of application/json.
• The OpenAPI definition file also stores environment-specific variables, which are known as
properties. For example, the target-url can be specified for all the operations of the API. In
the example, the target-url is specified as an actual URL address. Properties can be specified
as API Connect context variables that start with a $ sign.

Note

The target-url is the URL of the API service that is called. The operation paths are appended to
the target-url to define the proxy endpoint.
It is important to distinguish between the proxy endpoint that is the back-end service that is
called from the gateway. Client applications call the API at the gateway endpoint. The gateway
routes or proxies the call to the proxy endpoint that is defined by the target-url.

© Copyright IBM Corp. 2020, 2021 3-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Parts of an API operation


Type Description Example
Paths The web resource, immediately after /InventoryRequest
the base path

Operation The API operation is an action with an POST /InventoryRequest


API resource

Parameters The input parameters of an API InventoryRequestInput


operation
Responses The HTTP status code and response 200 OK
message that are sent through the API
implementation
Definitions The schema definition for the HTTP Property name: InventoryRequestOutput
request or response message body
Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-9. Parts of an API operation

The API operation consists of five parts:


• The path is the name of the web resources that appears immediately after the base path, for
example: /InventoryRequest. The path is appended to the target-url property. In REST APIs,
the API path represents the name of the operation.
• The operation is the HTTP method that acts on the resource, for example: POST
/InventoryRequest.
• The parameters are the input parameters of an API operation, for example:
InventoryRequestInput.
• The responses are the possible HTTP status codes and responses message that the API
operation can return.
• The definitions are schema data types that appear in the HTTP request or response
messages.

© Copyright IBM Corp. 2020, 2021 3-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty
3.3. Creating a SOAP API in API Manager

© Copyright IBM Corp. 2020, 2021 3-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Creatingg a SOAP
P
APII in
n APII
Manager

Defining
Defi
De fini
fining
gAAPIs
PIss iin
PI nAAPI
PI M
PI Manager
an
anag
a er
er © Copyright IBM Corporation 2020, 2021

Figure 3-10. Creating a SOAP API in API Manager

• You can create API definitions by using the API Manager or the command-line interface in IBM
API Connect.
• This unit covers how to create a SOAP proxy from a WSDL document. In the exercise at the
end of this unit, you get an opportunity to create this type of API.
• The next unit covers REST APIs and the OpenAPI specification in more detail. OpenAPI
(Swagger 2.0) is used to create language-independent APIs that proxy to existing back-end
implementations.

© Copyright IBM Corp. 2020, 2021 3-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Options for creating an API


Options for creating an API in API Manager:

OpenAPI 3.0
• API from existing REST service
ƒ Create a REST proxy API from a REST service
• API from existing SOAP service
ƒ Create a SOAP proxy API from a SOAP service

OpenAPI 2.0
ƒ Create a REST proxy API from a SOAP service
• New API

SOAP
ƒ Create an OpenAPI definition from scratch
• Import API
ƒ Import an existing OpenAPI definition

API 3.0
Open
Defining APIs in API Manager © Copyright IBM Corporation 2020

Figure 3-11. Options for creating an API

• You can define APIs with either of these approaches:


▪ In an interface-first design, you define each API path, operation, request, and response
message in an OpenAPI definition. You map the interface to an existing API
implementation that is deployed in your architecture.
▪ In an implementation-first design, you build an API implementation as a collection of
models, properties, relationships, and data sources. You generate a set of REST API
operations from the models to an OpenAPI definition.
• If you have an existing REST service that you want to expose through an OpenAPI definition,
you can create a proxy API and specify the target endpoint by using the API Manager.
• If you have an existing SOAP service, you can use the WSDL file to add a REST API definition.
• You can add a new API and create an OpenAPI definition.
• You can import an existing OpenAPI definition into API Manager.
• IBM API Connect supports the OpenAPI 3.0 specification, with some limitations. The current
implementation includes complete support for the Berlin Group NextGen PSD2 requirements.

© Copyright IBM Corp. 2020, 2021 3-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

SOAP API scenario (1 of 2)


Define a SOAP API
1. Define a SOAP API with
operations in the existing service API Gateway Application
container or server
2. Publish the API definition to the
API application
gateway through API Manager

2
InventoryService
Publish the API SOAP service
definition to the
gateway through
the API Manager
1

Define a SOAP
API with the InventoryService
operations in the API definition
existing service
API Manager

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-12. SOAP API scenario (1 of 2)

• Traditional enterprise applications rely on the SOAP specification to remotely bind and invoke
services. SOAP services rely on another standard to describe its interface: the Web Services
Description Language (WSDL) document. In this scenario, you can specify an OpenAPI
definition based on an existing WSDL document.
• Looking forward, you might want to modernize an existing SOAP service and provide a REST
API. In this scenario, you must specify an OpenAPI definition and policy assemblies to convert
a call from REST to a SOAP request.
• In this scenario, your organization wants to expose an existing SOAP service at the API
gateway. The goal is to forward API requests as-is to the SOAP service. In other words, you
want to build a proxy for a SOAP service.
• In the API Manager web application, build a new OpenAPI definition that is based on a SOAP
interface. You can create a SOAP API from scratch, but the most straightforward method is to
create a SOAP proxy from an existing WSDL service in the API Manager web user interface.
When you use this option, the dialog prompts you to import a Web Services Description
Language (WSDL) document as a starting point for the API definition. After you import the
WSDL interface and build the SOAP API definition, you auto-publish the API definition to a
DataPower Gateway in the API Manager. The auto-publish option happens when you make the
API online in the API Manager test feature.

© Copyright IBM Corp. 2020, 2021 3-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

SOAP API scenario (2 of 2)


Define a SOAP API
3. The API gateway
exposes an endpoint API Gateway Application
container or server
that accepts
InventoryService InventoryRequest
operation requests SOAP API API SOAP API API application
operation operation
4. At run time, the InventoryService
gateway sets up a
3
proxy to forward Inventory InventoryService
Service API SOAP service
SOAP requests to the The API gateway definition
SOAP service exposes an
4
endpoint that
accepts operation At run time, the
requests gateway sets up
The API endpoint a proxy to
accepts SOAP forward SOAP
XML requests, requests to the
not REST API SOAP service
requests

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-13. SOAP API scenario (2 of 2)

1. To test the SOAP API that is hosted at the API gateway, send a SOAP request message to the
gateway. You must use a test client that sends a properly formatted SOAP XML envelope
message in the body of the HTTP request. The test client in the API Manager assembly view
can build such a message for a SOAP API.
2. When the API gateway receives the SOAP request, it validates the message against the input
message and parameters that you defined in the OpenAPI definition file. The proxy policy in
the assembly forwards the request to the actual SOAP service implementation.

© Copyright IBM Corp. 2020, 2021 3-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Creating a SOAP API in API Manager (1 of 3)


• API Connect provides a
web-based graphical
environments for
developing APIs and
products.
• Sign on to API Manager
from a browser with your
developer user account.
• Click the “Develop APIs
and Products” tile to open
the Develop page in the
browser.
• From the Developer page,
select the Add icon. Then,
select API from the drop-
down list.
Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-14. Creating a SOAP API in API Manager (1 of 3)

API Connect provides a web-based graphical environment for developing APIs and products.
• Sign on to API Manager from a browser with your developer user account.
• Click the “Develop APIs and Products” tile to open the Develop page in the browser.

© Copyright IBM Corp. 2020, 2021 3-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Creating a SOAP API in API Manager (2 of 3)


Define a SOAP API that calls an existing SOAP application
• To create a SOAP API from a WSDL document, choose From existing
WSDL service (SOAP proxy) when creating the API
• Browse to the location of the WSDL document and import

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-15. Creating a SOAP API in API Manager (2 of 3)

• After you click the option to add an API, the page displays a number of options for creating the
API. You can create a REST API definition to proxy an existing REST service. You can create
APIs from an existing WSDL service.
• You can start with an empty OpenAPI definition document with the New OpenAPI option.
• The Existing OpenAPI option imports an OpenAPI document from your workstation or a
remote server.
• You examine some of these options in other units and course exercises.
• To create a SOAP API from a WSDL service, select the From existing WSDL service (SOAP
proxy) option

© Copyright IBM Corp. 2020, 2021 3-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Creating a SOAP API in API Manager (3 of 3)


If you want to immediately use the API after
import, select the Activate API option. When you
select the Activate API option, API Connect
automatically completes the following actions:
• Creates a draft Product, adds the API to the
Product, and publishes the Product to the
Sandbox Catalog so that the API is available to
be called. The Product has the title api_title
auto product.
• Subscribes the Sandbox test application to the
Product so that you can immediately test the
API in the test environment.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-16. Creating a SOAP API in API Manager (3 of 3)

• If you want to immediately use the API after import, select the Activate API option. When you
select the Activate API option, API Connect automatically completes the following actions:
▪ Creates a draft Product, adds the API to the Product, and publishes the Product to the
sandbox catalog so that the API is available to be called. The Product has the title
api_title auto product. This Product is not visible in the Develop view and you cannot
delete it directly. However, if you delete the API the draft Product is deleted together with
the API. The Product is visible in any catalogs to which it is published. If you want to
remove the Product from a catalog, you must do this separately.
▪ Subscribes the sandbox test application to the Product so that you can immediately test
the API in the test environment.

© Copyright IBM Corp. 2020, 2021 3-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty
3.4. Editing the API definition

© Copyright IBM Corp. 2020, 2021 3-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Editing
g thee APII
definition

Defining
Defi
De fini
fining
gAAPIs
PIss iin
PI nAAPI
PI M
PI Manager
an
anag
a er
er © Copyright IBM Corporation 2020, 2021

Figure 3-17. Editing the API definition

• IBM API Manager provides different ways to edit the OpenAPI specification including a Design
view.
• In this course, you use API Manager to create and assemble APIs, and add Products and plans
for these APIs.
• Once you have created a SOAP API as a result of importing the WSDL file, you can use the API
Manager user interface to edit the API.

© Copyright IBM Corp. 2020, 2021 3-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

API Manager user interface (1 of 2)


API Manager provides a range of options for working with your APIs and Products.

1 5

4
3

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-18. API Manager user interface (1 of 2)

The IBM API Connect API Manager user interface provides a range of options for working with
your APIs and Products and managing security.
1. To navigate inside the API Manager user interface, select an icon on the navigation bar on the
left.
2. When you open an API, you can view the Design, Source, or Assemble tabs to develop the API.
3. In the Design view, there is a submenu that allows you to navigate different parts of the API.
4. In the Design view, when you select a section on the left, the details are displayed on the right.
5. In the upper right corner, you can save your API, and log out.

© Copyright IBM Corp. 2020, 2021 3-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

API Manager user interface (2 of 2)


To navigate inside API Manager user interface, select an icon on the navigation bar on the left.

• Home: returns you to the main page

• Develop: select this to edit and develop your APIs

• Manage: select this to manage and define catalogs

• Resources: select this to edit user registries, keystores,


truststores, TLS profiles, Oauth providers, and billing
• Members: select this to view and edit owners of the provider
organization
• Settings: select this to configure roles and notifications

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-19. API Manager user interface (2 of 2)

This unit covers the Develop option. When you select the Develop option, you are taken to a list of
your APIs. From there, click Add > API.

© Copyright IBM Corp. 2020, 2021 3-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

API Manager user interface: Design


In the Design view, there is a submenu that allows you to navigate different parts of the API.

• API Setup: API summary details


• Security Definitions: configure security definitions
• Security: select the security definition to apply across the API
• Paths: the name of the web resource that appears immediately
after the base path
• Definitions: defines the payload structures
• Properties: used by the gateway to control behavior of certain
policies
• Target services: defines target wsdl, xsd or zip file
• Categories: used to display API products hierarchically
• Activity log: configure logging preferences for analytics

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-20. API Manager user interface: Design

• The Design view of the API in API Manager allows you to navigate the API in a web interface.
• The next nine slides cover an overview of each of these sections.
• In the exercise at the end of this unit, you get an opportunity to review some of these settings.

© Copyright IBM Corp. 2020, 2021 3-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: API setup


In API setup, you configure metadata for the API including the Title, Schemes, Host, Base Path,
Consumes, Produces, Lifecycle and Gateway type.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-21. Design view: API setup

© Copyright IBM Corp. 2020, 2021 3-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Security definitions


A security definition specifies all the settings for a particular aspect of API security; for example,
the user registry that you use to authenticate access to the API.

Security Description
Use a basic authentication security definition to specify
Basic
a user registry or an authentication URL to be used to
authentication
authenticate access to the API.
Use an API key security definition to specify what
API key
application credentials are required to call an API.
Use an OAuth security definition to specify settings for
OAuth
OAuth token-based authentication for your API.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-22. Design view: Security definitions

This slide includes a table displaying the security configurations available for your API.

© Copyright IBM Corp. 2020, 2021 3-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Security


The security definition contains security settings that you enforce to define access control
requirements for the operations in the API by applying the security definitions to the API.

• You cannot apply more than two API key security definitions to
an API.
• You can have at most one API key definition of type client ID
• You can have at most one API key definition of type client secret
• You cannot apply more than one basic security definition to an
API

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-23. Design view: Security

The following restrictions exist when you apply security definitions to an API:
• You cannot apply more than two API key security definitions to an API.
• If you apply an API key security definition for client secret, you must also apply an API key
security definition for client ID.
• If you require the application developer to supply both client ID and client secret, you must
apply two separate API key security definitions.
• You can have at most one API key definition of type client ID, regardless of whether the client
ID is sent in the request header or as a query parameter.
• You can have at most one API key definition of type client secret, regardless of whether the
client secret is sent in the request header or as a query parameter.
• You cannot apply more than one basic security definition to an API. If you apply a basic
security definition, you cannot also apply an OAuth security definition.
• If you apply more than one OAuth security definition to an API, they must all have the same
client type setting, Public, or Confidential.
• If you apply more than one OAuth security definition to an API, they must have compatible
authentication settings. That is, the value of an authentication property must be the same for
all applied OAuth security schemes that have that property.
• If you apply more than one OAuth security definition to an API, they must have compatible
token refresh and revocation settings. That is, the value of a token refresh property or
revocation property must be the same for all applied OAuth security schemes that have that
property.

© Copyright IBM Corp. 2020, 2021 3-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Paths (1 of 2)


The path represents a resource that is hosted on the server. A path comprises an HTTP verb and
a URL path that, when exposed, is combined with the base path of the API.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-24. Design view: Paths (1 of 2)

• When you open the path, the operations for the path are displayed.
• The path is the name of the web resources that appears immediately after the base path, for
example: /InventoryRequest. The path is appended to the target-url property. In REST APIs,
the API path represents the name of the operation. However, SOAP APIs encode the operation
name into the XML SOAP envelope in the HTTP request message. The OpenAPI definition
must capture the same information in the schema definition section.
• A path comprises an HTTP verb and a URL path that, when exposed, is combined with the
base path of the API. By configuring the path, you define how the API is exposed to your
developers.
• In each SOAP API operation, the request and response messages map to the WSDL input and
output message types.
• In the screen capture example, a POST operation is displayed. The HTTP method is always set
to POST for SOAP APIs because SOAP services do not use the other HTTP methods, such as
GET, PUT, or DELETE.

© Copyright IBM Corp. 2020, 2021 3-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Paths (2 of 2)


When you open the path, the operations for the path are displayed.
From there, you can view the operation and its parameters.

• Y
You
ou

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-25. Design view: Paths (2 of 2)

• The example in the screen capture displays a request and response for the InventoryRequest
operation.
• The InventoryRequestInput schema is used in the body of the request and is required.
• The InventoryRequestOutput schema is used in the response.
• These schema definitions can be viewed under the Definitions section in the next slide.

© Copyright IBM Corp. 2020, 2021 3-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Definitions


The definitions section contains the schemas included in the request and response. Schemas are
reusable definitions contained in the body of the API request.

• You

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-26. Design view: Definitions

• In REST APIs, the API path represents the name of the operation. However, SOAP APIs
encode the operation name into the XML SOAP envelope in the HTTP request message. The
OpenAPI definition must capture the same information in the schema definition section.
• In this example, the InventoryRequest operation represents the WSDL operation of the same
name. In the original WSDL document, the InventoryRequest operation accepts a SOAP
request message named “InventoryRequest”. The OpenAPI definition creates a custom
schema type named “InventoryRequest” to represent this data. The InventoryRequestInput
schema type represents the SOAP envelope for the request message. The
InventoryRequestOutput schema type represents the SOAP envelope for the response
message.
• The WSDL operation, input, output, and custom data types correspond to the OpenAPI
schema definitions.

© Copyright IBM Corp. 2020, 2021 3-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Properties


In addition to the pre-supplied API properties that you can use to control the behavior of API
Connect policies, you can define your own API properties.
• The properties that you define can be referenced in
your API definitions.
• API properties include property name, value, and
optionally a specific Catalog to which a property value
applies.
• It is also possible to define properties that are specific
to a Catalog and can be referenced by any of the APIs
in that Catalog

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-27. Design view: Properties

© Copyright IBM Corp. 2020, 2021 3-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Target services


A target service is a running application that connects to systems of record and can provide
some level of business logic. Services could be SOAP services, GraphQL, or RESTFUL services.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-28. Design view: Target services

© Copyright IBM Corp. 2020, 2021 3-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Categories


You can organize your APIs into categories. The APIs that you categorize are displayed within
the Developer Portal, in their defined categories.
• You can display APIs and Products in pre-defined
categories in the Developer Portal.
• You can define the categories that the APIs and
Products are displayed in, in the API Manager or API
Manager UI.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-29. Design view: Categories

© Copyright IBM Corp. 2020, 2021 3-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Design view: Activity log


Use the Activity Log to configure your logging preferences for the API activity that is stored in
IBM API Connect analytics. The preferences that you specify will override the default settings.
• If you are using the DataPower API Gateway, you
configure your logging preferences by using the activity-
log extension.
• You can also apply an activity-log policy by using the API
Designer assembly editor to add a built-in policy to the
API.
• An API event record exists for each API execution event in
the Gateway server. By default, the content type that is
collected and stored in API event records is activity for
when API execution completes successfully, and payload
for when API execution completes with an error code.
• Apply the Activity Log policy to your assembly to change
the type of content to log in these API event records.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-30. Design view: Activity log

© Copyright IBM Corp. 2020, 2021 3-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

API Manager user interface: Source


When you open an API, you can view the Design, Source, or Assemble tabs to develop the API.
• In the Source tab is the OpenAPI (Swagger
2.0) definition of your draft API, which you
can edit at will.
• OpenAPI definitions in API Connect can be
broadly separated into two parts: a
standard OpenAPI schema that follows all
normal syntax, and extensions to the
schema that are specific to API Connect.
• IBM API Connect defines a set of its own
extensions to the API definition file.
ƒ An extension property starts with the
x-ibm- prefix in its name
ƒ Other platforms and tools safely ignore
the IBM extension settings in an exported
API definition file
Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-31. API Manager user interface: Source

• Up to this point, you have been viewing the API definition in the Design view. However, API
Manager also supports other views including the Source and Assemble views. In the Source
view, you can view the source of the OpenAPI specification. The Source view displays the API
definition in YAML format.
• The OpenAPI specification supports two API definition file formats: JavaScript object
notation, or JSON, and Yet Another Markup Language, or YAML. IBM API Connect exports API
definitions in the YAML file format.
• The source view displays an OpenAPI definition in the raw text format. You can directly edit
the text version of the OpenAPI definition in the API Manager, or any text editor.
• IBM API Connect also implements a number of extensions to the OpenAPI definition
structure. For example, the x-ibm-name property stores the API name.
The example in the slide shows the first part of the OpenAPI YAML document.

© Copyright IBM Corp. 2020, 2021 3-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Syntax

swagger: '2.0‘
info:
title: InventoryService
description: WSDL File for InventoryService
x-ibm-name: inventoryservice
version: 1.0.0
schemes:
- https
basePath: /InventoryService
produces:
- application/xml
consumes:
- text/xml
securityDefinitions:
clientID:
type: apiKey
name: X-IBM-Client-Id
in: header
description: ‘’
Security:
- ClientID: []
x-ibm-configuration:
type: wsdl
phase: realized
enforced: true
testable: true
gateway: datapower-api-gateway
cors:
enabled: true

More about the OpenAPI specification is covered in the next unit.

© Copyright IBM Corp. 2020, 2021 3-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

API Manager user interface: Endpoints


• The Endpoints view provides a list of
API base endpoints and credentials
of the Sandbox Test Application
• It also displays the current rate limit

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-32. API Manager user interface: Endpoints

© Copyright IBM Corp. 2020, 2021 3-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

API Manager user interface: Assemble


With assemblies, you can readily tailor your APIs to include components such as activity logging
and redaction of specific fields.

1
4
2

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-33. API Manager user interface: Assemble

The API Designer features an assemble view that you can use to create assemblies. With
assemblies, you can readily tailor your APIs to include components such as activity logging and
redaction of specific fields. This view includes a palette, which lists available components, a
property sheet, which is used to configure a component, and a canvas, which is used to arrange
and visualize the assembly’s components. When you create an API definition, IBM API Connect
defines an assembly with one message processing policy: an invoke operation.
1. Test panel provides features to publish and test operations of the API
2. Setup displays the catalog, Product, Plan, and Application relative to the API
3. You can select from multiple operations if the API supports multiple operations
4. The canvas is used to arrange the assembly’s components
5. The target URL is the URL to be invoked in the invoke policy
Due to Cross-Origin Resource Sharing (CORS) restrictions, the assembly test tool cannot be used
with the Chrome or Safari browsers on the macOS Catalina platform.

© Copyright IBM Corp. 2020, 2021 3-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty
3.5. Testing the API definition

© Copyright IBM Corp. 2020, 2021 3-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Testingg the
e APII
definition

Defining
Defi
De fini
fining
gAAPIs
PIss iin
PI nAAPI
PI M
PI Manager
an
anag
a er
er © Copyright IBM Corporation 2020, 2021

Figure 3-34. Testing the API definition

© Copyright IBM Corp. 2020, 2021 3-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Testing an API in API Manager


• API Connect provides a basic test environment in the Assemble tab so that you can ensure
that your APIs are defined and implemented correctly.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-35. Testing an API in API Manager (1 of 2)

• To test the API, click the test icon in the API Manager web application. The test dialog opens.
If you haven’t activated your API, the first time that you test an API, the test dialog prompts
you to make the API online. By selecting this option, you publish the API and its product to the
default gateway of the catalog.
• When the API is published, you can choose the operation that you want to call, provide the
required parameters, and then click the Invoke button. The Invoke action calls the API
operation that is hosted at the gateway.
• For a SOAP proxy policy, the invoke policy forwards the message payload in the assembly flow
to the URL endpoint location. The API gateway can run one invoke policy per flow – you cannot
call multiple invoke policies for SOAP proxies in the same flow.

© Copyright IBM Corp. 2020, 2021 3-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Testing an API in API Manager


• The response
message returns a
successful call of the
DataPower SOAP
proxy policy.
• The example shows
the response
message from a
successful call of the
SOAP proxy on the
DataPower gateway.

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-36. Testing an API in API Manager (2 of 2)

You get an opportunity to test an API in the exercise at the end of this unit.

© Copyright IBM Corp. 2020, 2021 3-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Unit summary • Explain the concept of an API definition


• Describe how to create an API definition
• Define an API operation
• Identify the endpoint URL that gets called by the invoke message
processing policy
• Describe the purpose of the Assemble view in API Manager
• Explain how to test API operations in API Manager

© Copyright IBM Corporation 2020, 2021

Figure 3-37. Unit summary

© Copyright IBM Corp. 2020, 2021 3-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Review questions
1. True or False: Use the API Manager user interface to design APIs.

2. How do you define an SOAP API Definition in API Connect?


A. Import a WSDL document in API Manager
B. Create a SOAP API from the assembly palette
C. Generate a sample with the apic utility
D. Import a SOAP application in API Designer

3. Which environment variable represents the endpoint of the API application?


ƒ $(host)
ƒ $(api.port)
ƒ $(target-url)
ƒ $(host.url)

Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-38. Review questions

Write your answers here:


1.
2.
3.

© Copyright IBM Corp. 2020, 2021 3-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Review answers
1. True or False: Use the API Manager user interface to design APIs.
The answer is True. You use the API Manager to define and design APIs.
2. How do you define a SOAP API Definition in API Connect?
ƒ Import a WSDL document in API Manager
ƒ Create a SOAP API from the assembly palette
ƒ Generate a sample with the apic utility
ƒ Import a SOAP application in API Designer
The answer is A.
3. Which environment variable represents the endpoint of the API application?
ƒ $(host)
ƒ $(api.port)
ƒ $(target-url)
ƒ $(host.url)
The answer is C.
Defining APIs in API Manager © Copyright IBM Corporation 2020, 2021

Figure 3-39. Review answers

© Copyright IBM Corp. 2020, 2021 3-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Exercise: Defining an API that calls an existing SOAP service

Figure 3-40. Exercise: Defining an API that calls an existing SOAP service

With API Connect, you can define an API from existing enterprise services. In this exercise, you
define an API that calls an existing SOAP service. You use the API Manager feature to create an
API definition from an existing WSDL service. The imported WSDL defines the API paths and
methods that map to SOAP web service operations, and map SOAP message types to API data
types. You test the SOAP API in the test feature of API Manager.

© Copyright IBM Corp. 2020, 2021 3-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 3. Defining APIs in API Manager

Uempty

Exercise • Review the SOAP sample


objectives • Create an API definition that invokes an existing WSDL service
• Review the assembly in API Manager
• Test the SOAP API on the DataPower gateway

© Copyright IBM Corporation 2020, 2021

Figure 3-41. Exercise objectives

© Copyright IBM Corp. 2020, 2021 3-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Unit 4. Defining a REST API in API


Manager
Estimated time
01:00

Overview
This unit describes the options for defining REST APIs in API Manager and examines the API
definition file for an OpenAPI specification. You learn how to define a REST API interface for a
target service endpoint. You examine the role of the extensions that API Connect adds to the
OpenAPI definition and how message processing policies are defined in the API assemble view.
You learn the HTTP methods for REST operations and how to create a GET and POST operation in
API Manager.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 4-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Unit objectives • Examine the OpenAPI 2.0 definition file


• Explain the purpose of the OpenAPI definition
• Describe the IBM API Connect extensions to the OpenAPI definition
• Explain how to create a REST API for a target service
• Describe the purpose of the target-url property
• Define query and path parameters
• Define request and response messages
• Describe the message processing policy assembly
• List the HTTP methods in REST architecture
• Add a SWITCH policy to an API assembly
• Define a GET operation
• Define a POST operation

© Copyright IBM Corporation 2020, 2021

Figure 4-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 4-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Topics • Overview of the OpenAPI standard


• IBM extensions to the OpenAPI standard
• Creating a REST API in API Manager
• Defining REST operations

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-2. Topics

© Copyright IBM Corp. 2020, 2021 4-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty
4.1. Overview of the OpenAPI standard

© Copyright IBM Corp. 2020, 2021 4-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Overview
w off the
e
OpenAPII
standard

Defining
Defi
De fini
fining
gaR
REST
EST AP
ES
EST A
API
PI in
in A
API
PI Manager
PI Man
nag
ag
ger
er
er © Copyright IBM Corporation 2020, 2021

Figure 4-3. Overview of the OpenAPI standard

© Copyright IBM Corp. 2020, 2021 4-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Swagger petstore
• The swagger petstore
is a sample pet store
server.
• The site is generated
using Swagger UI.
• The endpoints are:
• pet
• store
• user

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-4. Swagger petstore

• Swagger petstore is used in the slides in this unit as the service endpoint for REST operations.
• Swagger petstore is a sample API that simulates a pet shop management server. The API
allows you to access petstore data by using a set of individual calls. Namely, there are three
endpoint groups Pet, Store, and User. It is useful for testing APIs. In the following slides, the
API configuration for the swagger petstore service is discussed.
▪ Swagger petstore is a publicly available API service endpoint that can be used for testing
purposes.
▪ Swagger petstore is a functioning API with real data. Test data in the database is not
consistent.
▪ There is also a version of the pet store that supports the OpenAPI 3.0 specification:
- https://petstore3.swagger.io/
• To ensure data integrity and service reliability, a local version of the swagger petstore website
is run on your student workstation. The petstore website is run in a Docker container. You use
this version to test your petstore REST APIs.

© Copyright IBM Corp. 2020, 2021 4-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

OpenAPI: REST API interface standard


• The OpenAPI specification defines a standard format for declaring a REST API interface:
ƒ API metadata: Description and version
ƒ Operations
ƒ Data types
ƒ Parameters
ƒ Properties

• OpenAPI documents describe API operations and paths and are represented in either YAML or
JSON formats

• When you create an API in API Connect, you declare an OpenAPI definition
ƒ IBM API Connect extends the Open API specification and adds message processing policies in the
assembly section of the API definition

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-5. OpenAPI: REST API interface standard

• The OpenAPI Specification (OAS) defines a standard interface description for REST APIs. The
Open API 2.0 specification is a community-driven open specification within the OpenAPI
Initiative, a Linux Foundation Collaborative Project. For more information, see:
https://github.com/OAI/OpenAPI-Specification.
• The definition files that are imported or created in this course conform to the OpenAPI
Specification 2.0 that is identical to the Swagger 2.0 specification.
• For the latest OpenAPI specification, refer to: https://swagger.io/specification/

© Copyright IBM Corp. 2020, 2021 4-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

OpenAPI definition structure


• Swagger specification version (2.0)
• Info: API metadata
ƒ Name, description, version

• Schemes: Transfer protocol of the API. For example, https or https


• Host, base path
• Consumes and produces media types
• Paths
ƒ Operations
í Request headers, parameters, and message body
í Response headers, status code, and message body

• Definitions of schema data types


• Security definitions and schemes
• Security requirements
• Environment-specific properties
• Tags
Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-6. OpenAPI definition structure

This page outlines the sections in an OpenAPI definition.


• The info section provides metadata about the API that includes the name, description, and
version information. These fields can be used by the test client in the API Developer Portal to
display documentation from these fields.
• The host and base path entries define the network endpoint for the API.
• The API operations are defined in the paths section.
• You define the structure of the request and response messages for each API operation. An
operation is a combination of an HTTP method, such as GET or POST, with a resource path.
• If you use a complex data type in an HTTP request or response message, you must define the
schema type in the definitions section.
• The security schemes explain the API authentication and authorization schemes.
• The security requirements declare which security schemes apply to which operation.
• The properties store values that are specific to a deployment environment. For example, you
can store the target-url address for all the API operations. The target-url can be a combination
of the host address, path, and search filters.
• The tags entry stores keywords that make it easier for developers to find a list of APIs in a
particular category.
• The OpenAPI specification also supports vendor-specific elements in the definition document.
These extension elements have an “x-” prefix in the name. For example, API Connect adds
gateway processing policies, environment properties, and other metadata in the
“x-ibm-configuration” entry.

© Copyright IBM Corp. 2020, 2021 4-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Sample OpenAPI definition


• This page displays a sample API definition file that is
in YAML format.
• YAML is an acronym for “YAML Ain’t Another Markup
Language” or “Yet Another Markup Language”.
• The output shows the source format of the OpenAPI
definition file.
• When you import the file into a graphical API editor
such as the API Manager, the editor creates a more
easily readable graphical view that is called the
Design View.

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-7. Sample OpenAPI definition

© Copyright IBM Corp. 2020, 2021 4-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

OpenAPI 3.0 specification


OpenAPI 2.0 OpenAPI 3.0
• OpenAPI 3.0 provides
a more streamlined info info
document structure so
that it's easier to write host
security
and reuse API basePath
hosts security

definitions.
securityDefinitions
schemes
• In version 2.0, you
could describe headers produces consumes

but couldn't reuse paths

them as easily as you paths

can in version 3.0.


tags externalDocs
• Support for describing
definitions tags externalDocs
callbacks is a new
feature in version 3.0. parameters

components
responses

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-8. OpenAPI 3.0 specification

• OpenAPI 3.0 has a newly designed document structure to write and reuse API definitions. A
new object that is called components contains reusable objects such as securityDefinitions,
definitions, parameters, and responses.
• IBM API Connect supports the OpenAPI 3.0 specification, with some limitations. The current
implementation includes complete support for the Berlin Group NextGen PSD2 requirements.
• There is no OpenAPI 3.0 API support with the DataPower Gateway (v5 compatible); OpenAPI
3.0 API support is provided by the DataPower API Gateway only.
• The limitations to the OpenAPI 3.0 support in IBM API Connect are as follows:
▪ User interface limitations
- Some aspects of the OpenAPI 3.0 specification are not currently supported by the user
interface. In such circumstances, use the OpenAPI source directly.
- Validation errors that are identified locally are reflected in the API editor header almost
immediately. However, some validation errors can be identified only by the API
Manager backend and are not reflected until the API is saved; this means that, on
saving an API, some validation errors might appear or disappear.
- The user interface does not currently support referencing a request body component
from the request body of an operation. If you want to reference a request body
component, add the reference to the request body of the operation directly in the
OpenAPI source:
requestBody: $ref:
'#/components/requestBodies/request_body_component_name'
However, the reference is confirmed on the details page for the request body in the
user interface, .

© Copyright IBM Corp. 2020, 2021 4-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty
- If, in the API Designer user interface, you create and activate an API of the same name
and version as one that has already been activated from the API Manager user
interface, the Edit Rate Limit operation fails.
• Limitations for APIs that are enforced by the DataPower API Gateway
▪ General limitations
- The servers' array cannot contain more than one server.
- The url entry in the servers' array cannot contain variables.
- path objects cannot contain server object overrides.
- Error code wildcarding in response objects is not supported.
- There is no support for converting a WSDL defined SOAP service into an OpenAPI 3.0
API.
▪ Assembly policies
Only the following policies are supported:
- invoke
- jwt-generate
- jwt-validate
- oauth
- throw
- user-security
- The validate and map policies are not supported.

© Copyright IBM Corp. 2020, 2021 4-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty
4.2. IBM extensions to the OpenAPI standard

© Copyright IBM Corp. 2020, 2021 4-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

IBMM extensionss
to the
e OpenAPII
standardd

Defining
Defi
De fini
fining
gaR
REST
EST AP
ES
EST A
API
PI in
in A
API
PI Manager
PI Man
nag
ag
ger
er
er © Copyright IBM Corporation 2020, 2021

Figure 4-9. IBM extensions to the OpenAPI standard

© Copyright IBM Corp. 2020, 2021 4-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

IBM extensions to the OpenAPI definition format


• In addition to the properties in the OpenAPI specification, IBM API Connect defines a set of
extensions to the API definition file
ƒ An extension property starts with the x-ibm- prefix in its name
ƒ Other platforms and tools safely ignore the IBM extension settings in an exported API definition file

• Examples of extension properties:


ƒ Setting to enable cross-origin resource sharing
ƒ Setting to enable API subscriptions
ƒ Setting to enable API testing
ƒ Message processing policies
ƒ Environment-specific properties

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-10. IBM extensions to the OpenAPI definition format

• The OpenAPI specification defines the API definition as strictly an interface file: it describes
the input and output messages for each operation in the API.
• IBM API Connect extends the role of the OpenAPI definition file to several use cases. The API
Gateway server hosts API operations according to the OpenAPI definition file. It also enforces
a set of message processing rules that you define as an assembly extension. The API Manager
reads the lifecycle extension to determine whether an API is ready for deployment to a
staging or production environment. Last, the Developer Portal reads the subscriptions and
testing extension to determine whether application developers can subscribe and test a
published API.

© Copyright IBM Corp. 2020, 2021 4-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Extensions: Lifecycle settings


• The lifecycle property saves the current
development and deployment lifecycle maturity
of the API
ƒ API Connect defines three phases: identified,
specified, and realized
• The enforced property defines whether the API
Gateway validates operation calls against the API
definition
• The testable property determines whether the
Developer Portal test client can test the API
• The cross-origin resource sharing determines
how to interpret the access-control-allow-origin
HTTP header

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-11. Extensions: Lifecycle settings

• The purpose of the lifecycle extension property is to state the current development state of
the API. In the identified state, the API definition and the API implementation are not
complete. In the specified state, the API definition is complete, but the API application is not
yet implemented. In the realized state, both the API definition and API implementation are
complete.
• The remaining options in the lifecycle section control other settings in the API Connect
environment.
▪ The enforced setting determines whether the API gateway enforces the settings in the API
definition. If this setting is disabled, API is not exposed on the gateway.
▪ The testable setting determines whether an application developer can review and test the
API in the Developer Portal. If this setting is disabled, the operation does not appear in the
test client.
▪ The CORS setting determines whether the API supports the Cross-Origin Resource
Sharing scheme. With the CORS scheme, a web server can use web resources on a named
third-party server with a specific set of rules. For more information about this scheme, see:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

© Copyright IBM Corp. 2020, 2021 4-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty
4.3. Creating a REST API in API Manager

© Copyright IBM Corp. 2020, 2021 4-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Creatingg a REST
T
APII in
n APII
Manager

Defining
Defi
De fini
fining
gaR
REST
EST AP
ES
EST A
API
PI in
in A
API
PI Manager
PI Man
nag
ag
ger
er
er © Copyright IBM Corporation 2020, 2021

Figure 4-12. Creating a REST API in API Manager

© Copyright IBM Corp. 2020, 2021 4-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Create a REST API definition in API Manager


1. Start the API Manager web application
2. Select the Develop option
3. Click Add then, select API
4. Select From target service

If the existing API


implementation already
has an OpenAPI definition,
you can import it directly
into API Manager.

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-13. Create a REST API definition in API Manager

To create an OpenAPI definition of a REST proxy to an existing target API, start the API Manager
web application. Select the Develop APIs and products tile or select the Develop option from the
side menu. Click Add. Then, select API from the drop-down list. In the Add API page, select the
option to create the API from a target service.

Note

API Manager provides options to create a new OpenAPI or to create APIs from existing REST and
SOAP services. The from target service option makes it easy to create a proxy to an existing REST
service.

© Copyright IBM Corp. 2020, 2021 4-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Define the base path and target endpoint


1. Type the title, name, and version number for
the API definition

2. Define a base path to differentiate the API


from other APIs that are hosted at the gateway

3. Specify the target endpoint for the API as


the network location of the existing API
implementation

• The title and description describe the name and a short


overview of the API application
• The version lists the API implementation version
ƒ The OpenAPI definition does not define a version number
scheme. The document stores the value as a string
Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-14. Define the base path and target endpoint

• When you define an API against a service endpoint, you enter metadata on the API: the name,
description, contact information, and version number for the API definition. The API gateway
does not parse this information: it is kept for documentation purposes. One exception is the
version number: you can configure API Manager to manage versions with API lifecycle
management.
• The base path uniquely identifies this API definition from other API definitions that are hosted
at the gateway. Provide a unique path prefix in this document.
• In the target service URL section, specify the target endpoint for the API definition. The
target endpoint is the network location for the API application that implements the interface.

© Copyright IBM Corp. 2020, 2021 4-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Edit the generated OpenAPI definition


• When you complete the prompts in the pages that follow the selection of the from target
service option, API Manager generates the OpenAPI definition.
• API Manager generates the basic
OpenAPI definition with the values
that you specified
• Click Edit API to complete the
configuration of the API definition

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-15. Edit the generated OpenAPI definition

© Copyright IBM Corp. 2020, 2021 4-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Select the gateway type


• Ensure that API Setup is selected in the Design view
• Scroll down to examine the options for the gateway type
• Change the gateway type to the preferred gateway that calls the API

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-16. Select the gateway type

© Copyright IBM Corp. 2020, 2021 4-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Add definitions for response data type


• From the Definitions option
ƒ Click Add.
• Edit the definition and add the properties
ƒ Then, Save

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-17. Add definitions for response data type

• Add the schema definition for the response message from the Definitions option of the
Develop page in API Manager.
• Specify the name of the definition and add the properties. Save when completed.

© Copyright IBM Corp. 2020, 2021 4-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Add a path and operation


• Create a path to call the operations
• Add the operation
• Add the request parameters
• Add the response values

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-18. Add a path and operation

• You specified the location of the API implementation during the initial creation of the OpenAPI
definition.
• To complete the API definition, you must specify the exact interface for the API. The interface
includes the API paths, HTTP operation, request, and response message for each API
operation.
• Parameters represent input data for the operation. You can also define parameters at the path
level.
▪ The OpenAPI specification defines data types in an API definition
• Type the input parameter name, location, description, and type in the parameters section of
the API operation. When you mark a parameter as required, the API gateway checks that the
parameter exists, and its value has the correct data type. The Located in field determines
where the API operation expects to find the parameters:
▪ Path: A path segment in the URL
▪ Query: Query parameters in the URL
▪ Header: HTTP header
▪ Form data: HTML form in message body
▪ Body: Data in message body
• The next topic in this unit covers more detail around the REST operations GET and POST.

© Copyright IBM Corp. 2020, 2021 4-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Configure the gateway to call the REST application


By default, the REST API definition forwards API requests to the API implementation
• The target-url context variable is the network endpoint for the API application
implementation
• The request.path context variable represents the URL
path in the original API request that starts with the base path
of the API
• The api.operation.id context variable represents the
ID of the operation
• The api.operation.path context variable is used with
the Switch policy to define paths in the api assembly
• The api.endpoint.address context variable is the
address of the API Gateway endpoint

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-19. Configure the gateway to call the REST application

• After you define the API operations, you must instruct the API gateway to forward requests to
the API application. The policy assembly is a set of message processing instructions that you
define in an IBM extension section of an OpenAPI definition file. In the API Manager web
application, open the assemble view to review the policies. Keep in mind that the policies
apply to all operations that you defined in the API definition file.
• By default, API Manager creates an assembly with one policy: the invoke policy. At run time,
the API gateway makes an HTTP request to the endpoint in the URL field. This policy calls the
remote endpoint with the API operation that the client sent to the gateway. The target-url
context variable is the target endpoint value that you specify in API Manager. The request
path context variable is the API path name for the operation. You can specify the actual
endpoint address in the URL field of the assembly, or you can specify the URL as a combination
of API Connect context variables.
• For more information, see IBM Documentation for API Connect and use the search string “API
Connect context variables”.

© Copyright IBM Corp. 2020, 2021 4-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Message processing policy assembly


• In API Connect, you can define a set of message processing rules that apply to all operations
in the API.
• At run time, the API
Gateway enforces
the policies that you
define in the API
assembly view

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-20. Message processing policy assembly

• In API Connect, you can define a set of message processing rules that apply to all operations
in the API
▪ At run time, the API Gateway enforces the policies that you define in the API assembly
view
• You explore more about the concept of message processing policies in a later unit and
exercise
• In the screen capture, an example of a Switch policy is displayed. To add a Switch policy to an
API assembly:
▪ Locate the Switch policy component under the Logic section in the palette
▪ Drag the policy to the canvas
▪ In the properties editor for the Switch policy, select the path to take
• Use the Switch policy to execute one of a number of sections of the assembly based on which
specified condition is fulfilled.
• In the exercise at the end of this unit, you get an opportunity to add a Switch policy to your API
assembly.

© Copyright IBM Corp. 2020, 2021 4-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty
4.4. Defining REST operations

© Copyright IBM Corp. 2020, 2021 4-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Defining
g REST
T
operations

Defining
Defi
De fini
fining
gaR
REST
EST AP
ES
EST A
API
PI in
in A
API
PI Manager
PI Man
nag
ag
ger
er
er © Copyright IBM Corporation 2020, 2021

Figure 4-21. Defining REST operations

The next sequence of pages describes how to use the graphical features of API Manager to define
the path and operations for an OpenAPI definition.

© Copyright IBM Corp. 2020, 2021 4-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

HTTP methods in REST architecture


• GET
ƒ Retrieve information from a named resource on the server
ƒ The operation is safe and idempotent
• POST
ƒ Create or update information on a resource
ƒ The operation is not idempotent
• PUT
ƒ Store information at the named resource
ƒ The operation is idempotent
• DELETE
ƒ Remove information at the named resource
ƒ The resource does not have to be removed immediately: it is marked for deletion and no longer
accessible

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-22. HTTP methods in REST architecture

The most common HTTP methods in a REST architecture are: GET, POST, PUT, and DELETE. This
slide quickly reviews the meaning of each operation in a REST architecture.
• A GET method retrieves the entity that is represented as a resource path on the server. The
operation is safe because it is read-only: it does not change the information on the server. It is
also idempotent: calling a GET method multiple times in succession returns the same value.
• The POST method represents an update to the entity on the server. Since POST methods
change values, it is not a safe operation.
• The PUT method stores the entity in the request message onto the server.
One of the main points of confusion is whether to use a POST or PUT method to create or
update a resource. The main difference between the two methods is that PUT is an
idempotent operation, while POST is not idempotent. For example, you can use PUT to send a
billing request. A PUT operation sends the entire billing record in the message body.
Therefore, the entity on the server is the same every time you call PUT: it is an idempotent
operation. However, this behavior is not ensured with a POST operation.
• The DELETE operation removes an entity on the server. The API implementation marks the
resource as not available: the actual data record can be removed later.
The remaining slides in this section describe how to configure GET and POST operations in API
Manager.

© Copyright IBM Corp. 2020, 2021 4-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Example: GET /pet/{petId}

GET /pet/petId=98711
Host: https://petstore/swagger.io/v2
Accept: application/json

• In this example, you send an HTTP GET request to the


API service that is hosted on petstore.swagger.io.
• The REST operation expects an input parameter as a
query parameter: petId. The Content-Type response
message header indicates that the application expects a
response in the application/json format.
• The petstore API returns a response as a JSON object in
the message body.

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-23. Example: GET /pet/{petId}

• The GET request retrieves data from a resource. For example, you'd use a GET request to
retrieve a record from a database.

© Copyright IBM Corp. 2020, 2021 4-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Define a GET operation


• Create a path to call the operation
• Add the operation
• Add the request parameters
• Add the response values

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-24. Define a GET operation

• You specified the location of the API implementation during the initial creation of the OpenAPI
definition.
• To complete the API definition, you must specify the exact interface for the API. The interface
includes the API paths, HTTP operation, request, and response message for each API
operation.
• In this example, you want to define an OpenAPI definition that describes the GET
/pet/{petId} operation in a target service endpoint. In the first step, define the path in the
API. The REST architecture is built on the concept of resources: a function or data record that
you identify by a URL path.
• In the second step, you define an action, or a verb, that you associate with a path. The actions
represent operations that you perform on the resource. The GET /pet/{petId} operation
retrieves a pet object from the pet store.

© Copyright IBM Corp. 2020, 2021 4-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Example: POST /pet

POST /pet
• This example shows the Host: https://petstore.swagger.io
expected request and Accept: application/json
response messages for {{
"id": 98711,
calling the POST "category": {
operation of the "id": 98711,
"name": "string"
petstore.swagger.io },
website. "name": "98711doggie",
"photoUrls": [
• The "string"
],
petstore.swagger.io "tags": [
website uses the same {
"id": 0,
response body as the "name": "string"
GET /pet/{petId} }
operation. ],
"status": "available"
}}
Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-25. Example: POST /pet

• Both GET and POST methods are used to transfer data from client to server in HTTP protocol
but the GET method carries a request parameter that is appended in the URL string while
POST carries the request parameter in the message body, which makes it a more secure way
of transferring data. The POST request creates a new resource, such as an entry in a database.
• This example shows the expected request and response messages for calling the POST
operation of the petstore.swagger.io website. If you build the API definition from scratch,
you need to know these values.
• The POST /pet operation accepts the input parameters as fields in a JSON object.
• The petstore.swagger.io website uses the same response body as the GET /pet/{petId}
operation.
• Instead of sending the parameters that are appended to the target-url, the parameters are
located in the body of the request message.

© Copyright IBM Corp. 2020, 2021 4-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Define a POST operation


• Create a path to call the operation
• Add the operation
• Add the request parameters
• Add the response values

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-26. Define a POST operation

• You follow the same instructions to create a POST.


• Create a second path /pet, then create a second operation with the POST method.
• The POST method posts a new pet object to the pet store database.

© Copyright IBM Corp. 2020, 2021 4-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Unit summary • Examine the OpenAPI 2.0 definition file


• Explain the purpose of the OpenAPI definition
• Describe the IBM API Connect extensions to the OpenAPI definition
• Explain how to create a REST API for a target service
• Describe the purpose of the target-url property
• Define query and path parameters
• Define request and response messages
• Describe the message processing policy assembly
• List the HTTP methods in REST architecture
• Add a SWITCH policy to an API assembly
• Define a GET operation
• Define a POST operation

© Copyright IBM Corporation 2020, 2021

Figure 4-27. Unit summary

© Copyright IBM Corp. 2020, 2021 4-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Review questions
1. What is the host property?
A. It stores the API Gateway server name
B. It stores the API application server name
C. It stores the API Manager server name
D. It stores the API Connect Toolkit host name
2. What is the purpose of the definitions section?
ƒ It stores environment-specific values
ƒ It stores a list of published APIs in a catalog
ƒ It stores a list of HTTP response status codes
ƒ It stores type definitions for the message body
3. True or False: An operation combines a path with an HTTP verb, parameters, and
definitions for requests and responses.

Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-28. Review questions

Write your answers here:


1.
2.
3.

© Copyright IBM Corp. 2020, 2021 4-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Review answers
1. What is the host property?
ƒ It stores the API Gateway server name
ƒ It stores the API application server name
ƒ It stores the API Manager server name
ƒ It stores the API Connect Toolkit host name
The answer is A
2. What is the purpose of the definitions section?
ƒ It stores environment-specific values
ƒ It stores a list of published APIs in a catalog
ƒ It stores HTTP response message parameters
ƒ It stores type definitions for message body data
The answer is D
3. True or False: An operation combines a path with an HTTP verb, parameters, and
definitions for requests and responses. The answer is True.
Defining a REST API in API Manager © Copyright IBM Corporation 2020, 2021

Figure 4-29. Review answers

© Copyright IBM Corp. 2020, 2021 4-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Exercise: Defining a REST API from a target service

Figure 4-30. Exercise: Defining a REST API from a target service

This exercise covers how to define a REST API interface from a target service. First, you review the
structure of the operations you call in your API on the target service website. Then, you build the
API operations, parameters, and definitions in the API Manager web application. You also publish
and test the API from the API Manager test feature.

© Copyright IBM Corp. 2020, 2021 4-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 4. Defining a REST API in API Manager

Uempty

Exercise • Review an existing API endpoint


objectives • Create an API definition in API Manager
• Review the operations, properties, and schema definitions in an API
definition
• Create a GET operation for the existing service endpoint
• Test the API GET operation in the assembly test facility
• Add a SWITCH policy to an assembly
• Create a POST operation for the existing service endpoint
• Test the API POST operation in the assembly test facility

© Copyright IBM Corporation 2020, 2021

Figure 4-31. Exercise objectives

© Copyright IBM Corp. 2020, 2021 4-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Unit 5. Assembling message processing


policies
Estimated time
01:00

Overview
In the API Gateway, message processing policies log, route, and transform API request and
response messages. This unit explores the concept of message processing policies. You learn
how to define a set of message processing policies in your API definition file with the API
Manager.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 5-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Unit objectives • Explain the concept of non-functional requirements


• Identify use cases for message processing policies
• Explain the relationship between message processing policies and
the API application
• Identify the policies that the DataPower API gateway type supports
• Explain the difference between a global-scoped user-defined policy
and a catalog-scoped user-defined policy
• Describe when and how to change the version of an API

© Copyright IBM Corporation 2020, 2021

Figure 5-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 5-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Topics • Overview of message processing policies


• Using the assembly editor
• Example scenarios for policy assemblies
• Changing the version of an API

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-2. Topics

© Copyright IBM Corp. 2020, 2021 5-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty
5.1. Overview of message processing policies

© Copyright IBM Corp. 2020, 2021 5-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Overvieww off
message e
processing g
policies

Assembling
A
As
sse
se
emb
mb
m bliliing
n m
ng message
essa
essag
ge
epprocessing
rro
oce
cessssin
cess sin
ng po
policies
olilici
cies
cies © Copyright IBM Corporation 2020, 2021

Figure 5-3. Overview of message processing policies

• Policies and logic constructs are pieces of configuration that control a specific aspect of
processing in the Gateway server during the handling of an API invocation at run time.
• Policies are the building blocks of assembly flows, and they provide the means to configure
capability, such as security, logging, routing of requests to target services, and transformation
of data from one format to another. Policies can be configured in the context of an API or in the
context of a Plan.
• You have already used the policies: Invoke and Switch. This unit introduces other message
processing policies that you can use to implement your APIs.

© Copyright IBM Corp. 2020, 2021 5-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

What is a message processing policy?


• A message processing policy is an action that transforms, validates, or routes API operations
at the HTTP request and response message level.
• The purpose of message-processing policies is to process requests to an API operation at the
HTTP message level.
• You can transform, validate, or process a request message before it reaches the API
implementation. You can also add logic constructs that route messages based on the content of
the request message.
• The documentation and toolkit also refer to message processing policies as gateway policies,
or policies
• Policies do not implement API operations
ƒ Message processing policies maintain and enforce the non-functional requirements of an API
ƒ The API implementation fulfills the functional requirements of an API
• Message processing policies describe how the API gateway maintains the quality of service,
rather than the operation behavior
Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-4. What is a message processing policy?

• Message processing policies are a set of processing actions that you apply to API operation
request and response messages. You assemble message processing policies as a sequence of
actions in the assembly view of the API Manager web application.
• The API Manager refers to these configured actions as policies. To differentiate this type of
policy against other policies, this course uses the term message processing policy.
• Although you can build conditional logic constructs and APIs calling actions with policies, the
purpose of policies is not to implement API operations. Message processing policies maintain
and enforce the non-functional requirements of an API at the API gateway.
• The API gateway enforces the message processing policies that you define in the API
definition file. In effect, the message policies apply to all operations that you defined in the
API definition.
• The types of message processing policies that you can apply depend on your choice of API
gateway type. A number of policies run only on DataPower API Gateways.

© Copyright IBM Corp. 2020, 2021 5-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

API policies and logic constructs


IBM API Connect provides the following ways that you can create, configure, and apply policies
and logic constructs:
• Policies associated with a Plan
ƒ A Plan provides a mechanism for grouping API operations or subsets of operations from one or more
APIs.
• Built-in policies
ƒ A built-in policy enables you to apply a pre-configured policy statement to an assembly to control
processing capabilities in the Gateway server.
• Logic constructs
ƒ A logic construct enables you to control the flow of data through your assembly during an API call.
• User-defined policies
ƒ A user-defined policy enables you to create your own policies to control extra processing features in
the Gateway server, such as security, or routing of requests.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-5. API policies and logic constructs

• Policies associated with a Plan


▪ A Plan provides a mechanism for grouping API operations or subsets of operations from
one or more APIs. You can set rate limiting policies on a Plan to specify how many requests
an application is allowed to make during a specified time interval. You can also configure a
policy for each operation that is included in a Plan.
• Built-in policies
▪ A built-in policy enables you to apply a pre-configured policy statement to an assembly to
control processing capabilities in the Gateway server. Built-in policies are applied by using
the API Manager assembly editor to add a built-in policy to your assembly and to configure
the properties for that policy.
• Logic constructs
▪ A logic construct enables you to control the flow of data through your assembly during an
API call. Like policies, logic constructs are applied to an API by using the API Manager
assembly editor to add a logic construct to your assembly and to configure the behavior of
the construct.
• User-defined policies
▪ A user-defined policy enables you to create your own policies to control extra processing
features in the Gateway server, such as security, or routing of requests. User-defined
policies are created outside of API Connect and then imported into one or more catalogs,
so they can be applied to an operation in the same way as built-in policies.
More details around user-defined policies are covered on the next slide. How to apply policies and
constructs in the Assembly editor is covered later in this unit.

© Copyright IBM Corp. 2020, 2021 5-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

User-defined policies
• A user-defined policy for the DataPower API Gateway consists of a package containing
configuration details that define the actions of the policy. You publish the package to the
DataPower API Gateway to make it available to APIs that are deployed there.
• There are two types of user-defined policies, catalog scoped user-defined policies and global
scoped user-defined policies:
ƒ Catalog scoped user-defined policies
í Catalog scoped user-defined policies are available to APIs only in the catalogs that you specify. Use
a catalog scoped user-defined policy if you want to limit the availability of your policy on a catalog
specific basis. The possible actions of a catalog scoped user-defined policy are limited to the API
Connect built-in assembly policies.
ƒ Global scoped user-defined policies
í Global scoped user-defined policies are available to APIs in every catalog in every provider
organization. Use a global scoped user-defined policy in the following situations:
• You want to make your policy available everywhere rather than limiting its availability to specific catalogs.
• Your policy uses a DataPower implementation, where configuration changes are made directly on the
DataPower API Gateway.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-6. User-defined policies

Defining and packaging a global-scoped user-defined policy


• A global-scoped user-defined policy is available to APIs in any of the catalogs in any provider
organization. You define your global-scoped policy by creating a .cfg configuration file. This
configuration file consists of DataPower API Gateway CLI commands that specify the actions
of your policy. You then package this file with any dependent files that are referenced from the
CLI commands.
Defining and packaging a catalog-scoped user-defined policy
• A Catalog-scoped user-defined policy is available only to the APIs in the specific catalogs to
which the policy is published. You define your Catalog-scoped policy by creating a .yaml
configuration file. You then package this file in a .zip file.

© Copyright IBM Corp. 2020, 2021 5-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Message processing policies at run time


1. API validates the HTTP
request API Gateway
2. API enforces a series of 1 2 3 API
implementation
message processing
inventory
policies
4
3. API provider API application
implementation receives
API definition
the request
Product
4. Gateway runs message
processing policies after
the invoke policy At run time, the API Gateway
enforces a set of message
processing policies that you
defined in the API definition file

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-7. Message processing policies at run time

You publish an API definition, product, and plan to the API Manager. API Manager sends the
message processing policy to the API gateway and configures an API endpoint according to the
API definition.
1. When the API gateway receives an HTTP request, it validates the message against the API
definition.
2. The API gateway also enforces a series of message processing policies that are defined in the
API definition. In the simplest case, the assembly includes one policy: to call the API
implementation.
3. The API provider implementation receives the request. After it processes the request, it sends
an HTTP response back to the API gateway.
4. If the assembly includes message processing policies after the invoke policy, the gateway
runs these policies before the HTTP response message is sent back to the client application.

© Copyright IBM Corp. 2020, 2021 5-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty
5.2. Using the assembly editor

© Copyright IBM Corp. 2020, 2021 5-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Using
g the
e
assemblyy editor

Assembling
A
As
sse
se
emb
mb
m bliliing
n m
ng message
essa
essag
ge
epprocessing
rro
oce
cessssin
cess sin
ng po
policies
olilici
cies
cies © Copyright IBM Corporation 2020, 2021

Figure 5-8. Using the assembly editor

© Copyright IBM Corp. 2020, 2021 5-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Assembly editor: Creating policy assemblies


• The assemble view in
the API Manager web
application is a
graphical editor for a
sequence of message
processing policies.
• The main parts consist
of the canvas, palette,
and various search
bars.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-9. Assembly editor: Creating policy assemblies

• The API Manager application writes the policies and logic constructs in the assemble section
of the x-ibm-configuration extension entry of the OpenAPI document when you save the API
definition file.
• The palette includes a number of expandable and collapsible drawers with the labels Logic,
Transforms, Policies, and Security. When expanded, each drawer lists the available
components.
• The content of the palette depends on the gateway type that is selected for the API in the
OpenAPI definition.

© Copyright IBM Corp. 2020, 2021 5-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Assembly editor: Palette and canvas


• The palette lists the
configuration
constructions that you
can place onto the
canvas
• The canvas represents
the assembly flow

The Logic section lists


a set of logic
constructs that control
the flow of policies. The canvas represents the
assembly flow. You drag
The Policies section logic constructs and
lists actions that you policies from the palette
apply to a request or into the state diagram.
response message.
Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-10. Assembly editor: Palette and canvas

• The palette lists the configuration constructions that you can place onto the canvas. More
details related to the palette sections are covered later.
• Logic constructs control the message flow across policies. For example, you can set a Switch
with a sub flow for each API operation. Policies represent actions that the API Gateway runs
on a request or response message.
• The canvas represents the assembly flow: a sequence of policy actions that the API Gateway
applies to HTTP request and response messages.
• The open circle represents the incoming API request, and the filled circle represents the
response that you return to the caller. You must have an invoke action that calls the API from
the gateway. The policies to the left of the invoke policy apply to HTTP request messages. The
policies to the right of the invoke policy apply to the HTTP response message.
• Although you have been using the assembly editor in your exercises, this unit covers more
detail around the various policies that can be implemented, and the use cases associated with
them.
• In the screen capture, the petstore API is displayed with a Switch policy and two Invoke
policies.

© Copyright IBM Corp. 2020, 2021 5-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Assembly editor: Magnify and zoom


• The compass-like icon
represents the fit to
screen feature.
• When you select this
option, the canvas zooms
in or out until the entire
row of message
processing policies
appear in view.
• You can also use the
manual zoom controls to
zoom in and out of a
specific part of the
canvas.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-11. Assembly editor: Magnify and zoom

© Copyright IBM Corp. 2020, 2021 5-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Assembly editor: Filter, search, and gateway type


• The quickest way to
find a message
processing policy is to
enter the policy name
into the filter bar.

Use the search bar


to find a policy on
the canvas by its
name.
Use the filter bar to
quickly find a palette
item by its name.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-12. Assembly editor: Filter, search, and gateway type

The quickest way to find a message processing policy is to enter the policy name into the filter
bar. To find a policy or logic construct on the canvas, type the name in the search bar.

© Copyright IBM Corp. 2020, 2021 5-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Assembly editor: Properties editor

In the properties
editor, change the
settings for the
policy action.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-13. Assembly editor: Properties editor

The properties editor reveals more settings for the selected policy.
• In this example, the invoke policy is selected. The invoke properties view has a title, a
description, a URL, TLS profile, timeout, and more settings.
• In this example, the URL is set to an actual endpoint address to which the gateway forwards
the request.

© Copyright IBM Corp. 2020, 2021 5-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Assembly editor: palette


• The palette includes a
number of expandable
and collapsible
drawers with the labels
Logic, Transforms,
Policies, and Security.
When expanded, each
drawer lists the
available components.
• The content of the
palette depends on the
gateway type that is
selected for the API in
the OpenAPI definition.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-14. Assembly editor: palette

• The palette includes a number of expandable and collapsible drawers with the labels Logic,
Transforms, Policies, and Security. When expanded, each drawer lists the available
components.
• The content of the palette depends on the gateway type that is selected for the API in the
OpenAPI definition.

© Copyright IBM Corp. 2020, 2021 5-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

API policies and logic constructs


• The palette in the
assembly editor
divides the list of
items into
categories: logic
constructs,
policies, security, Logic
and transforms. constructs

The logic constructs


and policies in the
palette apply to a
specific type of API DataPower
Gateway Gateway policies

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-15. API policies and logic constructs

• Logic constructs change the sequence in which the gateway runs policy actions.
• Policies, Security, and Transforms perform an action on the HTTP message, or an environment
variable.
• You must specify which type of gateway each API uses in the OpenAPI API definition. The two
gateway types are the DataPower API gateway and the DataPower Gateway (v5 compatible).
• Each DataPower Gateway supports its own set of logic, policies, transforms, and security
policies.
• For example, an operation-switch component is supported by the DataPower Gateway (v5
compatible) gateway type. For the DataPower API gateway, the same function is provided by
the switch component. In some cases, the same policy is supported by both gateway types,
but with a different version number.
• These policies are not interchangeable – you must use the correct policy according to the
gateway type.
• The palette shows the available policies according to the gateway type that is specified for the
API in the OpenAPI definition.
• When you modify your API definitions to use a specific gateway type, you must ensure that
each policy and policy version in the API are supported by the gateway type.

© Copyright IBM Corp. 2020, 2021 5-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty
5.3. Example scenarios for policy assemblies

© Copyright IBM Corp. 2020, 2021 5-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example e
scenarioss forr
policyy
assemblies

Assembling
A
As
sse
se
emb
mb
m bliliing
n m
ng message
essa
essag
ge
epprocessing
rro
oce
cessssin
cess sin
ng po
policies
olilici
cies
cies © Copyright IBM Corporation 2020, 2021

Figure 5-16. Example scenarios for policy assemblies

© Copyright IBM Corp. 2020, 2021 5-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example scenarios for policy assemblies


1. Forward requests to an API implementation
2. Select a sequence of policies based on the API operation
3. Map responses from multiple API calls into a single response
4. Transform REST API requests into a SOAP service request
5. Validate properties in an HTTP request message
6. Store the request message payload into API analytics
7. Redact specific fields from the response body to obfuscate sensitive data

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-17. Example scenarios for policy assemblies

This list introduces separate example scenarios that you can author with API policies and logic
constructs. This list is not exhaustive: policies cover many other message processing scenarios.
1. In the simplest scenario, you proxy all API operations to an existing API implementation.
2. You use an operation-switch construct to select a sequence of policies based on the API
operation. This policy is a case statement that handles different API operations.
3. Map responses from multiple API calls into a single response.
4. Transform REST API requests to a SOAP service request.
5. Validate properties in an HTTP request message.
6. Store the request message payload into API analytics.
7. Redact specific fields from the response body to obfuscate sensitive data.
The following set of slides explains how to handle these scenarios with policies.

© Copyright IBM Corp. 2020, 2021 5-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example one: Forward an API call with the invoke policy


• When you create an API definition, API Manager forwards API operations with an invoke policy.
• The policy calls the API application with the following target URL:
ƒ $(runtime-url): Name of server that hosts the API implementation.
ƒ $(request.path): The path portion of an API operation.
ƒ $(request.search): The HTTP query string with the question mark (?) delimiter.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-18. Example one: Forward an API call with the invoke policy

When you create an API definition, API Manager forwards API operations with an invoke policy.
• The URL in the properties view is where the target endpoint URL is specified.
• The URL can be an actual web endpoint address.
• The URL in the invoke properties view can also be specified as an API Manager context
variable, for example, $(target_url).
• In an assembly policy field that supports variable references, such as the properties view, use
the syntax $(variable).
• Variables can also be concatenated, for example:
$(runtime-url)$(request.path)$(request.search).

© Copyright IBM Corp. 2020, 2021 5-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example two: Switch case by API operation


• When the switch policy receives an API request, it selects a case that matches the operation
condition.
ƒ Each case contains a
sequence of API
policies.
ƒ If none of the cases
match the current API
operation, the gateway
runs the next policy after
the operation-switch.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-19. Example two: Switch case by API operation

• The switch policy is used to select a case that matches the operation condition when an API
request is received on the API Gateway type.
• You configured this policy in a prior exercise.

© Copyright IBM Corp. 2020, 2021 5-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example three (1 of 3): Map multiple API calls into a response


• The invoke policy makes an HTTP request to any network endpoint.
ƒ You define the target URL and HTTP method for the service call
• You can define several invoke policies in a single assembly flow.
ƒ By default, the return message from the invoke policy overwrites the response message for the
assembly flow
ƒ To avoid this behavior, save the response from each invoke policy into a different context variable
• Use a map policy to combine properties from several invoke policies into one API response
message
ƒ In this example, the map policy combines the results from the invokeInventory and invokeSold
policies

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-20. Example three (1 of 3): Map multiple API calls into a response

In this example, you make two consecutive calls to back-end services and then aggregate the
responses into a single response with the map policy.
• You can define several invoke policies in a single assembly flow.
• By default, the return message from the invoke policy overwrites the response message for
the assembly flow.
• To avoid this behavior, save the response from each invoke policy into a different context
variable.
• For example, in the properties dialog for invokeInventory policy, define a context variable
that is named vInventory in the response object variable field.
• Then, in the properties dialog for invokeSold policy, define a context variable that is named
vSold in the response object variable field.
• You can then reference these variables in the mapping policy editor.
On the next page, you see how these context variables are used by the map policy of the
assembly.
You have an opportunity to build this assembly in the exercise at the end of this unit.

© Copyright IBM Corp. 2020, 2021 5-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example three (2 of 3): Map multiple API calls into a response


• In the previous example, the invoke
policies save the responses from remote
API calls into two context variables:
ƒ vInventory
ƒ vSold
• The input column of the map policy
reads the body of the response messages
• The inline schema makes sure that the
responses from the remote API calls
match the structure that you expect

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-21. Example three (2 of 3): Map multiple API calls into a response

© Copyright IBM Corp. 2020, 2021 5-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example three (3 of 3): Map multiple API calls into a response


• In this example, you aggregate results from the Inventory and Sold API calls to a single
response message
• In the map column, draw a wire between the nodes in the input and output columns to copy
properties into the output message
• In the output column, you define the structure of the message payload after the map policy

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-22. Example three (3 of 3): Map multiple API calls into a response

© Copyright IBM Corp. 2020, 2021 5-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example four (1 of 2): Transform SOAP to REST


• In this example, a SOAP service is called and returns the result as a JSON object in an HTTP
message.
• The invoke policy sends the SOAP message to a remote service.
• The gatewayscript policy sets the response message content-type to application/xml
ƒ Some SOAP services set the content-type to application/soap+xml instead of
application/xml
• The parse policy validates the message contents
• The xml-to-json policy converts the SOAP response message into a JSON object.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-23. Example four (1 of 2): Transform SOAP to REST

• In this example, a SOAP service is called and returns the result as a JSON object in an HTTP
message.
• You have an opportunity to apply this pattern to the previous mock Soap service you used in a
prior exercise.

© Copyright IBM Corp. 2020, 2021 5-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example four (2 of 2): What is the message payload?


• The message payload is the current message state in the assembly flow.
ƒ At the start of the assembly flow, the original request message is the payload.
ƒ You can modify, transform, or even replace the payload with API policies in the assembly flow.
ƒ At the end of the assembly flow, the gateway sends the payload as the response message to the API
call.

SOAP XML SOAP XML SOAP response + Parse JSON object


request response modified header response from XML

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-24. Example four (2 of 2): What is the message payload?

© Copyright IBM Corp. 2020, 2021 5-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example five: Validate properties in an HTTP message


• Use the validate policy to check
whether the message payload matches
a defined schema type.
• To validate the original request
message, add validate with the request
definition at the start of the flow
• To validate an intermediate response,
add validate with a custom definition.
• To validate the API response message,
add validate with the response
definition after the policies that collate
the final response message.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-25. Example five: Validate properties in an HTTP message

Use the validate policy to check whether the message payload matches a defined schema type at
any stage in the message processing sequence.

© Copyright IBM Corp. 2020, 2021 5-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Example six: Store message payload in API analytics


• For a DataPower API
gateway type, use the
Activity Log tab in API
Manager Design view to
configure logging
preference for the API
activity that is stored in
Analytics

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-26. Example six: Store message payload in API analytics

• For a DataPower API gateway, use the Activity Log tab in API Manager Design view to
configure logging preference for the API activity that is stored in Analytics.
• The information that the policy collects is saved in an API event record, a log entry that
captures the metadata in each API execution event.
• Choose whether to save metadata on the invocation URL (activity), the activity and header
(header), or the activity and message payload (payload).
• You can set different settings for normal operation (content) or when an error occurs when the
API is called (content on error).
• You must associate the API Connect analytics feature with the selected gateway type in Cloud
Manager to retrieve the activity log.
• The activity-log policy captures four types of content:
▪ The none setting indicates that no logging occurs.
▪ The activity setting stores the resource URL that the client called. This option is the
default setting for normal operation.
▪ The header setting stores the activity and the request header.
▪ The payload setting stores the activity, the request header, and the request message
body. This option is the default setting for an error event.
• Note: If you set the activity-log level to none, the option disables notifications for application
developers who use your Developer Portal.

© Copyright IBM Corp. 2020, 2021 5-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Note

If the API is defined to use the DataPower API Gateway, then the Activity Log tab in API Manager
replaces the activity-log policy that is defined in the assembly flow for the DataPower Gateway
(v5 compatible) type.

© Copyright IBM Corp. 2020, 2021 5-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty
Example seven: Redact specific fields from the response
body to obfuscate sensitive data
• Use the redact policy to completely remove or to redact specified fields from the request body,
the response body, or the activity logs.
• You might find this policy useful for removing or blocking out sensitive data (for example,
credit card details) for legal, security, or other reasons.
• With the DataPower API Gateway, the input to the redact policy must be parsed data. One way
to produce parsed data is to use a parse policy before a redact policy in your assembly flow.
• If you want to apply the action to either request or response data, specify a value of
message.body. The actual content to which the action is applied then depends on the
positioning of the redact policy in the overall assembly flow.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-27. Example seven: Redact specific fields from the response body to obfuscate sensitive data

You have an opportunity to perform a redaction in the next exercise by using the mapping policy.

© Copyright IBM Corp. 2020, 2021 5-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty
5.4. Changing the version of an API

© Copyright IBM Corp. 2020, 2021 5-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Changingg thee
version
n off an
n
API

Assembling
A
As
sse
se
emb
mb
m bliliing
n m
ng message
essa
essag
ge
epprocessing
rro
oce
cessssin
cess sin
ng po
policies
olilici
cies
cies © Copyright IBM Corporation 2020, 2021

Figure 5-28. Changing the version of an API

You can create multiple versions of an API definition and edit the versions independently. As you
continue to develop your APIs, versioning becomes important. As you make changes to some of
the existing APIs in the next exercise, you create new versions first. This section covers how to
version your APIs.

© Copyright IBM Corp. 2020, 2021 5-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Change an API version (1 of 3)


• Open the Develop
page in API
Manager
ƒ APIs tab is
selected
ƒ Then, select Save
as New Version
from the list of
options for the
API

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-29. Change an API version (1 of 3)

You can create a new version of an API from the Develop page of API Manager.
With the APIs tab selected, select the Save as a New Version option for the API for which you
want to create a new version.

Note

Check the provider organization role permissions to verify whether or not the member can create a
new version for the API.

© Copyright IBM Corp. 2020, 2021 5-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Change an API version (2 of 3)


• Type the version number in the dialog
• Then, click Submit

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-30. Change an API version (2 of 3)

• When you save a new version of the API, you are prompted to type the version number. Then,
click Submit.
• The version corresponds to the info.version property value of the API's OpenAPI definition.
The version.release.modification version numbering scheme is recommended, for
example 2.0.0.

© Copyright IBM Corp. 2020, 2021 5-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Change an API version (3 of 3)


• You have created a new version of your API definition, which you can now edit independently
of other versions.
• Each version of the API definition is listed separately on the APIs page.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-31. Change an API version (3 of 3)

The new version of the API is saved and is displayed in the list of APIs.

© Copyright IBM Corp. 2020, 2021 5-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Unit summary • Explain the concept of non-functional requirements


• Identify use cases for message processing policies
• Explain the relationship between message processing policies and
the API application
• Identify the policies that the DataPower API gateway type supports
• Explain the difference between a global-scoped user-defined policy
and a catalog-scoped user-defined policy
• Describe when and how to change the version of an API

© Copyright IBM Corporation 2020, 2021

Figure 5-32. Unit summary

© Copyright IBM Corp. 2020, 2021 5-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Review questions
1. True or False: It is not a recommended practice to implement API operations with policies.
2. What is the message payload?
A. The payload is the input parameters of an API operation.
B. The payload is the API request header.
C. The payload is the API parameter list.
D. The payload is a buffer that the policy assembly uses to process or construct an API response
message.
3. Which policy is only available on the DataPower API Gateway type?
ƒ Validate.
ƒ Switch.
ƒ Invoke.
ƒ Set Variable.

Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-33. Review questions

Write your answers here:


1.
2.
3.

© Copyright IBM Corp. 2020, 2021 5-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Review answers
1. True or False: It is not a recommended practice to implement API operations with policies.
The answer is True.
2. What is the message payload?
ƒ The payload is the input parameters of an API operation.
ƒ The payload is the API request header.
ƒ The payload is the API parameter list.
ƒ The payload is a buffer that the policy assembly uses to process or construct an API response
message.
The answer is D.
3. Which policy is only available on the DataPower API Gateway type? The answer is B.
ƒ Validate.
ƒ Switch.
ƒ Invoke.
ƒ Set Variable.
Assembling message processing policies © Copyright IBM Corporation 2020, 2021

Figure 5-34. Review answers

© Copyright IBM Corp. 2020, 2021 5-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Exercise: Assembling message processing policies

Figure 5-35. Exercise: Assembling message processing policies

This exercise explains how to create message processing policies. You define a sequence of
policies in the assembly view of API Manager. You define an API that exposes an existing SOAP
service as a REST API. You also define an API that transforms responses from an existing service
into a defined message format and map multiple invocations into one using the mapping policy.

© Copyright IBM Corp. 2020, 2021 5-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 5. Assembling message processing policies

Uempty

Exercise • Create a new version of an API


objectives • Configure an API to call a SOAP service and return the result as a
JSON object
• Define input and output parameters in a map policy
• Map responses from multiple API calls into a single response
• Redact specific fields from the response body to obfuscate sensitive
data

© Copyright IBM Corporation 2020, 2021

Figure 5-36. Exercise objectives

© Copyright IBM Corp. 2020, 2021 5-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Unit 6. Declaring client authorization


requirements
Estimated time
01:00

Overview
This unit explores how to define client authorization requirements in the API definition. The client
authorization requirements specify which authentication and authorization standards to enforce.
You learn how to configure API keys, HTTP basic authentication, and OAuth 2.0 authorization
schemes.

How you will check your progress


• Review questions

© Copyright IBM Corp. 2020, 2021 6-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Unit objectives • Identify the security definition options in API Connect


• Describe the purpose of user registries
• Identify the types of supported user registries in Cloud Manager
• Describe the role of Transport Layer Security (TLS) profiles
• Explain the concept and use cases for API keys
• Explain the concept and use cases for HTTP basic authentication
• Explain the concept and use cases for OAuth 2.0 authorization
• Explain the steps in the OAuth 2.0 message flow

© Copyright IBM Corporation 2020, 2021

Figure 6-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 6-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Topics • Managing authentication and security


• API security concepts
• Identify client applications with API key
• Authenticate clients with HTTP basic authentication
• Introduction to OAuth 2.0.

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-2. Topics

© Copyright IBM Corp. 2020, 2021 6-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
6.1. Managing authentication and security

© Copyright IBM Corp. 2020, 2021 6-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Managingg
authentication
n
and
d security

Declaring
Decl
De ccllar
arin
ing cl
cclient
lie
enntt authorization
aut
utho
utho
hori
riza
za
zati
attiion
ion
on rrequirements
eq
e qui
qui
uire
emme
ent
ntss © Copyright IBM Corporation 2020, 2021

Figure 6-3. Managing authentication and security

© Copyright IBM Corp. 2020, 2021 6-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Working with user registries


• To secure your API Connect catalogs, you authenticate with a user registry
• View the user registries that are configured for Cloud Manager and API Manager
ƒ In Cloud Manager, select Cloud Settings > User Registries
• Default user registry is the local user registry that cannot be configured
• A registry cannot be changed after a user is invited to be the owner of a provider
organization

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-4. Working with user registries

• Registries that are supported in the Cloud Manager and API Manager:
▪ Local user registry
▪ URL authentication
▪ LDAP
• Default user registry is the local user registry that cannot be configured.
• The admin user is unique and always remains in the Cloud Manager local user registry.
• You can add user registries from the Resources > User Registries page in Cloud Manager.
• In the Cloud Manager and API Manager, a registry cannot be changed after a user is invited to
be the owner of a provider organization, even if the invitation is not yet accepted.
• The example that is shown is taken from the Cloud Manager user interface and it displays the
user registries that are configured for Cloud Manager and API Manager.
• In the example, Cloud Manager and API Manager use separate local user registries.

© Copyright IBM Corp. 2020, 2021 6-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Authenticating with user registries


User registries of the following types can be used for authentication in API Connect:

User registry type Description Used for:

Local user registry An internal registry that is stored with API Authentication of
Connect users
LDAP directory Lightweight Directory Access Protocol Authentication,
(LDAP) API security

Authentication URL Enables integration with third-party Authentication,


authentication providers API security

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-5. Authenticating with user registries

• By using an enterprise registry such as LDAP, you have access to all the users that are already
defined in the LDAP directory when it is configured in API Connect.
• A local user registry cannot be pre-populated since users can only be added by using Cloud
Manager, API Manager, or the Developer Portal user interfaces.

© Copyright IBM Corp. 2020, 2021 6-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

TLS profiles
• TLS profiles are used in API Connect to secure transmission of data through websites
• TLS (Transport Layer Security) certificates ensure that information that you submit is not
going to be stolen or altered
• API Connect provides a Default TLS profile
ƒ Uses self-signed certificates
ƒ Can be used for development and testing

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-6. TLS profiles

• In API Connect, TLS profiles are used to secure transmission of data through websites.
• Transport Layer Security (TLS) are cryptographic protocols that provide communications
security over a computer network.
• API Connect might need to transmit data across an untrusted network, for example, when
accessing the Gateway, email server, or LDAP server. TLS provides secure network layer
transportation of data between two parties.
• The course lab environment uses the default TLS profiles that are provided with API Connect.

© Copyright IBM Corp. 2020, 2021 6-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Default TLS profiles


• A TLS Server Profile is used by the Gateway to configure its endpoint for use during API
execution
• A TLS Client profile is used whenever the system needs to communicate with another
endpoint over TLS

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-7. Default TLS profiles

• API Connect provides two types of TLS Profiles: a Default TLS Server and Default TLS Client
Profile. Information regarding the protocol, self-signed certificate, and cipher settings can be
viewed or edited by clicking the relevant profile.
• For production systems, consider replacing the certificates with those created by your
organization or with one from a certificate authority (CA).

© Copyright IBM Corp. 2020, 2021 6-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
6.2. API security concepts

© Copyright IBM Corp. 2020, 2021 6-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

APII securityy
concepts

Figure 6-8. API security concepts

© Copyright IBM Corp. 2020, 2021 6-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Authentication and authorization: API security definitions


• To enforce authentication and authorization for your API, define and apply security definitions
in your API definition
ƒ Your gateway authenticates users to verify the identity of the client
ƒ The gateway authorizes access to an API operation for clients that you allow

• API security definitions do not handle all aspects of API security


ƒ For example, you define transport level security (TLS) providers in the IBM API Management Server

• Not every API needs to be secured


ƒ Some resources might not contain sensitive information

Client Public API endpoint


application network

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-9. Authentication and authorization: API security definitions

• To enforce authentication and authorization for your API, define and apply security definitions
in your API definition. Your gateway authenticates users to verify the identity of the client. The
gateway authorizes access to an API operation for clients that you allow.
• This unit discusses how to authenticate and authorize API clients with IBM API Connect. You
must consider other aspects of API security, but API security definitions do not cover those
aspects. For example, API security definitions do not cover encryption and integrity. In API
Manager, you define transport level security (TLS) profiles to specify the keys and certificates
that secure data transmission over a network.
• Last, consider the fact that not every API needs to be secured. Some resources might not
contain sensitive information.

© Copyright IBM Corp. 2020, 2021 6-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

How do you secure your APIs in API Connect?


1. Create a security definition
ƒ The security definition states which security scheme API Connect applies to your API
ƒ The definition specifies the configuration settings for the scheme

2. Enable a security definition to your API


ƒ To call an API operation, the client application must provide the information that you specified in the
security definition
ƒ You can apply a security definition to an entire API, or a specific operation within an API

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-10. How do you secure your APIs in API Connect?

The security definitions that you create in an API definition configure the client authentication and
authorization schemes.

© Copyright IBM Corp. 2020, 2021 6-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

What types of security definitions can you define?

Definition type Description

API key The API key scheme authenticates the API caller
from the client ID and client secret credentials

Basic The HTTP basic authentication scheme enforces


authentication and authorization at the HTTP
message protocol layer

OAuth 2.0 The OAuth 2.0 scheme is a token-based


authentication protocol that allows third-party
websites to access user data without requiring the
user to share personal information

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-11. What types of security definitions can you define?

What types of security definitions can you define?


• In API Connect, the three security definitions configure client authentication and authorization
for API clients.
• The API key scheme authenticates the API caller from the client ID and client secret
credentials. The HTTP basic authentication scheme enforces authentication and authorization
at the HTTP message protocol layer. The OAuth 2.0 scheme is a token-based authentication
protocol that third-party websites can use to access user data without requiring the user to
share personal information.
• Other security aspects, such as message encryption, are not covered in the security settings in
your API definition.

© Copyright IBM Corp. 2020, 2021 6-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
6.3. Identify client applications with API key

© Copyright IBM Corp. 2020, 2021 6-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Identifyy clientt
applicationss withh
APII key

Figure 6-12. Identify client applications with API key

• When you create an API key security definition in an API, you specify the credentials that an
application must provide to identify itself when calling the API operations.
• You can require that, when calling an API operation, an application must provide either a client
ID, or a client ID and client secret; you create an API key security definition to specify a
credentials requirement. If you require that an application must provide both a client ID and
client secret, you must create two API key security definitions, one for each type of
credentials.

© Copyright IBM Corp. 2020, 2021 6-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

API key: A unique client application identifier


• The API key scheme defines two types of security
metadata:
ƒ The Client ID is a unique identifier for the client application

ƒ The Client secret is an extra piece of information that


authenticates the client application
ƒ The client secret plays a similar role as a password for the
client

• When you create an API definition, API Connect creates a


security definition for a Client ID

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-13. API key: A unique client application identifier

• The API key uniquely identifies the client application. If you enable clientID as a security
requirement in your API, the client must provide its client ID on every API operation call. In
addition to establishing the client identity, API Connect uses the client ID value for analytics
and to enforce operation quotas.
• The client secret is a unique value that API Connect generates. When a client developer
registers an application, the API Connect Developer Portal creates and provides the client ID
and client secret.
• You can create a new OpenAPI in API Manager and clear the option to Secure using Client ID
during creation. A security definition that is named clientIdHeader with an API Key is still
added to the security definitions for the API. The clientIdHeader security definition defaults
to an API Key type that specifies the Client ID as the unique identifier.
• If you want the API to use the API Key, you must still add it in the Security tab of the Design
view for the API.

© Copyright IBM Corp. 2020, 2021 6-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Secure with Client ID (1 of 2)


• Select Secure using Client ID during API creation
ƒ The client ID API Key is generated into the security definitions for the API

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-14. Example: Secure with Client ID (1 of 2)

When the Secure using Client ID option is selected during the creation of the API, the client ID
API Key type is generated into the security definitions for the API.

© Copyright IBM Corp. 2020, 2021 6-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Secure with Client ID (2 of 2)


• The client ID API Key type is added to the Security definitions

• Client ID API Key Security is enabled for the API

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-15. Example: Secure with Client ID (2 of 2)

• When the option that is named Secure using Client ID is selected during the creation of the
API, the client ID API Key type is generated into the security definitions for the API.
• The client ID API Key is also enabled on the security tab for the API.

© Copyright IBM Corp. 2020, 2021 6-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Add client secret security definition


• To manually add
1
the client secret
API Key security
definition:
1. Click the option
to add a security
2
definition.
2. Type the name
for the client
secret, select API
Key for the type,
and Client secret
for the key type.
3. The security 3
definition is
added when you
save the changes.
Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-16. Example: Add client secret security definition

You can add the client secret API Key security definition after you create the client ID API Key
security definition. The security definition contains security settings that you enforce to define
access control requirements for the operations in the API, by applying the security definition to an
API.

© Copyright IBM Corp. 2020, 2021 6-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Applying security definitions (1 of 2)


• After you create an API
key security definition, you
must apply the security
requirement in the
Security section of your
API definition.
• In the example, you added
the client secret to the
security definitions.
• Select the security
definition option in the
security section of your
API definition to apply the
security scheme to your
API.

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-17. Applying security definitions (1 of 2)

© Copyright IBM Corp. 2020, 2021 6-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Applying security definitions (2 of 2)


• When you enable a
security definition, you
automatically enable the
setting to every operation
in your API
• You can override this
behavior by selecting a
specific API operation
ƒ After you apply a security
definition, you can enable or
clear the security
requirement on an API
operation level in the paths
API definition section

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-18. Applying security definitions (2 of 2)

• When you enable a security definition, you automatically enable the setting for every
operation in your API.
• You can override this behavior by selecting a specific API operation and changing the security
setting in the API operation.

© Copyright IBM Corp. 2020, 2021 6-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Rules for defining client ID and client secret


• You can define at most one client ID and one client secret security definition in an API
definition
• For any API definition, you can apply:
ƒ No API key security definitions
ƒ One client ID security definition
ƒ One client ID and one client secret definition
• If you require the application developer to supply both client ID and client secret, you must
apply two separate API key security definitions
• You can specify the client ID and client secret values as HTTP headers or query parameters
ƒ You must specify the same location for the client ID and client secret, either the header or query
parameters

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-19. Rules for defining client ID and client secret

• You cannot apply more than two API key security definitions to an API.
• If you apply an API key security definition for a client secret, you must also apply an API key
security definition for the client ID.
• If you require the application developer to supply both client ID and client secret, you must
apply two separate API key security definitions.
• The API keys are sent in the request header or as a query parameter. Both API keys must
specify the same location, either the header or query parameters.

© Copyright IBM Corp. 2020, 2021 6-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Client ID and client secret in the message header


• Two locations are used to store the client ID and client secret:
ƒ As HTTP headers:

GET https://localhost:4002/api/products
Content-Type: application/json
Accept: application/json
X-IBM-Client-Id: b91e945a-21wf-4869-bb7bay130d
X-IBM-Client-Secret: n29ax9RMn3ai2iasdf92DKSF92asdf

ƒ As query parameters:

GET https://localhost:4002/api/products?client_id=
b91e945a-21wf-4869-bb7bay130d
&client_secret=n29ax9RMn3ai2iasdf92DKSF92asdf
Content-Type: application/json
Accept: application/json

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-20. Example: Client ID and client secret in the message header

• The names of the HTTP headers and the query parameters are the default names that API
Connect sets. You can change the name of these fields in the API key security definitions.
• As the API developer, you choose whether to store API key information as headers or query
parameters. The logical place to put client metadata is in the request message header.
However, if you want to test a simple GET operation, it is easier to specify the client ID and
client secret information as query parameters.

© Copyright IBM Corp. 2020, 2021 6-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
6.4. Authenticate clients with HTTP basic
authentication

© Copyright IBM Corp. 2020, 2021 6-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Authenticatee clientss
with
h HTTPP basicc
authentication

Figure 6-21. Authenticate clients with HTTP basic authentication

© Copyright IBM Corp. 2020, 2021 6-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Verifying identity with HTTP basic authentication


• HTTP basic authentication is a widely implemented scheme for sending client user credentials
to a web server
ƒ The client writes the username and password in the HTTP header
• User credentials are not encrypted or hashed in the header
ƒ Base64 encoding prevents sensitive data from being displayed as plain text when the message is
transmitted
ƒ Base64 encoding does not protect the contents of the message from being intercepted and decoded
with a Base64 decoder
Username Password
Authorization: basic myuserid:mypassword

base64 encoding

Authorization: basic bXl1c2VyaWQ6bXkgcGFzc3dvcmQ=

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-22. Verifying identity with HTTP basic authentication

• The client writes the HTTP basic authentication information in the HTTP request message
header. The name of the header is Authorization, followed by the keyword basic. The
username and password are separated with a colon. Before the client sends the request
message, it encodes the username, colon, and password with the base64 encoding scheme.
• Keep in mind that this encoding scheme is not encryption – anyone who intercepts the
message can decode the message and retrieve the username and password.
• Base64 is a scheme for encoding binary data as text. The most common use of Base64 is to
encode photo, video, and document attachments to email.

© Copyright IBM Corp. 2020, 2021 6-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Storing credentials in HTTP request header

PUT /api/employee HTTP/1.1


HTTP basic
Host: www.example.com/hr/ authorization HTTP header
header
Authorization: basic bXl1c2VyaWQ6bdvcmQ=
Date: Mon, 12 Dec 2016, 15:35:12 GMT
{ "fname" : "John",
"lname" : "Smith", JSON data
"email" : "[email protected]", that is
submitted in a HTTP body
"dept" : "finance", REST service
request
"country" : "Canada"
}

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-23. Example: Storing credentials in HTTP request header

The HTTP basic authentication header appears in the start of the request message. The data in the
HTTP message body is specific to the web service operation. The service provider does not use
the message body data during HTTP basic authentication.

© Copyright IBM Corp. 2020, 2021 6-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Setting up a user registry (1 of 3)


• Before you can create a basic authentication
security definition for an API, the user registry
must exist
• API Connect supports three types of user
registries:
ƒ Authentication URL user registry
ƒ LDAP user registry
ƒ Local user registry
• To create a user registry, you can use either API
Manager or Cloud Manager
ƒ A registry that is created in API Manager is visible
only to your provider organization
ƒ When you create a registry in Cloud Manager, you
can make it visible to multiple provider organizations
ƒ In this example, the Authentication URL user registry selected.
Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-24. Setting up a user registry (1 of 3)

• Before you set up a basic authentication security definition, you need to configure a user
registry. API Connect supports three types of user registries: Authentication URL user registry,
LDAP user registry, and Local user registry.
• You can also create a user registry that is specific to a provider organization by selecting the
OpenID Connect (OIDC) option. An organization-specific OIDC user registry is used for
onboarding and authenticating Developer Portal users, while a shared OIDC user registry can
be used for onboarding and authenticating Cloud Manager, API Manager, and Developer Portal
users.
• To create a user registry, you can use either API Manager or Cloud Manager.
• When you create a registry in API Manager, it is visible only to your provider organization.
When you create a registry in Cloud Manager, you can make it visible to multiple provider
organizations.
• To set up a user registry in API Manager, click the Resources option from the navigation menu.
▪ Select User Registries. Then, select create.
• You can also authenticate the client username and password with an LDAP user registry.
Specify the name of the user registry profile in this field. You must set up the LDAP user
registry profile separately with the API Manager web interface.

© Copyright IBM Corp. 2020, 2021 6-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Setting up a user registry (2 of 3)


The page shows the create user registry
page in the API Manager web application
1. Type a unique title and name for your 1
authentication URL user registry.
2. Type the network endpoint for the
authentication service.
3. Optionally, enter the name of a TLS
profile.
The user registry is added to the
registries on the resources page in API
Manager.
2

3
Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-25. Setting up a user registry (2 of 3)

The page shows the Create user registry page in the API Manager web application
1. Type a unique title and name for your authentication URL user registry.
2. Type the network endpoint for the authentication service. If the client sent a valid username
and password, the authentication service returns an HTTP status code of 200 OK. Otherwise,
the service returns a 401 Unauthorized status code.
3. Optionally, enter the name of a TLS profile. The Transport Layer Security (TLS) profile contains
the settings and certificates that the API gateway uses to set up an HTTPS connection to the
client application. You must set up a TLS profile separately with the API Manager web
interface.
The user registry is added to the registries on the resources page in API Manager.

© Copyright IBM Corp. 2020, 2021 6-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Setting up a user registry (3 of 3)


• Associate the user registry to the catalog where the API is published.
• You can now set basic authentication for an API and select the basic authentication URL
registry.

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-26. Setting up a user registry (3 of 3)

© Copyright IBM Corp. 2020, 2021 6-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Basic authentication security definition


Add basic authentication to the security schemes
1. Add a security definition in API Manager. 1
ƒ Select the Authentication URL user registry
from the list under the heading that is named
Authenticate using User Registry.
ƒ Save the change.

2. The basic authentication type is added to the


security definitions.

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-27. Example: Basic authentication security definition

Add basic authentication to the security schemes. The authentication URL can be selected.

© Copyright IBM Corp. 2020, 2021 6-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Apply basic authentication security to the API


• Select the basic authentication option in the Security tab for the API

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-28. Example: Apply basic authentication security to the API

Apply the basic authentication security to the API from the Security option in API Manager.

© Copyright IBM Corp. 2020, 2021 6-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
6.5. Introduction to OAuth 2.0

© Copyright IBM Corp. 2020, 2021 6-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Introduction
n to
o
OAuthh 2.0

Figure 6-29. Introduction to OAuth 2.0

© Copyright IBM Corp. 2020, 2021 6-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

What is OAuth?
• OAuth defines a way for a client to access server resources on behalf of another party

• It provides a way for users to authorize a third party to their server resources without sharing
their credentials to a third-party application

• It separates the identity of the resource owner (user) from a third-party application that acts
on behalf of the user

• The resource owner specifies which resources the OAuth client can access, and for how long

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-30. What is OAuth?

• The OAuth specification solves a specific problem: how to delegate access rights to a
third-party client that works on behalf of the user. Before OAuth, third-party applications
would ask and store the user’s username and password within the application. This process is
risky, as the server cannot distinguish between the user and the third-party application. One
analogy in the real world is to hand over your house keys to a cleaning service. You must have
a high degree of trust in the client to give them complete access to your home.
• With OAuth, the client does not use your credentials. Instead, an authorization service gives a
temporary pass to the client, so it can do a limited set of tasks in a fixed time period. As the
user, you can tell the authorization service to revoke the temporary pass at any time.
• Although OAuth is more complicated than handing over your credentials to the client, it is a
safer mechanism that gives the user control over the third-party client’s actions.

Information

OAuth separates the role of the client from the role of the resource owner.
The client is issued a different set of credentials than the credentials of the resource owner.
Instead of using the resource owner’s credentials to access a protected resource, the client
obtains an access token, which is a string that denotes a specific scope, lifetime, and other access
attributes.

© Copyright IBM Corp. 2020, 2021 6-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Allow third-party access to shared resources

1 2

Auth Service The Delivery


Tracker application
wants to access the
Email
following information
from the inventory
API
Password
Inventory
Purchase history
Address

Log in Allow Deny

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-31. Example: Allow third-party access to shared resources

• Whenever you sign up for a web-based application or a mobile application, you create an
account on the server with a username and password. The process becomes tedious for users
when they sign up for dozens of applications.
• Social networks, such as Facebook and Twitter, already link your identity to a user account.
Therefore, many applications use your social network account to create an account.
• This scenario has four participants: you as the user, the third-party application as a client, the
shared resources on the web, and the authentication service. You want the third-party
application to access some (but not all) of your information from the service. That is, you want
the client to act on your behalf to access resources on the service.
• In this example, the third-party application, the Delivery Tracker, wants to access your
product inventory records from the inventory API. The application opens a new page from the
authorization service. After you log in and allow the application to access the information, the
authorization service grants an access token to the application. At no time does the third-party
application see your use name or password on the authorization service.

© Copyright IBM Corp. 2020, 2021 6-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Example: Third-party access to inventory API resources


OAuth allows social network applications to share resources

• Alice is the owner of inventory • Delivery tracker, a third-party


records client application, wants to
• As a resource owner, Alice access Alice’s inventory records
declares which applications can from the API
access the inventory API on her
behalf
Inventory

• The inventory API provides online • An authorization service verifies


access to inventory records the identity of the client that wants
• The service that runs the API acts as to access Alice’s records
the resource service • This server issues a token or a code
• It manages access to Alice’s records to access the inventory API from the
Declaring client authorization requirements
resource server © Copyright IBM Corporation 2020, 2021

Figure 6-32. Example: Third-party access to inventory API resources

Take a closer look at the three actors in the OAuth scenario. Alice is the owner of inventory
records. As the user, Alice wants to feed the current inventory records to a package tracker
application. The Delivery Tracker is a third-party client application that wants to access Alice’s
inventory records. Last, the inventory API is a service that securely stores Alice’s records. This
service also manages access to the records from Alice and third-party applications that act on
Alice’s behalf.
The next 10 slides cover the details of this interaction following the sequence:
1. Alice, as the resource owner, requests access to the inventory API from the client application,
the delivery tracker app
2. The OAuth client sends the resource owner a redirection to the authorization service
3. The resource owner authenticates against the authorization service
4. The authorization service returns a web form to the resource owner to grant access
5. The resource owner submits the form to allow or to deny access
6. If the resource owner allows access, the authorization service sends the OAuth client a
redirection with the authorization grant code
7. To access the resource, the OAuth client sends the authorization grant code and other
information to the authorization service
8. If the authorization service verifies the grant authorization information, it returns an access
token to the OAuth client
9. The OAuth client sends the access token to the resource service
10. If the access token is valid for the requested resource, the resource server allows the OAuth
client to access the resource

© Copyright IBM Corp. 2020, 2021 6-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

OAuth Step 1: Resource owner requests access


1. Alice, as the resource owner, requests access to the inventory API from the client
application, the delivery tracker app

1
Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-33. OAuth Step 1: Resource owner requests access

In this scenario, Alice is the owner of inventory records in the inventory API. Alice wants to track
the delivery status of her purchases through the delivery tracker application. Alice is the resource
owner, and the delivery tracker application is an OAuth client application. Alice starts the process
when she selects the “look up your deliveries” option in the delivery tracker application.

© Copyright IBM Corp. 2020, 2021 6-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

OAuth Step 2: OAuth client redirection to owner


2. The OAuth client sends the resource owner a redirection to the authorization service

2 Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-34. OAuth Step 2: OAuth client redirection to owner

In the second step, the delivery tracker application requires the resource owner’s authorization
before it can access the owner’s inventory records. Instead of asking Alice directly for her user
credentials, the client application redirects Alice’s request to an authorization service.

© Copyright IBM Corp. 2020, 2021 6-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
OAuth Step 3: Authenticate owner with authorization
service
3. The resource owner authenticates against the authorization service

Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

OAuth Provider
3
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-35. OAuth Step 3: Authenticate owner with authorization service

In the third step, the authorization server asks for Alice’s user credentials to verify her identity.

© Copyright IBM Corp. 2020, 2021 6-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
OAuth Step 4: Ask resource owner to grant access to
resources
4. The authorization service returns a web form to the resource owner to grant access

Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

4 OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-36. OAuth Step 4: Ask resource owner to grant access to resources

The authorization service returns a web form to ask Alice whether she grants the OAuth client
access to her resources. That is, does the delivery tracker application have permission to look up
inventory records from the API, on Alice’s behalf?

© Copyright IBM Corp. 2020, 2021 6-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
OAuth Step 5: Resource owner grants client access to
resources
5. The resource owner submits the form to allow or to deny access

Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

5
OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-37. OAuth Step 5: Resource owner grants client access to resources

The resource owner, Alice, submits the web form to allow or deny access to her resources.

© Copyright IBM Corp. 2020, 2021 6-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
OAuth Step 6: Authorization service sends authorization
grant code to client
6. If the resource owner allows access, the authorization service sends the OAuth client a
redirection with the authorization grant code

Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-38. OAuth Step 6: Authorization service sends authorization grant code to client

The authorization service never transmits the resource owner’s username and password to the
OAuth client. Instead, the service sends an authorization grant code: a token that the OAuth client
can use to access Alice’s resources on her behalf.

© Copyright IBM Corp. 2020, 2021 6-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
OAuth Step 7: Client requests access token from
authorization service
7. To access the resource, the OAuth client sends the authorization grant code and other
information to the authorization service

Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-39. OAuth Step 7: Client requests access token from authorization service

• The OAuth client sends three pieces of information to the authorization service: an
authorization grant code, the client ID, and the client secret.
• The API Key (client ID and client secret) identifies the calling application to the resource
service that runs the APIs.
• The Delivery tracker application needs to register with the authorization service, during the
setup of the OAuth process, before any OAuth requests are made.

© Copyright IBM Corp. 2020, 2021 6-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
OAuth Step 8: Authorization server sends authorization
token to client
8. If the authorization service verifies the grant authorization information, it returns an access
token to the OAuth client

Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-40. OAuth Step 8: Authorization server sends authorization token to client

The authorization service verifies the grant authorization information. Then, it returns an access
token to the OAuth client.

© Copyright IBM Corp. 2020, 2021 6-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
OAuth Step 9: OAuth client sends access token to resource
service
9. The OAuth client sends the access token to the resource service

9 Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-41. OAuth Step 9: OAuth client sends access token to resource service

• The client application sends the access token to the resource service.
• The authorization service and the resource service can run on the same server.

© Copyright IBM Corp. 2020, 2021 6-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty
OAuth Step 10: Resource server grants access to OAuth
client
10. If the access token is valid for the requested resource, the resource server allows the OAuth
client to access the resource

10
Inventory

Inventory record owner Delivery tracker app Published APIs


Resource Owner OAuth client Shared resources

OAuth Provider
Authorization service

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-42. OAuth Step 10: Resource server grants access to OAuth client

If the access token is valid for the requested resource, the resource service allows the OAuth
client to access the resources. Only the APIs that were allowed by the resource owner can be
accessed by the delivery tracker application.

© Copyright IBM Corp. 2020, 2021 6-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Unit summary • Identify the security definition options in API Connect


• Explain the concept and use cases for API keys
• Explain the concept and use cases for HTTP basic authentication
• Explain the concept and use cases for OAuth 2.0 authorization
• Explain the steps in the OAuth 2.0 message flow

© Copyright IBM Corporation 2020, 2021

Figure 6-43. Unit summary

© Copyright IBM Corp. 2020, 2021 6-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Review questions
1. Which one of the following sentences best describe the client ID?
A. The client ID represents the person who signs on to the web application.
a. The client ID represents the client application.
b. The client ID represents the client application developer.
c. The client ID represents the resource owner.

2. What is the purpose of an API key?


A. The API key scheme enforces role-based access to API products.
B. The API key scheme authenticates the API caller.
a. The API key scheme defines the API plan.
b. The API key scheme secures API traffic.

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-44. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 6-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 6. Declaring client authorization requirements

Uempty

Review answers
1. Which one of the following sentences best describe the client ID?
A. The client ID represents the person who signs on to the web application.
a. The client ID represents the client application.
b. The client ID represents the client application developer.
c. The client ID represents the resource owner.
The answer is B.

2. What is the purpose of an API key?


A. The API key scheme enforces role-based access to API products.
B. The API key scheme authenticates the API caller.
C. The API key scheme defines the API plan.
D. The API key scheme secures API traffic
The answer is B.

Declaring client authorization requirements © Copyright IBM Corporation 2020, 2021

Figure 6-45. Review answers

© Copyright IBM Corp. 2020, 2021 6-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Unit 7. Creating an OAuth 2.0 provider


Estimated time
01:00

Overview
This unit examines the OAuth 2.0 provider. In an OAuth 2.0 message flow, the OAuth provider is
an authorization server that issues access tokens to authorized clients. In an API Connect cloud,
you can configure the API gateway to act as an OAuth 2.0 Provider. This unit explains how to
create and configure a Native OAuth Provider in either the Cloud Manager or API Manager
graphical applications.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 7-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Unit objectives • Explain the concept of an OAuth provider


• Describe the steps to secure an API with OAuth 2.0
• Identify the OAuth Provider types
• Explain how to create a Native OAuth Provider
• Explain the OAuth flow and grant types
• Explain the difference between public and confidential schemes
• Describe how to configure security settings for an API

© Copyright IBM Corporation 2020, 2021

Figure 7-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 7-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Topics • What is an OAuth provider?


• Create an OAuth Provider
• Secure an API with OAuth 2.0 authorization

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-2. Topics

© Copyright IBM Corp. 2020, 2021 7-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty
7.1. What is an OAuth provider?

© Copyright IBM Corp. 2020, 2021 7-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Whatt iss an
n OAuth
h
provider?

Figure 7-3. What is an OAuth provider?

© Copyright IBM Corp. 2020, 2021 7-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

What is an OAuth Provider?


• The OAuth Provider is a security service that authorizes
access to API operations
API Gateway
• The OAuth 2.0 specification defines two REST API
Inventory
operations:
ƒ The /authorize operation reads the client credentials and the
requested resource, and determines whether to grant access to Published APIs
Shared resources
the API client
ƒ The /token service takes an authorization grant code, and
returns an access token: a time-limited permission to call an
API operation on the server OAuth

OAuth Provider
Authorization service

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-4. What is an OAuth Provider?

• The OAuth Provider is a security service that authorizes access to API operations.
• Instead of sharing passwords, OAuth uses authorization tokens to verify the identity between
clients and service providers.

© Copyright IBM Corp. 2020, 2021 7-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Role of IBM API Connect in the OAuth flow


• OAuth is a token-based authorization protocol that
allows other applications or websites access to data
API Gateway
without requiring the user to share personal information
Inventory
• In an OAuth flow, IBM API Connect hosts APIs as shared
resources and provides the authorization and token
services Published APIs
Shared resources

OAuth

Inventory record owner Delivery tracker app OAuth Provider


Resource owner OAuth client Authorization service

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-5. Role of IBM API Connect in the OAuth flow

• OAuth is an open-standard authorization protocol that provides applications or websites the


ability for secure designated access.
• In IBM API Connect, the OAuth Provider implements the authorization and token services in
an OAuth flow. If you already have an OAuth Provider, you can configure the OAuth 2.0
security definition to call your existing authorization service instead.
• The OAuth specification is designed for use with HTTP.

© Copyright IBM Corp. 2020, 2021 7-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

What are the steps to secure an API with OAuth 2.0?


To secure your API with OAuth 2.0:
1. Configure an OAuth Provider
ƒ The OAuth Provider is a security service that provides the token and authorize API operations
ƒ You configure the settings for the OAuth 2.0 Provider in the Resources page in either Cloud
Manager or API Manager
2. For each API that you want to secure, declare an OAuth 2.0 security definition
ƒ You declare which API operations you want to secure at the API Gateway
ƒ You specify how the gateway handles authentication, authorization, and token management tasks

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-6. What are the steps to secure an API with OAuth 2.0?

To secure your API with OAuth 2.0, you must configure two services in IBM API Connect:
1. Create an OAuth 2.0 Provider.
▪ The OAuth 2.0 Provider is a security service that provides the token and authorize API
operations.
▪ You configure the settings for the OAuth 2.0 Provider in the Resources page in either Cloud
Manager or API Manager. When you configure the OAuth Provider in Cloud Manager, the
OAuth Provider can be applied to all provider organizations. When configured in API
Manager, the OAuth Provider is visible to or only selected provider organizations.
▪ The API gateway implements the OAuth 2.0 Provider API operations
2. For each API that you want to secure, declare an OAuth 2.0 security definition
▪ You declare which API operations you want to secure at the API Gateway
▪ You specify how the gateway handles authentication, authorization, and token
management tasks

© Copyright IBM Corp. 2020, 2021 7-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty
7.2. Create an OAuth provider

© Copyright IBM Corp. 2020, 2021 7-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create
e an
n OAuth
h
Provider

Figure 7-7. Create an OAuth Provider

© Copyright IBM Corp. 2020, 2021 7-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

OAuth Provider types


API Connect supports two OAuth Provider types:
• Native OAuth Provider
ƒ Configured and managed by you within your cloud
ƒ A Native OAuth Provider object provides settings for OAuth processing:
í Extract the application user’s credentials
í Authenticate their identity
í Grant authorization
í Generate and validate OAuth tokens
ƒ The API gateway implements the OAuth 2.0 Provider API operations
• Third-party OAuth Provider
ƒ Configure the secure endpoints to provide OAuth authentication from a third party

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-8. OAuth Provider types

You can configure two types of OAuth providers in API Connect:


• Native OAuth providers are configured and managed by you within your cloud.
• Third-party OAuth providers are configured by typing the secure endpoints to provide OAuth
authentication from a third party.
The examples that follow show how to configure a Native OAuth Provider.

© Copyright IBM Corp. 2020, 2021 7-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create an authentication registry (1 of 3)


Create an authentication registry in Cloud Manager or API Manager

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-9. Create an authentication registry (1 of 3)

• When you configure a Native OAuth Provider, you must first configure the authentication
registry that is used to extract the user credentials and authenticate their identities.
• User authentication is required for the implicit and access code (authorization code) grant
types.
• You can create the authentication registry either in Cloud Manager or API Manager.
• When you create the authentication registry in Cloud Manager, the registry can be used by
multiple provider organizations.
• In the example, an authentication URL user registry is selected.

© Copyright IBM Corp. 2020, 2021 7-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create an authentication registry (2 of 3)


• Type the title, name, and URL for the
authentication service
• API Connect calls the authentication service
later with the username and password
• Either 200 OK or 401 Unauthorized
is returned

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-10. Create an authentication registry (2 of 3)

• An Authentication URL user registry provides a simple mechanism for authenticating users by
referencing a custom identity provider.
• Type the URL for the authentication service. API Connect makes a GET call to the URL to
initiate the authentication process. The call includes the username and password is collected
from the user in its authorization header. Either 200 OK or 401 Unauthorized is returned.

© Copyright IBM Corp. 2020, 2021 7-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create an authentication registry (3 of 3)


The authentication
URL registry is now
a public registry in
Cloud Manager

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-11. Create an authentication registry (3 of 3)

The registry is added as a registry in Cloud Manager or API Manager and can be referenced by the
provider organization.

© Copyright IBM Corp. 2020, 2021 7-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create a Native OAuth Provider (1 of 5)


Create a Native
OAuth Provider from
the Resources page
in Cloud Manager or
API Manager

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-12. Create a Native OAuth Provider (1 of 5)

The next sequence of pages provides an example of how to configure a Native OAuth Provider.
From the Resources page, select the OAuth Providers option. Click Add. Then, select Native
OAuth provider from the list.

© Copyright IBM Corp. 2020, 2021 7-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create a Native OAuth Provider (2 of 5)


Type the title and
select the gateway
type

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-13. Create a Native OAuth Provider (2 of 5)

On the first page of the create Native OAuth Provider, you type the title, description, and base
path. You must also select the gateway type.

© Copyright IBM Corp. 2020, 2021 7-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create a Native OAuth Provider (3 of 5)


Select access code
and resource owner
password grant types

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-14. Create a Native OAuth Provider (3 of 5)

• In the supported grant types section, select which of the four OAuth flows you want to use.
An OAuth flow is the procedure that client applications follow to request access to a shared
resource. A later slide explains these grant types.
• Select either a public or confidential OAuth client type. A later slide explains the implications
of each client type.

© Copyright IBM Corp. 2020, 2021 7-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create a Native OAuth Provider (4 of 5)


Type the scope string for the OAuth
Provider
ƒ When the client application
requests an access token, it can
specify an access scope
ƒ Scopes provide a way to limit the
access that is granted in an
access token
ƒ The access token that is issued to
the application is limited to the
scopes that are granted
ƒ Respond only to API requests
from tokens that contain this
scope

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-15. Create a Native OAuth Provider (4 of 5)

Create a scope for the OAuth provider. When the client application requests an access token, it
can specify an access scope. For example, you can create two scopes for your API: one that
authorizes read access to an account, and one that authorizes updates to the account.

© Copyright IBM Corp. 2020, 2021 7-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Create a Native OAuth Provider (5 of 5)


1. To authenticate the client,
the authorization service
must extract the client
identity
2. The Authentication setting
determines how the 1
authorization service verifies
the identity of the client
3. The Authorization setting
determines how the OAuth 2
provider authorizes access to
resources

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-16. Create a Native OAuth Provider (5 of 5)

Configure the settings for collect credentials, authenticate users, and authorize users.
In the example, the authentication URL registry that was created earlier is selected for the
authenticate users' settings.
1. To authenticate the client, the authorization service must extract the client identity. You can
retrieve client credentials from the context variable of a web form or from the HTTP Basic
authentication header.
2. The Authentication setting determines how the authorization service verifies the identity of
the client. In this example, the OAuth Provider sends the extracted client identity to the
authentication URL. If the service at the authentication URL returns a status code of 200, the
OAuth provider proceeds to the next step in the OAuth flow.
3. The Authorization setting determines how the OAuth provider authorizes access to resources.
The Authenticated setting automatically grants access to any authenticated client. You can
set this value to disabled.

© Copyright IBM Corp. 2020, 2021 7-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Native OAuth Provider in Cloud Manager resources


• The Native OAuth
Provider is added in
Cloud Manager as a
shared service that is
visible to all provider
organizations.
• You are still required to
select this OAuth
Provider before you can
use it in your catalog.

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-17. Native OAuth Provider in Cloud Manager resources

© Copyright IBM Corp. 2020, 2021 7-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

OAuth Provider: OAuth flow and grant types

OAuth type OAuth Grant Type and Description


Implicit • Uses an implicit grant type
• The authorization server sends back an access token after the resource owner
authorizes the client application to use the resource

Password • Uses the resource owner password credentials


• The client application sends the username and password for a user on the resource
server
Application • Uses the client credentials
• The client application sends its own credentials when it accesses resources under
its own control, or previously arranged with the authorization server
Access code • After the authorization server authenticates the resource owner, the authentication
server sends back a custom redirect URI and an authorization code
• The client application opens the redirect URI with the authorization code to retrieve
an access token for a resource

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-18. OAuth Provider: OAuth flow and grant types

OAuth 2.0 authorization grant types have four options:


• With the implicit grant type, the authorization server does not send back an authorization
code. It sends back an access token after the resource owner authorizes the client
application. This grant type is available for public clients only.
• With the resource owner password credentials grant type, the client application sends the
username and password for a user on the resource server. This grant type assumes a high
level of trust between the client application and the resource server.
• With the client credentials grant type, the client application sends its own credentials when it
accesses server resources under its own control, or resources that are previously arranged
with the resource server. This grant type is available to confidential client types only.
• With the authorization code, the authorization server sends back a custom redirect URI and an
authorization code after it authenticates the resource owner. The authorization code prevents
replay attacks. The client application opens the redirect URI with the authorization code to
retrieve an access token for a resource.

© Copyright IBM Corp. 2020, 2021 7-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

OAuth Provider: Client types


• The OAuth 2.0 specification defines two types of clients:
ƒ Public
ƒ Confidential

• Public clients cannot be trusted with password secrets


ƒ For example, a web application that is written in JavaScript that runs on the user’s web browser
cannot ensure password confidentiality

• Confidential clients can keep a client password secret


ƒ The same web application that runs in an access-restricted web server keeps the password encrypted
when it communicates with the server

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-19. OAuth Provider: Client types

• The client type setting defines whether the client application can keep a client password
secret. For example, an access-restricted web server hosts a web application. Nobody except
the system administrator can access the server and see the client password. This scenario is
an example of a confidential client.
• If the same web application runs as a JavaScript application on a web browser, a malicious
user can break into the application and retrieve the password. In this case, the application is
considered a public client because it cannot ensure that it can keep the client password
confidential.

© Copyright IBM Corp. 2020, 2021 7-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Configure the catalog to use the resources (1 of 2)


• Sign on to API
Manager as the
owner of the
provider
organization
• Go to the catalog
that you want to
use

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-20. Configure the catalog to use the resources (1 of 2)

To use the Native OAuth Provider, sign on to API Manager and open the catalog where the OAuth
Provider is used.

© Copyright IBM Corp. 2020, 2021 7-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Configure the catalog to use the resources (2 of 2)


• Enable the Native OAuth Provider from the catalog settings

• Enable the user registry for the catalog


from the settings

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-21. Configure the catalog to use the resources (2 of 2)

• Enable the Native OAuth Provider and the user registry from the Manage page of the catalog.
• Products and APIs that are published to this catalog can now use OAuth security.

© Copyright IBM Corp. 2020, 2021 7-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty
7.3. Secure an API with an OAuth 2.0
authorization

© Copyright IBM Corp. 2020, 2021 7-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Secure
e ann APII with
h
an OAuthh 2.0
0
authorization

Figure 7-22. Secure an API with an OAuth 2.0 authorization

© Copyright IBM Corp. 2020, 2021 7-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

What is an OAuth 2.0 security definition?


• The OAuth 2.0 security definition specifies the security settings in the API that you want to
secure
API Gateway

Inventory
• You specify:
Inventory
ƒ The name of the OAuth Provider
Published APIs
ƒ Which OAuth 2.0 message flow to use Shared resources
ƒ The scope that is defined by the OAuth Provider

OAuth
OAuth
OAuth Provider
Authorization service

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-23. What is an OAuth 2.0 security definition?

What is an OAuth 2.0 security definition?


• The OAuth 2.0 security definition specifies the security settings in the API that you want to
secure.
• The following list describes the OAuth 2.0 configuration settings that you can customize in the
security definition:
▪ The OAuth Provider that you want to use
▪ Which OAuth 2.0 message flow to use
▪ A scope that matches one of the scopes in the OAuth Provider settings.

© Copyright IBM Corp. 2020, 2021 7-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Configure OAuth security settings for the API (1 of 4)


1. With the Design tab selected, click the Security definitions option. Click Add

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-24. Configure OAuth security settings for the API (1 of 4)

Open the API definition in API Manager. With the Design tab selected, click the Security
definitions option. Click Add.

© Copyright IBM Corp. 2020, 2021 7-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Configure OAuth security settings for the API (2 of 4)


2. Type a name
for the OAuth
2
security
definition and
select the
OAuth2 type.
3. Select the
OAuth
Provider that
you
configured
3
earlier and
the required
flow option.

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-25. Configure OAuth security settings for the API (2 of 4)

© Copyright IBM Corp. 2020, 2021 7-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Configure OAuth security settings for the API (3 of 4)


4. The
authorization
URL and token 4
URL field are
inserted
automatically.
5. Type the 5
scope that
matches any
scope that is
defined in the
OAuth
Provider.
6. Save your security definition.

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-26. Configure OAuth security settings for the API (3 of 4)

© Copyright IBM Corp. 2020, 2021 7-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Configure OAuth security settings for the API (4 of 4)


The security definition is then available to be used in the API.
7. Enable OAuth
security for the
API from the 9
Security option
in the Design
view.
8. When you select
the OAuth2
security, the
scope option 7 8

also becomes
visible and can
be selected.
9. Save the
security settings.
Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-27. Configure OAuth security settings for the API (4 of 4)

© Copyright IBM Corp. 2020, 2021 7-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Unit summary • Explain the concept of an OAuth provider


• Describe the steps to secure an API with OAuth 2.0
• Identify the OAuth Provider types
• Explain how to create a Native OAuth Provider
• Explain the OAuth flow and grant types
• Explain the difference between public and confidential schemes
• Describe how to configure security settings for an API

© Copyright IBM Corporation 2020, 2021

Figure 7-28. Unit summary

© Copyright IBM Corp. 2020, 2021 7-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Review questions
1. In API Connect, which OAuth grant type setting represents the identity of the client
application, rather than the resource owner?
a. Implicit
b. Password
c. Application
d. Access code

2. Which of these ways can OAuth scopes be used to define custom access to APIs?
a. Included with the authorization request to the user to approve or deny access to the resource.
b. Limit access tokens to only the scopes the user has approved.
c. Provide different scopes for read or update access to API operations
d. All the above.

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-29. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 7-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Review answers
1. In API Connect, which OAuth grant type setting represents the identity of the client
application, instead of the application user?
a. Implicit
b. Password
c. Application
d. Access code
The answer is C.

2. Which of these ways can OAuth scopes be used to define custom access to APIs?
a. Included with the authorization request to the user to approve or deny access to the resource.
b. Limit access tokens to only the scopes the user has approved.
c. Provide different scopes for read or update access to API operations.
d. All the above. The answer is D.

Creating an OAuth 2.0 provider © Copyright IBM Corporation 2020, 2021

Figure 7-30. Review answers

© Copyright IBM Corp. 2020, 2021 7-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Exercise: Implementing OAuth security

Figure 7-31. Exercise: Implementing OAuth security

In this exercise, you examine two of the three parties in an OAuth 2.0 flow: the OAuth 2.0 provider
and the API resource server. You define a Native OAuth provider to authorize access and issue
tokens. In the case study application, you declare an OAuth 2.0 security constraint that enforces
access control with the OAuth 2.0 provider.

© Copyright IBM Corp. 2020, 2021 7-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 7. Creating an OAuth 2.0 provider

Uempty

Exercise • Create a user registry for use with an OAuth provider


objectives • Create a native OAuth provider and make it available within the
catalog
• Add OAuth security to an API
• Update the sandbox Test App (client application) to provide an
OAuth redirect for testing
• Test the OAuth security by invoking the secured API

© Copyright IBM Corporation 2020, 2021

Figure 7-32. Exercise objectives

© Copyright IBM Corp. 2020, 2021 7-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Unit 8. Testing and debugging APIs


Estimated time
00:30

Overview
Before you publish an API where customers can access it, you need to test it and ensure that it is
defined and implemented correctly. IBM API Connect offers tools for running both simple and
complex tests, in different environments. Up to this point in this course, you have been testing
your APIs by using the Assembly tab so that you can ensure that your APIs are defined and
implemented correctly. This unit covers more extensive testing and debugging options in IBM API
Connect.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 8-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Unit objectives • Explain the testing and debugging features of API Manager
• Describe what is required to test an API in the Test tab
• Define the steps to test an API in the Test tab
• Explain how to activate an API
• Explain the purpose of the Endpoints tab

© Copyright IBM Corporation 2020, 2021

Figure 8-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 8-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Topics • Activating an API


• Testing options in API Connect
• Using the Test tab to debug your API

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-2. Topics

© Copyright IBM Corp. 2020, 2021 8-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty
8.1. Activating an API

© Copyright IBM Corp. 2020, 2021 8-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Activating
g an
n API

Figure 8-3. Activating an API

© Copyright IBM Corp. 2020, 2021 8-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Activating an API (1 of 3)
• After you have created an API definition you can activate it to make it available for testing.
• When you activate an API, API Connect automatically completes the following actions:
ƒ Creates a draft Product, adds the API to the Product, and publishes the Product to the sandbox catalog
so that the API is available to be called. The Product has the title api_title auto product. Note that
if you later want to delete the draft Product, you cannot delete it directly; instead, delete the API and
the draft Product is deleted together with the API.
ƒ Subscribes the sandbox test application to the Product so that you can immediately test the API in the
test environment.
• To activate an API, you must be assigned a role that has the Product:Manage and
Subscription:Manage permissions. The pre-supplied Developer role has these permissions by
default.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-4. Activating an API (1 of 3)

You must activate your API before you can test it.

© Copyright IBM Corp. 2020, 2021 8-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Activating an API (2 of 3)
To activate an API:
1. In the navigation pane, click Develop, then select the APIs tab
2. Click the title of the API that you want to work with
3. Move the activation slider control to the on position

4. On successful completion, the API is shown as Online

To deactivate the API:


• Move the activation slider control to the off position

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-5. Activating an API (2 of 3)

• The API activation will not complete successfully if lifecycle approval is enabled in the
sandbox catalog for the Stage, Publish, or Replace actions. If any such lifecycle approvals are
enabled, then to be able to activate and API they must be disabled.
• To activate an API from the API Designer user interface, you must be connected to a
Management server; API activation is not available with API Designer in offline mode.
• Products that contain an API with a Swagger property by using regex that includes lookahead
assertions, such as "(?" cannot be validated or published. An error message is returned.
• You can also activate an API during the creation process, and on the API test page.

© Copyright IBM Corp. 2020, 2021 8-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Activating an API (3 of 3)
• If you stop an API, the application subscription is deleted, and the auto Product is removed
from the sandbox catalog.
• If you make a change to the API, it is republished automatically. You can also republish a
running API manually by stopping it and then reactivating it.
• The error indicator shows whether there are validation errors in the OpenAPI source for the
API definition. If there are errors, click the arrow for more details.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-6. Activating an API (3 of 3)

© Copyright IBM Corp. 2020, 2021 8-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Locating API information on the Endpoints tab (1 of 2)


• Use the Endpoints tab to retrieve information that you can use when you call the API from an
application.
• The assembly tool's Endpoints tab opens a page that displays information for use when you
call APIs externally. This tab displays only when an API's status is Online (the API was
activated).

Important:
The fields in the sandbox Sample Application Credentials section
apply to the assembly tool's built-in client application and not to
any application that you created. The credentials that display
here are the default credentials that display in the assembly tool
Test panel's "Identification" section.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-7. Locating API information on the Endpoints tab (1 of 2)

© Copyright IBM Corp. 2020, 2021 8-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Locating API information on the Endpoints tab (2 of 2)


The following values for the API are displayed in the Endpoints tab so that you can copy them
and paste them into calls:
• Base API Endpoint
ƒ The URL representing the endpoint of the API that you are editing and testing
• Client ID and Client Secret
ƒ The values of the built-in test application's client ID and client secret.
• OAuth Token URL
ƒ If you specified an OAuth provider in the API's security definition, then this field displays the URL
where you can obtain an access token for calling the API.
• OAuth Auth URL
ƒ If you specified an OAuth provider in the API's security definition, then this field displays the URL
where you can submit an access token and receive an authorization token in exchange.
• Rate Limit
ƒ If you specified a rate limit on the Security panel when you created the API, the limit is displayed here.
Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-8. Locating API information on the Endpoints tab (2 of 2)

The assembly tool's Endpoints tab opens a page that displays information for use when you call
APIs externally. This tab displays only when an API's status is Online (the API was activated).
The following values for the API are displayed in the Endpoints tab so that you can copy them and
paste them into calls:
• Base API Endpoint: The URL representing the endpoint of the API that you are editing and
testing. To invoke the API, append one of its supported queries (path and parameters) to this
URL.
• Client ID and Client Secret: The values of the built-in test application's client ID and client
secret. You can invoke APIs externally by providing the application's credentials in the request
header.
• OAuth Token URL: If you specified an OAuth provider in the API's security definition, then this
field displays the URL where you can obtain an access token for calling the API.
• OAuth Auth URL: If you specified an OAuth provider in the API's security definition, then this
field displays the URL where you can submit an access token and receive an authorization
token in exchange. You then use the authorization token when calling the API.
• Rate Limit: If you specified a rate limit on the Security panel when you created the API, the
limit is displayed here for reference. If you did not specify a rate limit, the default rate limit
displays.

© Copyright IBM Corp. 2020, 2021 8-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty
8.2. Testing options in API Connect

© Copyright IBM Corp. 2020, 2021 8-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Testing
g optionss in
n
APII Connect

Figure 8-9. Testing options in API Connect

© Copyright IBM Corp. 2020, 2021 8-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Testing options in API Connect


• Before you publish an API where customers can access it, you need to test it and ensure that it
is defined and implemented correctly.
• API Connect offers tools for running both simple and complex tests, in different environments.
• Use the following list of options to choose the test tool that best meets your needs:
ƒ Run a simple test in the Assembly tab
ƒ Execute and debug the API in the Test tab
ƒ Use the Local Test Environment to test your APIs on your local machine without the need to connect to
an API Connect management server

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-10. Testing options in API Connect

Testing options in API Manager include:


• Testing an API with the Assembly tab
• Using the Test tab to debug your API
• Testing an API with the Local Test Environment
These are covered in more detail in the next three slides.

© Copyright IBM Corp. 2020, 2021 8-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Testing an API with the Assembly tab


• IBM API Connect provides a basic test environment in the Assembly tab so that you can
ensure that your APIs are defined and implemented correctly.
• The Assembly tab's
Test panel only
supports the sandbox
catalog’s built-in client
app, with its client ID
and client secret. With
the Test panel you
quickly set up and
invoke the API, but it
offers limited control.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-11. Testing an API with the Assembly tab

• Up to this point in this course, you have been using the Assembly tab to perform simple testing
of your APIs.
• If you are testing an API that contains references to API properties, only those references that
are defined inside the API assembly are resolved and replaced with their corresponding
values when you invoke the API in the assembly test tool; property references that are defined
outside of the API assembly are not resolved.
• Due to Cross-Origin Resource Sharing (CORS) restrictions, the assembly test tool cannot be
used with the Chrome or Safari browsers on the macOS Catalina platform.
Procedure
By now, you should be familiar with this procedure.
To test an API by using the Assembly tab, complete the following steps.
1. If you are using API Designer, set the mode to Online using the Options menu on the main
page.
2. In the navigation pane, click Develop, then select the APIs tab.
3. Click the title of the API that you want to work with.
4. Click Assemble to open the Assemble view, then click the Test icon.
5. If you are testing the API for the first time and, when you created the API definition, you
selected the Activate API option, your test setup will already be configured, and you can
proceed immediately to the next step to test your API. Otherwise, click Activate API to have
your test setup configured. Note: If you are retesting your API after making changes, click
Republish product to make your changes available.

© Copyright IBM Corp. 2020, 2021 8-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty
6. In the Operation section, select the API operation that you want to test, then click Invoke. The
API response is displayed in the Response section. Note: If you receive a message relating to
an untrusted certificate, click the link that is provided, accept the certificate, then return to the
test environment and click Invoke again. The message also mentions a lack of CORS support
on the server, but this is just one possible cause for the connection failing.

© Copyright IBM Corp. 2020, 2021 8-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Using the Test tab to debug your API


• Use the Test tab to execute calls and trace the API’s actions in API Connect.
• The Test tab not only lets you quickly invoke an API with any needed headers and parameters,
but lets you view the content of the response in both parsed and raw format.
• Additionally, you can view a trace of the actions execute as the API’s process flow operates to
complete the call. Viewing the trace can help you debug problems with the API’s execution.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-12. Using the Test tab to debug your API

• The next topic covers more details around using the Test tab with REST and SOAP APIs.
• More about how the Test tab is used to test GraphQL queries is covered in a later unit.

© Copyright IBM Corp. 2020, 2021 8-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Testing an API with the Local Test Environment


• Use the Local Test Environment to test APIs on your local machine, without the need to
connect to an API Connect management server.
• The Local Test Environment is a lightweight API Manager running on your local machine. It
allows you to rapidly test APIs locally.
• API Connect provides the following methods for testing an API on your local machine:
ƒ Invoke the API from the API Designer UI application running in Online mode.
ƒ Call the API in the Local Test Environment with a cURL command.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-13. Testing an API with the Local Test Environment

More about the Local Test Environment is covered in a later unit.

© Copyright IBM Corp. 2020, 2021 8-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty
8.3. Using the Test tab to debug your API

© Copyright IBM Corp. 2020, 2021 8-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Using
g the
e Testt tab
b
to debugg yourr API

Figure 8-14. Using the Test tab to debug your API

© Copyright IBM Corp. 2020, 2021 8-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Using the Test tab to debug your API


Complete the following tasks to test your API by using the Test tab.
1. Prepare your API for debugging with the Test tab
ƒ Ensure that your API's definition meets the requirements for debugging it in the API Connect Test
tab.
2. Send the API request
ƒ Complete fields to set up the request for an API that you want to debug on the Test tab.
3. Review the API response and trace
ƒ Review the response to an API that was invoked in the API Connect Test tab. You can use the
included trace information to debug the API's execution.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-15. Using the Test tab to debug your API

These tasks are covered in the following slides.

© Copyright IBM Corp. 2020, 2021 8-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Prepare your API for debugging with the Test tab


To invoke your API in the Test tab, the following requirements must be satisfied:
• The DataPower API Gateway is configured to support the API probe
• The API uses the DataPower API Gateway
• CORS is enabled in the API definition
• The API is published in the sandbox catalog with the default Product/Plan

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-16. Prepare your API for debugging with the Test tab

To invoke your API in the Test tab, the following requirements must be satisfied:
The DataPower API Gateway is configured to support the API probe
• To enable the Test tab's trace feature, the DataPower API Gateway must be configured to
support gateway peering and the gateway probe. In a gateway service running in Kubernetes,
the API probe is automatically enabled. In a gateway service running external to Kubernetes,
the DataPower configuration must be added to the application domain supporting API
Connect.
• Check with your administrator to confirm that gateway peering, and the gateway probe are
enabled.
The API uses the DataPower API Gateway
• A gateway exposes APIs to calling applications and provides processing actions that enable
the APIs to integrate with various endpoints.
• API Connect supports two versions of the DataPower Gateway, but you can only debug APIs
that use the DataPower API Gateway. The V5-compatible gateway is not supported. If your
API definition has CORS enabled but you cannot see the Test tab, the API is probably
configured to use the wrong version of the gateway. You can determine which gateway your
API uses by completing the following steps:
a. Log in to API Manager.
b. In the navigation list, click Develop, then select the APIs tab.
c. Click the title of the API you want to test.
d. On the API's Design page, locate the Gateway field and note which option is selected.

© Copyright IBM Corp. 2020, 2021 8-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty
You can change the gateway selection for an API on the Design page, but you must ensure that
the policies used in the API's process flow are compatible with the new selection.
CORS is enabled in the API definition
• Cross-Origin Resource Sharing support ensures that the API can be accessed from another
domain. CORS support must be enabled for your API to be properly invoked and traced. If your
API uses the API Gateway but you cannot open the Test tab, it's possible that CORS was not
enabled in the API definition. You can enable CORS for your API by completing the following
steps:
a. Log in to API Manager.
b. In the navigation list, click Develop.
c. On the Develop page, click the name of the API you want to test.
d. On the API's Design page, locate the CORS field and select it to enable support.
e. Click Save in the page header.
The API is published in the sandbox catalog with the default Product/Plan
• The Test tab is intended for use with APIs in the built-in sandbox catalog. You can only use the
Test tab to debug APIs that are created with the default Product/Plan and published to the
sandbox catalog.
• When you publish (activate) an API, the API is enabled online and becomes available for use.
You cannot execute an offline API, even for testing purposes. You can set an API online by
completing the following steps:
a. Log in to API Manager.
b. In the navigation list, click Develop.
c. On the Develop page, click the name of the API you want to test.
d. In the Design page header, click Offline to toggle the API to its Online state.

© Copyright IBM Corp. 2020, 2021 8-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Send the API request (1 of 2)


• Use the Request section of the page to set up the request URL, the authentication mechanism,
and the request parameters.
• When your API request is configured, click Send to execute the call.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-17. Send the API request (1 of 2)

• Use the Request section of the page to set up the request URL, the authentication mechanism,
and the request parameters. Complete the following steps to fill in the fields that are needed
for configuring the request.
a. Select an operation and request URL from the list provided.
b. On the Parameters tab, define header, query, and path parameters. An empty row is
provided for you to define parameters; enter the parameter name in the Key field, select
query, header, or path in the Located in field , and supply a string value in the Value field.
As you define a new parameter, a further empty row is added automatically.
Default header parameters and values are provided. For example, if the API has client ID
or client secret definitions that are applied, the corresponding keys are added as header
parameters, with the values preset.
c. If your API definition uses Basic authorization for the security setting, click the
Authentication tab and provide the username and Password that is needed for
authenticating with the user registry. When you invoke the API, API Connect populates a
header by using the provided information. If your API definition does not use Basic
authorization, the Authentication tab is not available.
d. If the operation is POST or PUT, set up the request body.
- Click the Body tab.
- Type the information for the body of the request.
• When your API request is configured, click Send to execute the call.
▪ If a message displays indicating "No Response", the API call cannot be completed.
Possible causes of this problem are as follows:

© Copyright IBM Corp. 2020, 2021 8-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty
- CORS is not enabled in the API’s definition. Edit the API’s definition and enable CORS.
Then, save the change and publish the API. If you are using your own client app,
remember to subscribe it to the API again after publishing.
- The gateway service URL has an invalid certificate. Follow the instructions to accept
the certificate and continue testing.
- The browser cannot connect to the gateway service

© Copyright IBM Corp. 2020, 2021 8-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Send the API request (2 of 2)


Common request headers
Key Value

media_type/ Specify the type of content that the response headers should use. The default is
Accepts subtype application/json.

If you are using the built-in test application in the sandbox catalog, the value is pre-
X-IBM-
client_ID_val populated automatically. If you are using your own client application, replace the
Client-Id value with the client ID of your application.
If you are using the built-in test application in the sandbox catalog, the value is pre-
X-IBM-
Client_secret_value populated automatically. If you are using your own client application, replace the
Client-Secret value with the client secret of your application

Authorization Bearer access_token Encode the token in base64. API Connect cannot encode the token for you.

Specify the type of content that the response body should use; for example,
Content-Type media_type/subtype application/json or image/png.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-18. Send the API request (2 of 2)

The table that is displayed on this slide lists some common header definitions that are used in a
request. You add a Content-Type header definition to a request in the exercise at the end of this
unit.

© Copyright IBM Corp. 2020, 2021 8-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Review the API response and trace (1 of 2)


• Review the response to an API that was invoked in the API Connect Test tab. You can use the
included trace information to debug the API's execution.
• When the API request is invoked, the response displays in the “Response” section of the Test
tab. The response always includes the HTTP status code and the amount of time it took to
receive a response. If the call completes (even if it returns an error), the response also
includes headers and a body.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-19. Review the API response and trace (1 of 2)

© Copyright IBM Corp. 2020, 2021 8-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Review the API response and trace (2 of 2)


• Click the Body tab to see the body of the
response.
ƒ When you review the body of the response,
click the Parsed tab to view the response by
using the format that you specified in the
"Accepts" request header.
ƒ Click the Raw tab to view the unformatted
response body.
• Click the Headers tab to see the content
of request headers and response headers.
• Click the Trace tab to display a record of
the API execution so you can see what
actions were triggered and the code that
was executed for each action.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-20. Review the API response and trace (2 of 2)

To examine the trace:


• Use the Trace tab to see exactly how the API call was executed. This is helpful when the call
returned an error, and you don’t know why. You can debug the API by reviewing the trace to
see each step of the API's execution.
• The Trace tab contains the following components to help you debug the API:
▪ Process flow diagram In the diagram, the policies (actions) that were executed during the
call are highlighted while the rest of the process flow is dimmed. The highlights make it
easy to see where the executed actions occurred in the overall flow while clarifying the
actual flow of execution for the call. For example, if the process flow includes a switch with
three options, only the option that was selected during the call is highlighted.
▪ Policies list A list of the highlighted policies lets you select a policy to examine its trace.
▪ Advanced toggle The Advanced toggle that lets you control the level of detail in the trace.
A basic trace shows the code for the input and output of the selected policy. An advanced
trace shows the full code for the policy’s execution.
▪ Code box The selected level of code for the current policy displays in the code box, where
you can review it in detail to see exactly how that policy was executed. By default, a
minimal version of the response displays (the endpoint, the request, and the response,
and the status message), with sections collapsed. You can expand individual sections by
clicking the expand icon next to each. To see the complete response, click the Advanced
toggle.

© Copyright IBM Corp. 2020, 2021 8-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Unit summary • Explain the testing and debugging features of API Manager
• Describe what is required to test an API in the Test tab
• Define the steps to test an API in the Test tab
• Explain how to activate an API
• Explain the purpose of the Endpoints tab

© Copyright IBM Corporation 2020, 2021

Figure 8-21. Unit summary

© Copyright IBM Corp. 2020, 2021 8-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Review questions
1. True or False: The Local Test Environment is used to assemble policies.
2. True or False: An API must be online before it can be tested in the Test tab.
3. Which is not a testing method that is found in API Manager
a. Assembly Tab
b. Source code testing
c. Test Tab
d. Local Test Environment

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-22. Review questions

Write your answers here:


1.
2.
3.

© Copyright IBM Corp. 2020, 2021 8-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Review answers
1. True or False: The Local Test Environment is used to assemble policies.
The answer is False. The assembly tab is used to assemble policies in an API definition.
2. True or False: An API must be online before it can be tested in the Test tab.
The answer is True. An API must be online before it can be tested in the Test tab.
3. Which is not a testing method that is found in API Manager
a. Assembly Tab
b. Source code testing
c. Test Tab
d. Local Test Environment
The answer is b.

Testing and debugging APIs © Copyright IBM Corporation 2020, 2021

Figure 8-23. Review answers

Write your answers here:


1.
2.
3.

© Copyright IBM Corp. 2020, 2021 8-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Exercise: Introduction to the Test tab

Figure 8-24. Exercise: Introduction to the Test tab

• This exercise covers the use of the Test tab to test your APIs. Up to this point in this course,
you have been using the Assembly tab to perform simple testing of your APIs.
• In this exercise, you test APIs you built in prior exercises. As an introduction to the Test tab,
you use the Test tab to test a SOAP API (InventoryService) and REST API (petstore). In a later
exercise, you use the Test tab to test a GraphQL API.

© Copyright IBM Corp. 2020, 2021 8-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 8. Testing and debugging APIs

Uempty

Exercise • Use the Test tab to test and debug a SOAP API
objectives • Use the Test tab to test and debug a REST API

© Copyright IBM Corporation 2020, 2021

Figure 8-25. Exercise objectives

© Copyright IBM Corp. 2020, 2021 8-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Unit 9. Creating and testing a GraphQL


API
Estimated time
01:00

Overview
This unit describes the process of creating and testing a GraphQL API. You examine the definition
of a GraphQL API, its advantages and disadvantages, and the differences between GraphQL APIs
and REST APIs. You learn how to create a GraphQL API in API Manager. You learn the definition of
a GraphQL schema and how to query a GraphQL API by using queries and mutations. You learn
how to test a GraphQL API by using the Test tab in API Manager.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 9-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Unit objectives • Explain what is a GraphQL API


• Advantages and Disadvantages of GraphQL APIs
• Compare and Contrast REST and GraphQL
• Describe how to create a GraphQL API
• Define a GraphQL API query
• Describe how to test a GraphQL API with the Test tab
• Develop a GraphQL schema

© Copyright IBM Corporation 2020, 2021

Figure 9-1. Unit objectives

After completing this unit, you should be able to:


• Explain what is a GraphQL API
• Examine the advantages and disadvantages of GraphQL
• Compare and contrast REST and GraphQL
• Describe how to create a GraphQL API
• Explain what is a GraphQL schema
• Define GraphQL API queries and mutations
• And describe how to test a GraphQL API with the Test tab

© Copyright IBM Corp. 2020, 2021 9-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Topics • Introduction to GraphQL APIs


• Building a GraphQL API
• Testing a GraphQL API

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-2. Topics

This unit is broken down into the following topics:


• Introduction to a GraphQL API
• Building a GraphQL API
• And testing a GraphQL API

© Copyright IBM Corp. 2020, 2021 9-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty
9.1. Introduction to GraphQL APIs

© Copyright IBM Corp. 2020, 2021 9-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Introduction
n to
o
GraphQLL APIs

Figure 9-3. Introduction to a GraphQL API

Introduction to a GraphQL API

© Copyright IBM Corp. 2020, 2021 9-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

What is a GraphQL API?

• GraphQL is a static strong-typed query language and


a server-side runtime for application programming
interfaces (APIs) that let clients declaratively
specify their data requirements
• An application programming interface (API)
defines business or technical capability as a set of
operations
• GraphQL was developed internally by Facebook in
2012 before being publicly released in 2015:
ƒ Facebook needed a data-fetching API powerful
enough to describe all of Facebook, yet simple
enough to be easy to learn and use by their
product developers
ƒ Today, GraphQL powers hundreds of billions of
API calls a day

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-4. What is a GraphQL API?

• GraphQL is a static strong-typed query language and a server-side runtime for application
programming interfaces that let clients declaratively specify their data requirements
• GraphQL is not tied to any specific database or storage engine and is instead backed by the
client’s existing code and data
• As a reminder, an application programming interface or API defines business or technical
capability as a set of operations
• Facebook developed GraphQL internally in 2012 before publicly releasing it in 2015
• Facebook needed a data-fetching API powerful enough to describe all of Facebook, yet simple
enough to be easy to learn and used by their product developers
• On 7 November 2018, the GraphQL project was moved from Facebook to the newly
established GraphQL Foundation, hosted by the Linux Foundation
• On 9 February 2018, the GraphQL Schema Definition Language became part of the
specification
• And now today, GraphQL powers hundreds of billions of API calls a day

© Copyright IBM Corp. 2020, 2021 9-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Advantages and Disadvantages of GraphQL


Advantages Disadvantages
• A GraphQL schema sets a single source of truth in a • GraphQL presents a learning curve for developers familiar
GraphQL application with REST APIs
• GraphQL calls are handled in a single round trip, so no • GraphQL shifts much of the work of a data query to the
overfetching server side, which adds complexity for server developers
• Strongly defined data types reduce miscommunication • Depending on how it is implemented, GraphQL might
between the client and the server require different API management strategies than REST
APIs, particularly when considering rate limits and pricing
• GraphQL is introspective—client can request a list of data
types available which is ideal for auto-generating • Caching is more complex than with REST
documentation
• API maintainers have the additional task of writing
• GraphQL allows an application API to evolve without maintainable GraphQL schema
breaking existing queries
• Many open source GraphQL extensions are available to
offer features not available with REST APIs
• GraphQL does not dictate a specific application architecture
since it can be introduced on top of an existing REST API
and can work with existing API management tools
Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-5. Advantages and Disadvantages of GraphQL

This page outlines the advantages and disadvantages of GraphQL.


Some of the advantages are that:
• A GraphQL schema sets a single source of truth in a GraphQL application. It offers an
organization a way to federate its entire API
• GraphQL calls are handled in a single round trip. Clients get what they request with no
overfetching
• Strongly defined data types reduce miscommunication between the client and the server
• GraphQL is introspective, so a client can request a list of data types available, which is ideal for
auto-generating documentation
• GraphQL allows an application API to evolve without breaking existing queries
• Many open source GraphQL extensions are available to offer features not available with REST
APIs
• And GraphQL does not dictate a specific application architecture. It can be introduced on top
of an existing REST API and can work with existing API management tools
Some of the disadvantages of GraphQL are that:
• GraphQL presents a learning curve for developers familiar with REST APIs
• GraphQL shifts much of the work of a data query to the server side, which adds complexity for
server developers
• Depending on how it is implemented, GraphQL might require different API management
strategies than REST APIs, particularly when considering rate limits and pricing
• Caching is more complex than with REST

© Copyright IBM Corp. 2020, 2021 9-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty
• API maintainers have the additional task of writing maintainable GraphQL schema

© Copyright IBM Corp. 2020, 2021 9-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Compare and Contrast REST and GraphQL


REST GraphQL
• Each request usually calls exactly one route handler • One query can call many resolvers to construct a
function nested response with multiple resources
• You construct the shape of the response yourself • The shape of the response is built up by the GraphQL
execution library to match the shape of the query
• The data can be gathered by accessing multiple
endpoints • The application client can request only the data that
it needs
• The only way for a client to download data is by
hitting endpoints that return fixed data structures • The application client can retrieve multiple related
resources in a single request
• REST has become the industry standard for
companies deploying APIs • Uses a strong type system to define the capabilities
of an API
• API analytics are easier to obtain for REST, due to
the limited amount of tooling for GraphQL • All the types that are exposed in an API are written
down in a schema using the GraphQL Schema
Definition Language (SDL)

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-6. Compare and Contrast REST and GraphQL

This page outlines the differences and similarities between REST and GraphQL.
For REST:
• Each request usually calls exactly one route handler function
• You construct the shape of the response yourself
• The data can be gathered by accessing multiple endpoints
• The only way for a client to download data is by hitting endpoints that return fixed data
structures
• REST is the API deployment industry standard for companies
• And API analytics are easier to obtain for REST, due to the limited amount of tooling for
GraphQL
For GraphQL:
• One query can call many resolvers to construct a nested response with multiple resources
• The GraphQL execution library builds the shape of the response to match the shape of the
query
• The application client can request only the data that it needs
• The application client can retrieve multiple related resources in a single request
• Uses a strong type system to define the capabilities of an API
• And all the types that are exposed in an API are written down in a schema by using the
GraphQL Schema Definition Language (SDL)

© Copyright IBM Corp. 2020, 2021 9-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty
9.2. Building a GraphQL API

© Copyright IBM Corp. 2020, 2021 9-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Building
g a GraphQLL
API

Figure 9-7. Building a GraphQL API

Building a GraphQL API

© Copyright IBM Corp. 2020, 2021 9-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Creating a GraphQL API (1 of 5)

• API Connect enables you to create a GraphQL API proxy


definition that proxies a backend GraphQL server and to
define rate limiting controls that reflect the amount of
data that is returned from the server by a request to the
GraphQL API
• In this unit, GraphQL API refers to a GraphQL proxy API
• In the navigation pane, click Develop icon in the API UI
navigation pane Develop, select the APIs tab, then click
Add > API
• The Select API type screen is displayed
• Select OpenAPI 2.0
• Select From existing GraphQL service (GraphQL proxy)
• Click Next

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-8. Creating a GraphQL API (1 of 5)

• In API Connect, you can create a GraphQL API definition that proxies a backend GraphQL
server
• You can also define rate limiting controls that reflect the amount of data that is returned from
the server from a request to the GraphQL API
• In this unit, a GraphQL API refers to a GraphQL proxy API since it is created from an existing
GraphQL service
• To create a GraphQL API, click the Develop icon in the navigation pane
• Select the APIs tab, click Add, and then select API
• On the Select API type page, select the OpenAPI 2.0 specification
• Although API Manager provides the option to select the OpenAPI 3.0 specification, a GraphQL
API does not support OpenAPI 3.0
• Select From existing GraphQL service (GraphQL proxy)
• Finally, click Next

© Copyright IBM Corp. 2020, 2021 9-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Creating a GraphQL API (2 of 5)


• Specify the API summary in the Info section
• The Title identifies the API
• The Name is entered automatically and is a single string that is
used to identify the API in developer toolkit CLI command
• The Version corresponds to the value of the info.version
property of the API's OpenAPI definition
• The Base path is the URL segment of the API and does not
include the host name or any additional segments for paths or
operations
• The optional Description helps to identify the API
• The GraphQL server URL is the URL that is used for requests to
the backend GraphQL API
• The Schema name is used to identify the schema definition that is
created from the imported GraphQL schema
• Click Next. If there are any warnings indicated relating to the
imported schema, you can review them now by clicking View

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-9. Creating a GraphQL API (2 of 5)

• To continue creating the GraphQL API, you specify the API summary in the Info section.
• The API summary refers to the GraphQL API metadata: the title, name, version, and base
path of the API, a description of the API, the GraphQL server URL, and the schema name
• To create a GraphQL API without a GraphQL server URL, you can submit a Schema Definition
Language with the GraphQL API’s specifications. To submit the SDL file, you invoke the error
message by entering an invalid GraphQL server URL. On the Upload schema window, you can
either drag or click to upload the SDL file. This process is further covered in the exercise.

© Copyright IBM Corp. 2020, 2021 9-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Creating a GraphQL API (3 of 5)

• In the Operations and Paths section,


select the operations and paths that you
want to include
ƒ The operation path of /graphql is already
selected and immutable; this is the path for
application client requests to API Connect
that invoke the GraphQL API
• Replace the GraphQL schema by
uploading a schema from your local file
system
ƒ Click Replace; you can then either drag and
drop your file or click where indicated to
select the file from your local file system
ƒ Click Upload when done

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-10. Creating a GraphQL API (3 of 5)

• In the Paths section, select the paths that you want to include to generate into the GraphQL
API
• The path /graphql is already selected and immutable. The /graphql path is the path for
application client requests to API Connect that invoke the GraphQL API
• To allow application clients to send introspection requests for the GraphQL API, select
Support default introspection
• To allow users to test the GraphQL API from a GraphiQL editor in a separate browser tab,
select Enable GraphiQL editor
• You can also select the /graphql/cost path. This path enables application clients to obtain
details of the cost of a request to the GraphQL API before making the actual request. In a
production environment, you should consider carefully the resource implications of making
this path available
• Optionally, you can replace the GraphQL schema that was imported from the GraphQL server
URL by uploading a schema from your local file system.
• If any warnings related to the imported schema appear, you can review them by clicking View
• To replace the GraphQL schema, click Replace. You can then either drag your schema file or
click to select the file from your local file system
• Click Next

© Copyright IBM Corp. 2020, 2021 9-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Creating a GraphQL API (4 of 5)


• Click Next. In the Secure section, configure
the API security that you require:
ƒ The Secure using Client ID option requires an
Application to provide a Client ID (API Key).
This causes the X-IBM-Client-Id parameter
to be included in the request header for the API
ƒ The CORS selection enables cross-origin
resource sharing (CORS) support for your API.
This allows your API to be accessed from
another domain
• Optional: Select Activate API if you want to
immediately use the API for further
development and testing
• Click Next to create your API definition

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-11. Creating a GraphQL API (4 of 5)

• In the Secure section, configure the API security that you require.
• The Secure using Client ID option requires an application to provide a Client ID (API Key).
Selecting this option causes the X-IBM-Client-Id parameter to be included in the request
header for the API
• The CORS selection enables cross-origin resource sharing (CORS) support for your API. It
allows your API to be accessed from another domain
• Optionally, if you want to immediately use the API for further development and testing, select
Activate API.
• Click Next to finalize creating your GraphQL API definition

© Copyright IBM Corp. 2020, 2021 9-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Creating a GraphQL API (5 of 5)


• To further configure your API, click Edit API
• If you do not want to configure your API, click
the Develop link in the breadcrumb trail to
return to the welcome page

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-12. Creating a GraphQL API (5 of 5)

• The Summary panel displays messages as the definition is created, and the selected security
options and rate limits are enforced. If you selected Activate API, the wizard populates an API
Endpoint URL that you can use in testing
• If you also selected Secure using Client ID, the wizard displays a Client ID and Client Secret
you can use
• To further configure your API, click Edit API
• If you do not want to configure your API, click the Develop link in the breadcrumb trail to
return to the welcome page. You can then move on immediately to another task

© Copyright IBM Corp. 2020, 2021 9-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty
9.3. Testing a GraphQL API

© Copyright IBM Corp. 2020, 2021 9-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Testing
g a GraphQLL
API

Figure 9-13. Testing a GraphQL API

Testing a GraphQL API

© Copyright IBM Corp. 2020, 2021 9-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

What is a GraphQL schema?


• A GraphQL schema is a description of the data
clients you can request from a GraphQL API
• A GraphQL schema enables automatic code
generation, validation and parsing,
introspection, and type safety for your APIs
• A GraphQL schema defines the queries and
mutation functions that the client can use to
read and write data from the GraphQL server
• You specify your client or application UI data
requirements in your GraphQL schema

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-14. What is a GraphQL schema?

• A GraphQL schema is a description of the data clients you can request from a GraphQL API
• The schema enables automatic code generation, validation and parsing, introspection, and
type safety for your APIs
• A GraphQL schema also defines the queries and mutation functions that the client can use to
read and write data from the GraphQL server
• You specify your client or application UI data requirements in your GraphQL schema

© Copyright IBM Corp. 2020, 2021 9-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Querying a GraphQL API

• In GraphQL, there are only two types of


operations you can perform: queries and
mutations
• Queries are used to fetch data
ƒ The equivalent to GET calls in REST

• Mutations are used to modify server-side


data
ƒ Represent the state-changing methods in
REST (like DELETE, POST, PUT, PATCH, etc.)

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-15. Querying a GraphQL API

• In GraphQL, you can perform only two types of operations: queries and mutations
• Queries are used to fetch data
▪ They are equivalent to GET calls in REST
• Mutations are used to modify server-side data
▪ They represent the state-changing methods in REST, such as DELETE, POST, PUT, or PATCH

© Copyright IBM Corp. 2020, 2021 9-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Testing a GraphQL API with the Test tab


• In the Request section, select the required
operation type and endpoint
• On the GraphiQL tab, in the left-hand pane of
the editor, supply the query
• If required, you can supply additional request
headers on the Parameters tab
• If your query includes variables, you can supply
values for the variables in the Query Variables
pane
• Click the Execute Query icon in the editor
• The response is displayed in the GraphiQL
editor, and the Trace section shows you how
the API call was executed

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-16. Testing a GraphQL API with the Test tab

• In the Request section, select the required operation type and endpoint. For example, you can
select a POST or a GET request to the gateway endpoint with /graphql or /graphql/cost
appended to the URL
• On the GraphiQL tab, in the left pane of the editor, supply the query with a query operation or
a mutation operation
• If required, you can supply extra request headers on the Parameters tab
• If your query includes variables, you can supply values for the variables in the Query
Variables pane.
• Click the Execute Query icon in the editor
• The response is displayed in the GraphiQL editor, and the Trace section shows you how the
API call was executed

© Copyright IBM Corp. 2020, 2021 9-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Unit summary • Explain what is GraphQL API


• Advantages and Disadvantages of GraphQL API
• Compare and Contrast REST and GraphQL
• Describe how to create a GraphQL API
• Define a GraphQL API query
• Describe how to test a GraphQL API with the Test tab
• Develop a GraphQL schema

© Copyright IBM Corporation 2020, 2021

Figure 9-17. Unit summary

You have completed this unit. Having completed this unit, you should be able to:
• Explain what is a GraphQL API
• Examine the advantages and disadvantages of GraphQL APIs
• Compare and contrast REST and GraphQL
• Describe how to create a GraphQL API
• Explain what is a GraphQL schema
• Define GraphQL API queries and mutations
• Describe how to test a GraphQL API with the Test tab

© Copyright IBM Corp. 2020, 2021 9-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Review questions
1. What is not an advantage of GraphQL?
a. GraphQL calls are handled in a single round trip.
b. GraphQL is introspective.
c. GraphQL does not dictate a specific application architecture.
d. GraphQL shifts much of the work of a data query to the server side.

2. What is a feature of GraphQL that is not a feature of REST?


a. Each request usually calls exactly one route handler function.
b. The data can be gathered by accessing multiple endpoints.
c. All the types that are exposed in an API are written down in a schema using the Schema Definition
Language (SDL).
d. The only way for a client to download data is by hitting endpoints that return fixed data structures.

3. True or False: Queries are used to modify data and mutations are used to fetch data.

Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-18. Review questions

© Copyright IBM Corp. 2020, 2021 9-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Review answers
1. What is not an advantage of GraphQL?
a. GraphQL calls are handled in a single round trip.
b. GraphQL is introspective.
c. GraphQL does not dictate a specific application architecture.
d. GraphQL shifts much of the work of a data query to the server side.
The answer is D.
2. What is a feature of GraphQL that is not a feature of REST?
a. Each request usually calls exactly one route handler function.
b. The data can be gathered by accessing multiple endpoints.
c. All the types that are exposed in an API are written down in a schema using the Schema Definition
Language (SDL).
d. The only way for a client to download data is by hitting endpoints that return fixed data structures.
The answer is C.
3. True or False: Queries are used to modify data and mutations are used to fetch data.
The answer is False. Mutations are used to modify data and queries are used to fetch data.
Creating and Testing a GraphQL API © Copyright IBM Corporation 2020, 2021

Figure 9-19. Review answers

© Copyright IBM Corp. 2020, 2021 9-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Exercise: Creating and Testing a GraphQL API

Figure 9-20. Exercise: Creating and testing a GraphQL API

Exercise 8: Creating and testing a GraphQL API


In this exercise, you create a customers GraphQL API in API Connect that proxies an existing
GraphQL backend server. You send a mutation query in the GraphQL Playground that supplies the
schema with data. In the GraphiQL editor, you test the GraphQL API by sending GET and POST
operations against the GraphQL API endpoint to get the schema data. You also test the GraphQL
API by sending operations against the cost endpoint to get the cost of the request. You use the
Trace tab to see how the API call was executed. You also modify the field weights and create an
@remove directive for the GraphQL schema to modify the API response in the GraphiQL editor. You
replace and download the schema to a local file. Finally, you upload a schema to create a GraphQL
API.

© Copyright IBM Corp. 2020, 2021 9-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 9. Creating and testing a GraphQL API

Uempty

Exercise • Create a GraphQL API


objectives • Publish and test a GraphQL API
• Use the GraphQL schema editor
• Upload a GraphQL schema

© Copyright IBM Corporation 2020, 2021

Figure 9-21. Exercise objectives

After completing this exercise, you should be able to:


• Create a GraphQL API
• Test a GraphQL API
• Use the GraphQL schema editor
• And upload a GraphQL schema

© Copyright IBM Corp. 2020, 2021 9-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Unit 10.Testing an API in the Local Test


Environment
Estimated time
01:00

Overview
This unit describes the process of testing an API in the Local Test Environment. You learn the
definition and uses of a Local Test Environment, as well as how to start and install the Local Test
Environment. You learn how to test a REST API in the Local Test Environment by using a cURL call.
You learn the definition and uses of a TLS Client profile in the Local Test Environment, as well as
how to create a TLS Client profile.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 10-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Unit objectives • Explain what is the Local Test Environment


• Describe how to install the Local Test Environment
• Describe how to start the API Designer in the Local Test
Environment
• Describe how to test an API in the Local Test Environment
• Describe how to create a TLS Client profile in the Local Test
Environment

© Copyright IBM Corporation 2021

Figure 10-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 10-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Topics • Installing and starting the Local Test Environment


• Testing an API in the Local Test Environment
• Creating a TLS Client profile in the Local Test Environment

Testing an API in the Local Test Environment © Copyright IBM Corporation 2020, 2021

Figure 10-2. Topics

© Copyright IBM Corp. 2020, 2021 10-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty
10.1.Installing and starting the local test
envionment

© Copyright IBM Corp. 2020, 2021 10-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Installing
g and
d
starting
g the
e Locall
Testt Environment

Figure 10-3. Installing and starting the Local Test Environment

© Copyright IBM Corp. 2020, 2021 10-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

What is the Local Test Environment?


• The Local Test Environment (LTE) is used to test APIs on your local machine without the need
to connect to an API Connect management server
• The LTE is a lightweight API Manager that runs on your local machine
• The LTE allows you to rapidly test APIs locally
• The API Connect Local Test Environment provides the following methods for testing an API on
your local machine
ƒ Invoking the API from the API Designer UI application running in Online mode
ƒ Calling the API in the Local Test Environment with a cURL command

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-4. What is the Local Test Environment?

© Copyright IBM Corp. 2020, 2021 10-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Installing the Local Test Environment


• Open Fix Central in a browser and specify the product,
version, and platform to find LTE files
ƒ Product selector: IBM API Connect
ƒ Installed Version: 10.0.1.2
ƒ Platform: Linux
• Download LTE files to /Downloads
ƒ apic-lte-image_10.0.1.2-ifix2
ƒ apic-lte-linux_10.0.1.2-ifix2
ƒ toolkit-loopback-designer-linux_10.0.1.2-ifix2

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-5. Installing the Local Test Environment

© Copyright IBM Corp. 2020, 2021 10-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Starting the API Designer in the LTE (1 of 2)


• Unzip and extract the toolkit
ƒ tar zxvf toolkit-loopback-designer-linux_10.0.1.2-ifix2.tgz

• Make the binary file executable


ƒ chmod +x apic
ƒ chmod +x apic-lte-linux_10.0.1.2-ifix2

• Load the Docker images into your Docker image repository


ƒ docker load < apic-lte-images_10.0.1.2-ifix2.tar.gz

• Start the Docker images


ƒ ./apic-lte-linux_10.0.1.2-ifix2 start

• Verify that the Local Test Environment is installed and running correctly
ƒ ./apic-lte-linux_10.0.1.2-ifix2 status

• Log in to the management server


ƒ ./apic login --server localhost:2000 --username shavon --password 7iron-hide --realm
provider/default-idp-2

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-6. Starting the API Designer in the LTE (1 of 2)

© Copyright IBM Corp. 2020, 2021 10-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Starting the API Designer in the LTE (2 of 2)


• To prepare an API for testing in the Local Test Environment, you
must publish it to the Sandbox Catalog in the Local Test
Environment.
• Launch API Designer
ƒ ./api_designer-linux --no-sandbox

• Open the API directory


• Connect to Cloud
ƒ localhost:2000/API Manager User Registry/shavon

• Log in to API Designer


ƒ Username: shavon
ƒ Password: 7iron-hide

• Activate the API


ƒ Select the Develop icon in the left navigation panel
ƒ Click petstore
ƒ Toggle the switch and verify that the petstore API is online

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-7. Starting the API Designer in the LTE (2 of 2)

© Copyright IBM Corp. 2020, 2021 10-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty
10.2.Testing an API in the Local Test
Environment

© Copyright IBM Corp. 2020, 2021 10-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Testing
g ann APII in
n
the
e Locall Testt
Environment

Figure 10-8. Testing an API in the Local Test Environment

© Copyright IBM Corp. 2020, 2021 10-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Test an API in the Local Test Environment


• Copy the Client ID from the Endpoints tab in API Designer
• Issue a REST API cURL call in the terminal with your copied Client ID
ƒ curl -k
https://localhost:9444/localtest/sandbox/v2/pet/98711?client_id=<CLIENT_ID>

• Verify the cURL response

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-9. Test an API in the Local Test Environment

© Copyright IBM Corp. 2020, 2021 10-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty
10.3.Creating a TLS client profile in the Local
Test Environment

© Copyright IBM Corp. 2020, 2021 10-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Creating g a TLSS
Clientt profile
e in
n the
e
Locall Testt
Environment

Figure 10-10. Creating a TLS Client profile in the Local Test Environment

© Copyright IBM Corp. 2020, 2021 10-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Why create a TLS Client profile?


• Transport Layer Security (TLS) profiles provide secure transmission of data over HTTPs.
However, you do not need to create a TLS Client profile to operate your Local Test
Environment.
• API Connect uses TLS client profiles to establish secure trust with peers for transport layer
protection. In order to create a TLS Client profile, you need to generate the following:
ƒ Keystores contain matched pairs of public certificates and private keys used to confirm identity and
encrypt/decrypt data transmission over HTTPS.
ƒ Truststores are repositories containing trusted certificates with verified public keys. The certificates in
the truststore are usually obtained from a third-party certificate authority (CA).
• The URLs generated from the keystore and the truststore are then used to generate the TLS
Client profile.

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-11. Why create a TLS Client profile?

© Copyright IBM Corp. 2020, 2021 10-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Create a TLS Client profile in the LTE (1 of 3)


• Generate a new private key ca-key and a self-signed
certificate ca-cert
• Create a title key-value pair and combine the contents of
ca-key and ca-cert into a String to form a key-value pair
with keystore
• Generate the keystore in the Local Test Environment
ƒ ./apic keystores:create -o localtest -s
https://localhost:2000 --format json
keystore.json
ƒ Copy and save the keystore URL

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-12. Create a TLS Client profile in the LTE (1 of 3)

© Copyright IBM Corp. 2020, 2021 10-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Create a TLS Client profile in the LTE (2 of 3)


• Use the self-signed certificate to generate a new truststore
ƒ keytool –import –file ca-cert –keystore ca-trust

• Convert the truststore file from JKS > PKCS12 > PEM
ƒ keytool -importkeystore -srckeystore ca-trust -
destkeystore ca-trust.p12 -srcstoretype jks -
deststoretype pkcs12
ƒ openssl pkcs12 -in ca-trust.p12 -out ca-trust.pem

• Create a title key-value pair and use the certificate portion of


ca-trust to form a key-value pair with truststore
• Generate the truststore in the Local Test Environment
ƒ ./apic truststores:create -o localtest -s
https://localhost:2000 --format json truststore.json
ƒ Copy and save the truststore URL

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-13. Create a TLS Client profile in the LTE (2 of 3)

© Copyright IBM Corp. 2020, 2021 10-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Create a TLS Client profile in the LTE (3 of 3)


• Create the TLS Client profile with the saved keystore and truststore URLs
• Create the TLS Client profile in the Local Test Environment
ƒ ./apic tls-client-profiles:create -o localtest -s https://localhost:2000 --format
json testprofile.json

• Verify that the TLS Client profile has been created


ƒ ./apic tls-client-profiles:list-all -o localtest -s https://localhost:2000

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-14. Create a TLS Client profile in the LTE (3 of 3)

© Copyright IBM Corp. 2020, 2021 10-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Unit summary • Explain what is the Local Test Environment


• Describe how to install the Local Test Environment
• Describe how to start the API Designer in the Local Test
Environment
• Describe how to test an API in the Local Test Environment
• Describe how to create a TLS Client profile in the Local Test
Environment

© Copyright IBM Corporation 2021

Figure 10-15. Unit summary

© Copyright IBM Corp. 2020, 2021 10-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Review questions
1. Which is a false statement regarding the Local Test Environment?
a. The LTE is a lightweight API Manager that runs on your local machine.
b. The LTE allows you to rapidly test APIs locally.
c. The LTE is used to test APIs on your local machine while connected to an API Connect management
server.
2. True or False: To prepare an API for testing in the Local Test Environment, you must publish it
to the Sandbox Catalog in the Local Test Environment.
3. True or False: Keystores are repositories containing trusted certificates with verified public
keys and truststores contain matched pairs of public certificates and private keys.

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-16. Review questions

Write your answers here:


1.
2.
3.

© Copyright IBM Corp. 2020, 2021 10-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Review answers
1. Which is a false statement regarding the Local Test Environment?
a. The LTE is a lightweight API Manager that runs on your local machine.
b. The LTE allows you to rapidly test APIs locally.
c. The LTE is used to test APIs on your local machine while connected to an API Connect management
server.
The answer is C.
2. True or False: To prepare an API for testing in the Local Test Environment, you must publish it
to the Sandbox Catalog in the Local Test Environment.
The answer is True.
3. True or False: Keystores contain matched pairs of public certificates and private keys and
truststores are repositories containing trusted certificates with verified public keys.
The answer is False.

Testing an API in the Local Test Environment © Copyright IBM Corporation 2021

Figure 10-17. Review answers

© Copyright IBM Corp. 2020, 2021 10-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Exercise: Testing an API in the Local Test Environment

Figure 10-18. Exercise: Testing an API in the Local Test Environment

© Copyright IBM Corp. 2020, 2021 10-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 10. Testing an API in the Local Test Environment

Uempty

Exercise • Configure the Local Test Environment


objectives • Refresh the Petstore Application
• Test an API in the Local Test Environment
• Create a TLS Client profile in the Local Test Environment

© Copyright IBM Corporation 2021

Figure 10-19. Exercise objectives

© Copyright IBM Corp. 2020, 2021 10-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Unit 11.Publishing and managing


products and APIs
Estimated time
00:45

Overview
This unit examines how to package and publish APIs to the API Connect cloud. A product defines
a collection of APIs for deployment. The product contains a plan, which is a contract between the
API provider and API consumer that specifies quality of service characteristics, such as the rate
limit of API calls.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 11-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Unit objectives • Explain the concept of a plan, a product, and a catalog


• Explain the staging and publishing API lifecycle stages
• Define an API product and a plan
• Describe the steps to publish a product
• Explain the lifecycle states for products and APIs

© Copyright IBM Corporation 2020, 2021

Figure 11-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 11-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Topics • Overview of products and plans


• Adding a product
• Staging and publishing a product
• Managing products

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-2. Topics

© Copyright IBM Corp. 2020, 2021 11-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty
11.1.Overview of products and plans

© Copyright IBM Corp. 2020, 2021 11-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Overview
w off
productss andd plans

Figure 11-3. Overview of products and plans

© Copyright IBM Corp. 2020, 2021 11-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Product, plan, API hierarchy

API Manager catalog


Product packaging Test environment
Product Gateway server

Plan

API API endpoint

API
implementation
Data source

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-4. Product, plan, API hierarchy

• Products, plans, and APIs are all represented in YAML files within API Manager.
• Testing the API operations:
▪ You can test your API endpoint operations from the API Manager assembly test feature or
from the Developer Portal for a catalog. The API and product must either be
auto-published by the assembly test feature or explicitly published to the catalog.
Publishing the API and product makes the API callable on the Gateway server. The
application implementation must be started and reachable from the Gateway.
▪ Select the API REST operation that you want to test. Then, call the operation with the test
client that runs on API Manager or the API Developer Portal.

© Copyright IBM Corp. 2020, 2021 11-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Define product and plan


• Products provide a method by which you can group APIs into a package
ƒ Can contain plans
ƒ Add API operations to the product
ƒ Products are published to a catalog

• Plans make APIs available to application developers


ƒ Can be used to enforce rate limits
ƒ Can be used for billing by separating plans into free of charge or billable plans

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-5. Define product and plan

• You can create plans only within products, and these products are then published in a catalog.
• To make an API available to an application developer, it must be included in a plan
• Multiple plans within a single product are useful in that they can fulfill similar purposes but
with differing rate limits or cost structures.

© Copyright IBM Corp. 2020, 2021 11-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

API product definition file


info:
version: 1.0.0
title: hello-world
name: hello-world
gateways:
- datapower-api-gateway
plans: default-plan:
rate-limits:
default:
value: 100/1hour
title: Default Plan
description: Default Plan
approval: false
apis:
helloworld1.0.0:
name: 'helloworld:1.0.0‘
visibility:
view:
type: public
Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-6. API product definition file

• The API product definition file uses the same file structure as an OpenAPI definition. API
products are specific to the IBM API Connect product and are extensions to the OpenAPI
specification.
• The product definition file can be viewed from the Design view or the Source view in API
Manager.

© Copyright IBM Corp. 2020, 2021 11-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty
11.2.Adding a product

© Copyright IBM Corp. 2020, 2021 11-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Adding
g a product

Figure 11-7. Adding a product

Up to this point, products have been automatically created for you by API Manager when you
publish your API. In the last exercise, you created the customer's product when you published the
GraphQL API. The next three slides show the steps to create a product from scratch. Once the
product is added, API definitions can be added to it.

© Copyright IBM Corp. 2020, 2021 11-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Add a product (1 of 3)

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-8. Add a product (1 of 3)

To add a product in API Manager, open the Develop APIs and Products page.
1. From the APIs and Products page, click the Add icon. Then, select Product.
2. Select New product. Click Next.
3. Type a title, name, and version for the product. Click Next.

© Copyright IBM Corp. 2020, 2021 11-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Add a product (2 of 3)

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-9. Add a product (2 of 3)

4. Select the APIs that you want to add to the product. Click Next.
5. Select the plan for the product. Click Next.

© Copyright IBM Corp. 2020, 2021 11-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Add a product (3 of 3)

6
7

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-10. Add a product (3 of 3)

6. Select the option whether to publish the product. Select the visibility and subscribability
options. Click Next.
7. The Summary page is displayed.
8. Edit the product in the Design view to review or change the product definition.

© Copyright IBM Corp. 2020, 2021 11-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty
11.3.Staging and publishing a product

© Copyright IBM Corp. 2020, 2021 11-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Staging
g andd
publishing
g a product

Figure 11-11. Staging and publishing a product

© Copyright IBM Corp. 2020, 2021 11-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Catalogs
• Catalogs are useful for separating products and APIs for testing and production
• The URLs for API calls and the Developer Portal are specific to a particular catalog
• By default, a sandbox catalog is provided
ƒ Used for testing
• Organization owners create more catalogs
ƒ Production catalog for hosting APIs that
are ready for use

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-12. Catalogs

• Products must be staged and published to a catalog to become available to application


developers.
• In a typical configuration, an API provider organization uses a sandbox catalog for testing APIs
under development and a production catalog for hosting APIs that are ready for full use.
• Catalogs are usually configured and managed from the API Manager user interface.
• Catalogs were covered in a prior unit and exercise.

© Copyright IBM Corp. 2020, 2021 11-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Stage a product
• Staging a product makes the product and associated APIs visible to the catalog. From within
the catalog, the product can be managed through the lifecycle states.

• Prompts for the catalog


where to stage the product

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-13. Stage a product

• The stage action creates a snapshot of the product and its associated APIs and makes them
visible on the catalog.
• Stage is the first lifecycle state that is managed from within the catalog.
• When in the staged state, the product is not yet visible or subscribable to developers on the
Developer Portal.
• More about staging a product to a development catalog is covered in the next unit.

© Copyright IBM Corp. 2020, 2021 11-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Publish a product
• Click the options icon in the row with the product that you want to publish.
Then, click Publish

• Select the target catalog for


publishing
• Click Publish
Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-14. Publish a product

• You publish the product and its associated APIs from the list of APIs and Products page in the
Develop option of API Manager.
• Click the list of options ellipsis in the product row. Then, select Publish.
• You can publish a product without first going through the stage lifecycle state.
• Publishing a product makes it visible on the Developer Portal. The API also becomes callable
on the API gateway.
• You publish the product and its associated APIs from the list of APIs and Products page in the
Develop option of API Manager.
• To publish a product:
▪ Select publish on the list of options.
▪ On the publish product page, select the target catalog from the drop-down list.
▪ Optionally select to publish to a specific gateway service.
▪ Click Publish.
▪ The product is published.
• More about publishing a product to a development catalog is covered in the next unit.

© Copyright IBM Corp. 2020, 2021 11-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Review the published products (1 of 2)


The list of published products is displayed on the products page for the catalog.

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-15. Review the published products (1 of 2)

• The list of published products is displayed on the products page for the catalog.

© Copyright IBM Corp. 2020, 2021 11-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Review the published products (2 of 2)


• From the list of published products, select the list of options to view details related to the
plans and subscriptions.

• In the Plans window, you can view the APIs that are included in the product.

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-16. Review the published products (2 of 2)

© Copyright IBM Corp. 2020, 2021 11-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty
11.4.Managing products

© Copyright IBM Corp. 2020, 2021 11-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Managing
g products

Figure 11-17. Managing products

© Copyright IBM Corp. 2020, 2021 11-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Lifecycle of products and API resources


• Here you see a lifecycle for Start
products and their
contained plans and API Author/ Return to draft status
operations as they move “Draft API” Develop
through the different status
states. Catalog
• The whole lifecycle of Stage Remove
products, plans, and APIs
occurs in the context of a Republish
catalog.
Publish Retire

Deprecate Archive

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-18. Lifecycle of products and API resources

• More about product lifecycles are covered in the next unit.

© Copyright IBM Corp. 2020, 2021 11-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Stage and publish a previously published product (1 of 2)


Target catalog: Sandbox
• Publishing a product from API Manager to a sandbox catalog where the product is already
published results in publish of the same version of the product
• Republish a product from the list of APIs and products from the Develop page in API Manager
• When you publish from the Assembly view test feature, the product overwrites the existing
published auto-product that gets created automatically by the test feature

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-19. Stage and publish a previously published product (1 of 2)

• If you publish a product to a sandbox catalog and change it in API Manager, you can publish
the same version of the product. Publishing the same version to the sandbox catalog
overwrites the existing published product with the newer published version.
• When you work with APIs and products on the sandbox catalog, API Connect assumes that
you are working in development mode. The changes that you make to these artifacts overwrite
the earlier versions when you publish them to the sandbox catalog.

© Copyright IBM Corp. 2020, 2021 11-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Stage and publish a previously published product (2 of 2)


Target catalog: non-sandbox
• A published product in a non-sandbox catalog exists independently from the product that you
edit or publish in the API Manager
• Publishing a product to a non-sandbox catalog where the product is already published results
in another instance of the product version
• For this reason, it is advised that when you stage a product, you then create a new version of
the product in the API Manager to make future updates

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-20. Stage and publish a previously published product (2 of 2)

• If you publish a product to a non-sandbox catalog, the product that is published is an


independent and fixed copy of any subsequent published version.
• Before you stage or publish a product to a non-development catalog, it is suggested that you
then create a version of the product. The already-published product is at the earlier version
number. You can then edit and change the later product version and APIs. API Connect is not a
version control tool. You manually change the version number strings or use the create version
option in API Manager.
• API Manager prompts you to create a new version of a product when you try to publish an
existing published product version.

© Copyright IBM Corp. 2020, 2021 11-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Manage published products in API Manager


• Published products can be viewed and managed in API Manager.
• You can manage the lifecycle states of a published product from the Manage option in API
Manager.
• Changes to the product lifecycle state can be made from the options ellipsis.

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-21. Manage published products in API Manager

• You can manage the lifecycle states of a published product from the Manage option in API
Manager. Click the catalog to open it. The list of published products is displayed.
• Changes to the product lifecycle state can be made from the options ellipsis for a particular
product.
• The options from the Manage menu for published products in API Manager includes the
lifecycle options to deprecate or retire the product and to edit the visibility and subscribers.
• Other selections include replacing or superseding an existing product.

© Copyright IBM Corp. 2020, 2021 11-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Remove a product from the catalog (1 of 2)


• From the Manage page, select the option to Retire the product

• Click the option to confirm

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-22. Remove a product from the catalog (1 of 2)

You remove a product from a catalog in two steps.


• The first step is to retire the product. When you select the retire option, all associated APIs are
taken offline, and any subscriptions become inactive.

© Copyright IBM Corp. 2020, 2021 11-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Remove a product from the catalog (2 of 2)


• The product is now in the retired lifecycle state
• Click the Delete option for the product

• Confirm removal

• The product is deleted from the catalog and now exists as a draft

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-23. Remove a product from the catalog (2 of 2)

• The product is now in the retired state on the catalog.


• Select the Delete option for the product.
• Confirm the removal in the confirmation dialog that follows.
• The product is deleted from the catalog and is not displayed in the list of product for the
catalog.
• The product now exists as a “draft” product and can be viewed and edited from the Develop
APIs and products in API Manager.

© Copyright IBM Corp. 2020, 2021 11-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Permissions for managing products


From the Settings tab of the API Manager home page, select Roles

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-24. Permissions for managing products

• By default, the catalog owner and administrator have all permissions to manage products in
the sandbox catalog. Other roles have view permissions by default.
• You can edit and customize the permissions for lifecycle changes from the roles option of the
settings tab in API Manager.

Information

In this course, you use the user with an owner role to manage the products and APIs in API
Manager.

© Copyright IBM Corp. 2020, 2021 11-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Unit summary • Explain the concept of a plan, a product, and a catalog


• Explain the staging and publishing API lifecycle stages
• Define an API product and a plan
• Describe the steps to publish a product
• Explain the lifecycle states for products and APIs

© Copyright IBM Corporation 2020

Figure 11-25. Unit summary

© Copyright IBM Corp. 2020, 2021 11-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Review questions
1. Which of these statements are true?
a. A product can be published to selected communities of application developer organizations
b. Plans within the product can be used to tailor access and visibility further
c. APIs become accessible when a product is published and made visible on the Developer Portal
d. All of the above

2. Which of these statements is not a lifecycle state?


a. Stage
b. Publish
c. Catalog
d. Retire

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-26. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 11-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Review answers
1. Which of these statements are true?
a. A product can be published to selected communities of application developer organizations
b. Plans within the product can be used to tailor access and visibility further
c. APIs become accessible when a product is published and made visible on the Developer Portal
d. All of the above
The answer is D.

2. Which of these statements is not a lifecycle state?


a. Stage
b. Publish
c. Catalog
d. Retire
The answer is C.

Publishing and managing products and APIs © Copyright IBM Corporation 2020, 2021

Figure 11-27. Review answers

© Copyright IBM Corp. 2020, 2021 11-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Exercise: Define and publish an API product

Figure 11-28. Exercise: Define and publish an API product

This exercise examines how to publish APIs with plans and products. You create a product and a
plan and deploy the product in API Manager.

© Copyright IBM Corp. 2020, 2021 11-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 11. Publishing and managing products and APIs

Uempty

Exercise • Create a product and plan in API Manager


objectives • Add the APIs to the product
• Publish the product to the Staging catalog

© Copyright IBM Corporation 2020, 2021

Figure 11-29. Exercise objectives

© Copyright IBM Corp. 2020, 2021 11-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Unit 12.The product lifecycle


Estimated time
02:00

Overview
This unit explains the concept of the Product lifecycle. The lifecycle management feature controls
the staging of a Product version to a catalog. Lifecycle management continues through publishing
to make the Product version available to your application developers. The lifecycle governance
eventually controls retiring and archiving of the Product and APIs.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 12-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Unit objectives • Describe provider organization roles and permissions


• Explain the product lifecycle stages
• Describe how staging and publishing differ in development and
production catalogs
• Describe how lifecycle events are managed in API Manager
• Explain the product availability and visibility settings
• Describe how to create versions of products
• Explain the concept of replacing and superseding published
products
• Explain how to migrate application subscriptions to a new product
version and plan
• Explain how application subscriptions are created in API Manager
• Describe the state changes that occur when approvals are enabled

© Copyright IBM Corporation 2020, 2021

Figure 12-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 12-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Topics • Managing catalog roles and permissions


• Managing product lifecycles
• Staging a product to a development catalog
• Publishing a product to a development catalog
• Lifecycle actions for published products
• Versioning APIs and products
• Migrating app subscribers to new product versions
• Managing subscriptions

The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-2. Topics

© Copyright IBM Corp. 2020, 2021 12-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
12.1.Managing catalog roles and permissions

© Copyright IBM Corp. 2020, 2021 12-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Managing g catalog
g
roless and
d
permissions

Figure 12-3. Managing catalog roles and permissions

© Copyright IBM Corp. 2020, 2021 12-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Default provider organization roles


• Roles that are defined for a catalog in API
Manager
ƒ Administrator
ƒ API Administrator
ƒ Community Manager
ƒ Developer
ƒ Member
ƒ Owner
ƒ Viewer
• The organizational owner has all
permissions to perform all actions on
catalogs, organizations, and spaces.

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-4. Default provider organization roles

• In the Settings for a catalog in API Manager, click Roles.


▪ Default roles for provider organization catalog are displayed.
• The predefined roles for provider organizations are:
▪ Administrator
▪ API Administrator
▪ Community Manager
▪ Developer
▪ Member
▪ Owner
▪ Viewer
• The organizational owner has all permissions to perform all actions on catalogs, organizations,
and spaces. The owner cannot be unassigned from performing these permissions. Any
assigned role is automatically also assigned a member role.

Note

Default roles for provider and consumer organizations are set in Cloud Manager.
The cloud administrator can add other custom roles by clicking the Add icon for the provider
organization from the Default Roles page.

© Copyright IBM Corp. 2020, 2021 12-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
The roles that are defined in Cloud Manager for a provider organization are inherited in API
Manager. The owner of the provider organization can edit these roles and change permissions.

© Copyright IBM Corp. 2020, 2021 12-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Default provider organization permissions


• Each role is assigned
permissions for lifecycle
actions
ƒ View, stage, manage, and so on
• For example, the Developer
role has permission to view,
stage, and manage products in
the provider organization
ƒ The owner can change these
permissions by clicking the Edit
option three buttons

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-5. Default provider organization permissions

• Permissions for performing actions on lifecycle events are pre-set for each role. These
permissions can be viewed in API Manager.
• The example on the page shows that the Developer role has permission to view, stage, and
manage Products in the provider organization. The Developer role can also perform many
lifecycle changes related to product approval.
• The organization owner can change permissions by clicking the Edit ellipsis icon for the
particular role.

© Copyright IBM Corp. 2020, 2021 12-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

View members and permissions for a catalog


• Click the tile to open the catalog from the Manage option in API Manager
ƒ Select Members

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-6. View members and permissions for a catalog

• You can display the members and their roles for a catalog in API Manager. Open the catalog,
then select the Members option.
• The example in the figure displays the owner of the catalog and provider organization.

© Copyright IBM Corp. 2020, 2021 12-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
12.2.Managing product lifecycles

© Copyright IBM Corp. 2020, 2021 12-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Managing g productt
lifecycles

Figure 12-7. Managing product lifecycles

© Copyright IBM Corp. 2020, 2021 12-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Lifecycle of products and API resources


• Here you see a lifecycle for Start
products and their
contained plans and API Author/ Return to draft status
operations as they move “Draft API” Develop
through the different status
states. Catalog
• The whole lifecycle of Stage Remove
products, plans, and APIs
occurs in the context of a Republish
catalog.
Publish Retire

Deprecate Archive

The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-8. Lifecycle of products and API resources

• You were introduced to this slide in the prior unit. In this unit, product lifecycles are covered in
more detail.
• Here you see a lifecycle for products and their contained plans and API operations as they
move through the different states.
• The whole lifecycle of products, plans, and APIs occurs in the context of a catalog.
• Except for the authoring step, all the actions involve state changes to products, plans, and API
operations within a particular catalog.
• When you first create the API in the draft API status, the API and its associated product exist
independently of the catalog. The Develop page in API Manager keeps all the APIs and
products in the “draft” status of the figure.
• The next step is that you stage the product and its contained API resources to the catalog.
• You then publish the product to make it visible on the Developer Portal for that catalog.
• When a product is moved to the deprecated state, the plans in the product are visible only to
developers whose applications are currently subscribed. No new subscriptions to the plan are
possible.
• A product version in the retired state cannot be viewed or subscribed to, and all of the
associated APIs are stopped.
• Product versions in the archived state are similar to ones in the retired state. However,
archived product versions are not displayed by default on the products view of the API
Manager.

© Copyright IBM Corp. 2020, 2021 12-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Catalog production mode setting


• Setting a catalog mode as a
development or production catalog
• Product versions are overwritten
without warning when they are
published to development catalogs
ƒ Overwrites a published product version on
the Developer Portal even if the API
operations are being used on the
Developer Portal
• In production catalogs, you must create
a new product version if the product
version is already published, unless you
are simply changing the product
visibility settings (republishing)

The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-9. Catalog production mode setting

• Some lifecycle state changes happen differently in production versus development catalogs.
• When the Production Mode option is Off under the Settings tab for a particular catalog, staging
and publishing actions are forced.
• For the sandbox catalog and other development catalogs, this means that the existing product
version is overwritten without warning when the Stage or Publish actions are invoked in API
Manager.
• The sandbox catalog can be used for development and testing purposes only. There is no
Production Mode option for the sandbox catalog.
• When publishing a product version to a production catalog, you should create a new product
version if the original product version is already in the published state.

© Copyright IBM Corp. 2020, 2021 12-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Manage the lifecycle of Products in API Manager


• Products and APIs are created or imported into API Manager
• The product lifecycle can be managed from API Manager by using the list of options drop-down

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-10. Manage the lifecycle of Products in API Manager

• After the product is created, it is visible on the Products tab from the Develop page. The
product can be managed from the manage list of options icon.
• From this view, you can move the products through their lifecycle.
• The actions that are available from the manage menu icon change according to the current
state of the product.

© Copyright IBM Corp. 2020, 2021 12-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
12.3.Staging a product to a development catalog

© Copyright IBM Corp. 2020, 2021 12-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Staging
g a productt to
o
a developmentt
catalog

Figure 12-11. Staging a product to a development catalog

© Copyright IBM Corp. 2020, 2021 12-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Stage a product to a development catalog (1 of 3)


• Stage the product to a development catalog
ƒ Select the product version to be staged
ƒ Set the target of the staging step to the development catalog
ƒ Overwrites a previously staged product version

• Creates a snapshot
of the product
ƒ Snapshot is taken of
the product definition
and the OpenAPI
definition
ƒ Updates that you
make to the product
or API are not
reflected in the
staged version

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-12. Stage a product to a development catalog (1 of 3)

• When you stage a product, you create a specific version of the product on a target catalog.
• A catalog is a deployment target and behaves as a logical partition of the gateway and
Developer Portal. When you stage a product, a snapshot or a definitive copy of the product is
created.
• Since it is a snapshot, any updates you make to a product, are not reflected in the staged
version.
• Staging a product that is defined in the Develop page in API Manager is straightforward.
• Select the product version. Then, from the list of options select Stage.

© Copyright IBM Corp. 2020, 2021 12-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Stage a product to a development catalog (2 of 3)


• Select the target catalog where the product is to be staged from the list of defined catalogs

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-13. Stage a product to a development catalog (2 of 3)

• Select the target catalog where the product is to be staged from the drop-down menu.
• The Staging catalog that is selected in the example is defined as a development catalog. The
sandbox catalog is also a development catalog.

© Copyright IBM Corp. 2020, 2021 12-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Stage a product to a development catalog (3 of 3)


• Open the target catalog from the Manage page in API Manager
• The product is displayed in the list of Products with a state of Staged

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-14. Stage a product to a development catalog (3 of 3)

• After the product is staged, you can see its state from the Manage page for the catalog.
• If you remove a product from the staged state, it is removed from the catalog and the product
goes back to the draft state in the Develop area of API Manager.
• The product or API details can be edited and changed. Then, the product can be staged again.

© Copyright IBM Corp. 2020, 2021 12-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
12.4.Publishing a product to a development
catalog

© Copyright IBM Corp. 2020, 2021 12-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Publishingga
productt to
oa
developmentt
catalog

Figure 12-15. Publishing a product to a development catalog

© Copyright IBM Corp. 2020, 2021 12-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Publish a product to a development catalog (1 of 3)


• To publish a product in API Manager, go to the Manage page for the catalog.
• Select Publish from the list of options for the product.

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-16. Publish a product to a development catalog (1 of 3)

© Copyright IBM Corp. 2020, 2021 12-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Publish a product to a development catalog (2 of 3)


• On the second dialog for publishing a product,
select the required options for product
visibility and subscribability.
• The default value for visibility is public, which
means that non-authenticated users can see
the published product on the Developer
Portal.
• The default value for subscribability is
authenticated, which means that only
authenticated users can subscribe
applications to the published product on the
Developer Portal.
• Click the Publish button to Publish the
product.

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-17. Publish a product to a development catalog (2 of 3)

• Select the required visibility and subscribability options


• Then, Publish

© Copyright IBM Corp. 2020, 2021 12-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Publish a product to a development catalog (3 of 3)


• The product is moved to the Published Pending state if approvals are set for publishing,
or the product moved to the Published state

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-18. Publish a product to a development catalog (3 of 3)

Clicking the Publish button publishes the product and makes it available on the Developer Portal
or moves it to a published pending state if approval is required.

© Copyright IBM Corp. 2020, 2021 12-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Published product on the Developer Portal


• The product is visible
on the Developer Portal
depending on the
visibility settings in API
Manager

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-19. Published product on the Developer Portal

Published Products are visible when the developer is signed on to the Developer Portal.
Non-authenticated users see Products with visibility set to public.

© Copyright IBM Corp. 2020, 2021 12-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
12.5.Lifecycle actions for published products

© Copyright IBM Corp. 2020, 2021 12-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Lifecycle
e actionss forr
publishedd products

Figure 12-20. Lifecycle actions for published products

© Copyright IBM Corp. 2020, 2021 12-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Lifecycle actions for published products


• Manage options change according to the lifecycle state
• A product in the published state can be deprecated, retired, replaced, superseded, or
republished with a different visibility.

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-21. Lifecycle actions for published products

• Manage options change according to the lifecycle state


• Products have visual labels that provide visual cues as to the state of the plan.
• Multiple versions of the same product can be in different states in the catalog.
• The actions that are available from the manage menu icon change according to the current
state of the product.
• A product in the published state can be deprecated, retired, replaced, superseded, or
republished with a different visibility.

© Copyright IBM Corp. 2020, 2021 12-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Deprecate a product version


• Prevents developers from subscribing to the plans in the product without hiding it from
existing subscribers

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-22. Deprecate a product version

• Deprecating a product prevents new developers from subscribing to the plans in this product,
without hiding it from existing subscribers.
• A product owner might deprecate a product in anticipation of the next version release but is
forced to keep a previous release for clients that have not yet adopted the new features or are
unwilling to upgrade their code in the short term.

© Copyright IBM Corp. 2020, 2021 12-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Retire a product version


• Retire a published or deprecated product from the Manage icon in API Manager
• When a product is retired, all associated APIs are taken offline, and any subscriptions become
unavailable

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-23. Retire a product version

• The Retire operation moves a product version from the Published to the Retired state.
• Before a published product version can be removed from a catalog, it must first be retired.
• You can retire a published or deprecated product by using the Manage icon in API Manager.
• When a product is retired, all associated APIs are taken offline, and any subscriptions become
inactive.

© Copyright IBM Corp. 2020, 2021 12-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Delete from catalog


• A retired product version can be removed from the catalog

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-24. Delete from catalog

• In the example, you intend to remove version 1.0.0 of the Smart Product product from the
Staging catalog.
• The product version is already in the retired state. From the manage icon, select Delete. Then,
click Delete in the confirmation dialog.
• The product version is removed from the catalog.

© Copyright IBM Corp. 2020, 2021 12-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Stage a product to a production catalog


Creating a new version of a product and its APIs before they are staged and published to a non-
Sandbox catalog is a recommended practice
• Version
ƒ Stage a product version that has been tested and is ready for publishing
• API changes
ƒ API Developers who work on draft APIs should create product and API versions to add feature
enhancements to the APIs
• Not yet visible to consumers
ƒ Publishing is a later step that makes the product and its resources visible on the developer portal for
that environment

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-25. Stage a product to a production catalog

• When testing is completed for an API, the containing product version is staged to the catalog
to create a specific snapshot of that product.
• API Developers should make feature enhancements to a new version of the product and its
API resources.
• You can create versions of Products and APIs at any time.
• Before a product can be published, you must first stage that product to a catalog.
• A staged product that is not published is not visible to the users on the Developer Portal.
• Creating new versions of Products and APIs before they are staged and published to a
production catalog is a recommended practice.

© Copyright IBM Corp. 2020, 2021 12-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
12.6.Versioning APIs and products

© Copyright IBM Corp. 2020, 2021 12-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Versioningg APIss and


d
productss

Figure 12-26. Versioning APIs and products

© Copyright IBM Corp. 2020, 2021 12-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Change an API version


• In the Develop APIs page, select Save as New Version from the list of options for the API
• Type the version number in the dialog, then click Submit
• The new version of the API is saved and is displayed in the list of APIs

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-27. Change an API version

• API versioning was covered in a prior unit. When you create a new version of an API, you can
decide to leave it in the current product or move it to a new one.
• If you want to publish a modified API to a production catalog, you must create a new version
of the API. You cannot publish an API to a production catalog if there is already a published
API with the same name and version.

© Copyright IBM Corp. 2020, 2021 12-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Change a product version (1 of 3)


• Open the Develop page in API Manager
ƒ Select the products option
ƒ Then, select Save as New Version from the list of options for the product

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-28. Change a product version (1 of 3)

• The steps to change the version of a product are the same as to change the version of an API.
• Select the Products tab. Then, from the list of options for the API, select Save as a New
Version.

© Copyright IBM Corp. 2020, 2021 12-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Change a product version (2 of 3)


• Type the version number in the dialog
• Then, click Submit

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-29. Change a product version (2 of 3)

When you save a new version of the product, you are prompted to type the version number. Then,
click Submit.
As with APIs, the version.release.modification version numbering scheme is recommended,
for example 2.0.0.

© Copyright IBM Corp. 2020, 2021 12-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Change a product version (3 of 3)


• The new version of the product is saved.

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-30. Change a product version (3 of 3)

• The new version of the product is saved and is displayed in the list of Products.
• The next step is to open the product in the editor and add the new version of the API to the
product.

© Copyright IBM Corp. 2020, 2021 12-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Add the later version of the API to the product (1 of 3)


• Open the later product version (2.0.0) with the editor
• Select APIs
• Click Edit

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-31. Add the later version of the API to the product (1 of 3)

• To assign the latest version of the API to the product, start by opening the recently created
product version with the editor in API Manager.
• With the product open in the editor, select the APIs tab. Then, click the Edit button to display
the APIs that are associated with the product version.

© Copyright IBM Corp. 2020, 2021 12-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Add the later version of the API to the product (2 of 3)


In the Add APIs to product dialog:
• Clear the older API version
(1.0.0)
• Select the newer API version
(2.0.0)
• Click Save

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-32. Add the later version of the API to the product (2 of 3)

• The list of APIs that are assigned to the product are displayed.
• Deselect the older API version 1.0.0 and select the newer API version 2.0.0.
• Save the changes.

© Copyright IBM Corp. 2020, 2021 12-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Add the later version of the API to the product (3 of 3)


• The newer API version is now assigned to the product version

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-33. Add the later version of the API to the product (3 of 3)

The newer API version is now assigned to the product version and is displayed in the list of APIs.

© Copyright IBM Corp. 2020, 2021 12-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Replace a product version with another version (1 of 4)


• Replace an
existing product
version with
another product
version
ƒ Newer version
might include fixes
• The replacement
product must be in
the Staged or
Deprecated
state, and the
product to be
replaced must be
in the Published
state
The product lifecycle © Copyright IBM Corporation 2020

Figure 12-34. Replace a product version with another version (1 of 4)

Scenario: Bug fixes to an existing product version.


This feature is equivalent to swapping an existing product version with a later version.
In this scenario, a previously published product version (1.0.0) is replaced by a later staged
version (2.0.0) that contains the bug fixes.
When you replace a product with another product, the following actions are taken:
• The replacement product is published.
• The same visibility, subscriber, and gateway enforcement settings from the original product
are used in the replacement product.
• The subscribers to the original product are migrated to the replacement product.
• The original product is moved to the Retired state. Products in the Retired state are removed
from the Developer Portal; they are no longer visible to the application developers, and any
subscriptions to them are canceled.

© Copyright IBM Corp. 2020, 2021 12-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Replace a product version with another version (2 of 4)


• Select the replacement product from the list

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-35. Replace a product version with another version (2 of 4)

The dialog box that is displayed when you choose to replace an existing product version carries
out the following actions:
• The replacement product will be published.
• The same visibility and subscriber settings of the original product version will be used.
• The subscribers will be migrated.
• The product that is being replaced will be retired.

© Copyright IBM Corp. 2020, 2021 12-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Replace a product version with another version (3 of 4)


• Select the plans that are supported
in the replacement product

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-36. Replace a product version with another version (3 of 4)

The dialog prompts you to select the plans that are supported in the replacement plan. You can
select multiple plans in the dialog if there are multiple plans to choose from.

© Copyright IBM Corp. 2020, 2021 12-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Replace a product version with another version (4 of 4)


• Product version 1.0.0 is retired and is replaced by 2.0.0
• Product version 2.0.0 is now published with the bug fixes, or moved to the published pending
state when approvals are required for the publishing action

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-37. Replace a product version with another version (4 of 4)

• The slide shows the results from the publish with replace feature of API Manager.
• The original product version is retired, and the new product version and plan are published or
in the pending publishing state if approvals are required
• The subscribers are migrated from the original plan to the plan that is associated with the later
product version.

© Copyright IBM Corp. 2020, 2021 12-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Supersede a product version with another version (1 of 4)


• The superseding
product must be in
the Staged or
Deprecated
state, and the
product to be
superseded must
be in the
Published state

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-38. Supersede a product version with another version (1 of 4)

Scenario: Enhancements to a product version.


Enhancements are made to some APIs that are contained in Smart Product version 2.0.0.
In this scenario, version 2.0.0 of Smart Product is staged to the Staging catalog and is about to
supersede Smart Product version 1.0.0.

Note

The Smart Product product 1.0.0 and 2.0.0 are reused in this example. The two Products are reset
to the staged and published states respectively at the start of the process.

© Copyright IBM Corp. 2020, 2021 12-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Supersede a product version with another version (2 of 4)


• Select the superseding product from the list of Products

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-39. Supersede a product version with another version (2 of 4)

Choose the product that is superseding the published version from the list of Products.

© Copyright IBM Corp. 2020, 2021 12-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Supersede a product version with another version (3 of 4)


• Select the plans that are to be
migrated to the superseding
product

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-40. Supersede a product version with another version (3 of 4)

Verify the product that is being superseded and each plan within the product that is to be
migrated.

© Copyright IBM Corp. 2020, 2021 12-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Supersede a product version with another version (4 of 4)


• Product version 1.0.0 is deprecated
ƒ Application developers that are already subscribed to the product can continue to use it, but no new
developers can subscribe to the product
• Product version 2.0.0 is now published with the enhancements

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-41. Supersede a product version with another version (4 of 4)

When you supersede a product with another product, the following actions are taken:
• The superseding product is published.
• The same visibility, subscriber, and gateway enforcement settings from the original product
are used for the superseding product.
• The original product is moved to the Deprecated state. When a product is deprecated,
application developers that are already subscribed to the product can continue to use it, but
no new developers can subscribe to the product.
Subscribers of the product version are not automatically migrated. This means that the
subscribers will still use the deprecated product until they subscribe to the new product version.

© Copyright IBM Corp. 2020, 2021 12-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Product on the Developer Portal


• The superseding product version is displayed on the Developer Portal

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-42. Product on the Developer Portal

The superseding product version is displayed on the landing page of the Developer Portal.

© Copyright IBM Corp. 2020, 2021 12-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
12.7.Migrating app subscribers to new product
versions

© Copyright IBM Corp. 2020, 2021 12-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Migratingg app
p
subscriberss to
o new
w
productt versions

Figure 12-43. Migrating app subscribers to new product versions

© Copyright IBM Corp. 2020, 2021 12-52


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Subscriptions
• An application must subscribe to a plan
ƒ A plan is a collection of API operations and any rate limits that might apply
• An application plan subscription allows the application to call API resources by the plan

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-44. Subscriptions

• Application developers create applications in the Developer Portal. Then, the developers
subscribe their applications to one or more plans by using the Developer Portal.
• Applications are generated with a client ID that can be used to authorize the application to call
the API operations. The plan that the application subscribes to can restrict the number of API
calls the application can make during a time period.
• To manage application subscriptions in the API Manager UI, a user must be assigned a role
that has the Subscriptions > Manage permission.

© Copyright IBM Corp. 2020, 2021 12-53


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Migrating app subscribers to new product versions (1 of 4)


• When new versions of products are created, there are a number of ways that subscribers can
be moved to the plans of the new product
• You can move users to the new plans in different ways, depending on your product strategy, by
using the options icon alongside the product in the associated catalog in API Manager
• For example, you can:
ƒ Automatically migrate all existing subscribers to a new product when you are applying fixes to a
product
ƒ Encourage subscribers to move to a new product and stop new users from subscribing to the original
product if an enhancement or new feature is added
ƒ Prepare a product to be removed from production but leave the existing subscriptions as they are
ƒ Give subscribers the option to move to a different product but without affecting the original product

These scenarios are covered in the next three slides

The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-45. Migrating app subscribers to new product versions (1 of 4)

© Copyright IBM Corp. 2020, 2021 12-54


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Migrating app subscribers to new product versions (2 of 4)


• To automatically migrate all existing subscribers to a new product when you are applying fixes
to a product:
ƒ You should replace the original version of the product with a new version of the product
í The replacement product is published
í The original product is retired
í The subscribers to the original product are automatically migrated to the replacement product

Important:
Customers cannot be migrated automatically from a free plan to a
paid plan. To move your customers from a free plan to a paid
plan, you can supersede the product with a new product and set a
migration target to the paid plan. The customers then select a
button to migrate and must enter their credit card information
before the process is complete.
The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-46. Migrating app subscribers to new product versions (2 of 4)

© Copyright IBM Corp. 2020, 2021 12-55


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Migrating app subscribers to new product versions (3 of 4)


• To encourage subscribers to move to a new product and stop new users from subscribing to
the original product if an enhancement or new feature is added:
• You should supersede the original version of the product with a new version of the product.
• The superseding product is published.
• The original product is deprecated.
• The application developers that are already subscribed to the now deprecated product can
continue to use it, but no new developers can subscribe to the product. In the Developer Portal the
subscribers see a migrate this subscription message, which they can click to upgrade their
subscription to the migration target.
• If the migration target is a paid plan, subscribers must enter a payment method before they can
upgrade.

The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-47. Migrating app subscribers to new product versions (3 of 4)

© Copyright IBM Corp. 2020, 2021 12-56


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Migrating app subscribers to new product versions (4 of 4)


• To prepare a product to be removed from production but leave the existing subscriptions as
they are:
• You should deprecate the original product.
• The product is deprecated.
• The application developers that are already subscribed to the now deprecated product can
continue to use it, but no new developers can subscribe to the product.
• You can define a replacement product by using the Set Migration Target option in the catalog.
Application developers will then see a Migrate This Subscription message in the Developer Portal
that they can click to upgrade their subscription to the migration target. If the upgrade target is a
paid plan, they must enter a payment method before upgrading. Upgrades by API consumers from
a free plan to a paid plan are supported.

• To give subscribers the option to move to a different product but without affecting the original
product:
• You can use the Set Migration Target option in the catalog on a product that isn't being deprecated or
superseded.
The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-48. Migrating app subscribers to new product versions (4 of 4)

© Copyright IBM Corp. 2020, 2021 12-57


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty
12.8.Managing subscriptions

© Copyright IBM Corp. 2020, 2021 12-58


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Managingg
subscriptions

Figure 12-49. Managing subscriptions

© Copyright IBM Corp. 2020, 2021 12-59


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Unsubscribing from a product and plan


• An authenticated user can unsubscribe an application from a product and plan in the
Developer Portal

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-50. Unsubscribing from a product and plan

An authenticated user can unsubscribe an application from a product and plan in the Developer
Portal.
1. The application is unsubscribed from the product and the plan by selecting the Unsubscribe
option.
2. A confirmation dialog is presented.
3. The application displays that there are no current subscriptions.

© Copyright IBM Corp. 2020, 2021 12-60


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Manage subscriptions in API Manager (1 of 3)


• With the right permissions, a member of a provider organization can create subscriptions from
the Applications page for a catalog
• Can be done for product and plans that do not already have a subscription

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-51. Manage subscriptions in API Manager (1 of 3)

• Members of provider organizations who have permission can create subscriptions from the
API Manager user interface. Open the catalog. Then, select the Applications tab from the
Manage option.
• From the Applications page for a catalog, select Create Subscription from the options list for
the application.

© Copyright IBM Corp. 2020, 2021 12-61


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Manage subscriptions in API Manager (2 of 3)


• Select the product and plan for the application subscription
• Then, click Create Subscription

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-52. Manage subscriptions in API Manager (2 of 3)

In the Create Subscription dialog in API Manager, select the product and plan for the application
subscription. Then, click Create Subscription.

© Copyright IBM Corp. 2020, 2021 12-62


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Manage subscriptions in API Manager (3 of 3)


• The subscription is created and can be seen in the application subscriptions on the Developer
Portal

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-53. Manage subscriptions in API Manager (3 of 3)

Verify that the subscription is created for the application by signing on to the Developer Portal and
viewing the subscriptions for the application. You see that the application is subscribed to the
product and uses the default plan.

© Copyright IBM Corp. 2020, 2021 12-63


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Enable approvals for lifecycle state changes (1 of 2)


• Approvals for lifecycle state changes are configured in the Settings for the catalog
ƒ Click Edit to add or remove lifecycle approvals

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-54. Enable approvals for lifecycle state changes (1 of 2)

• Approvals for lifecycle state changes are configured in the Settings for the catalog. Go to
Settings, then click the Lifecycle Approvals tab.
• The page displays the lifecycle states that require approval. In the example, only the Publish
option requires approval. Click the Edit button to configure approvals for other lifecycle state
changes.

© Copyright IBM Corp. 2020, 2021 12-64


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Enable approvals for lifecycle state changes (2 of 2)


• Select the lifecycle events that require approvals
ƒ Click Save to add or remove lifecycle approvals

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-55. Enable approvals for lifecycle state changes (2 of 2)

• When the Edit button is clicked from the Lifecycle Approvals page, a dialog is displayed where
you can enable or disable lifecycle approvals.
• If approval is required for a product management operation, an approval request is sent, and
the product version moves to the pending state. When the request is approved, the operation
is completed.

© Copyright IBM Corp. 2020, 2021 12-65


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Lifecycle state changes when approvals are enabled


• If approval is required for a product management operation, an approval request is sent, and
the product version moves to the Pending state
• This request is displayed on the Tasks tab of the catalog, from where the request can be
approved or declined
• When the request is approved, the operation is completed, and the product version moves to
the next lifecycle state
ƒ If approval is not required, the operation is completed immediately

The product lifecycle © Copyright IBM Corporation 2020

Figure 12-56. Lifecycle state changes when approvals are enabled

If approvals for product lifecycle changes are enabled for a catalog, then an attempt to change the
lifecycle state of a product results in an approval request being sent. This request is displayed on
the Tasks tab of the catalog, from where the request can be approved or declined. The authority
to approve product lifecycle state changes is restricted to users in specified roles.

© Copyright IBM Corp. 2020, 2021 12-66


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Unit summary • Describe provider organization roles and permissions


• Explain the product lifecycle stages
• Describe how staging and publishing differ in development and
production catalogs
• Describe how lifecycle events are managed in API Manager
• Explain the product availability and visibility settings
• Describe how to create versions of products
• Explain the concept of replacing and superseding published
products
• Explain how to migrate application subscriptions to a new product
version and plan
• Explain how application subscriptions are created in API Manager
• Describe the state changes that occur when approvals are enabled

© Copyright IBM Corporation 2020, 2021

Figure 12-57. Unit summary

© Copyright IBM Corp. 2020, 2021 12-67


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Review questions
1. True or False: An application must subscribe to a plan before it can be used.
2. Which of these statements is true about lifecycle changes in a development catalog?
a. Staging and publishing actions overwrite the existing version.
b. The system automatically resolves any staging or publishing conflicts.
c. All predefined roles can stage and publish API Products.
d. A and B
e. All of the above.

The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-58. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 12-68


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Review answers
1. True or False: An application must subscribe to a plan before it can be used.
The answer is True.
2. Which of these statements is true about lifecycle changes in a development catalog?
a. Staging and publishing actions overwrite the existing version.
b. The system automatically resolves any staging or publishing conflicts.
c. All predefined roles can stage and publish API Products.
d. A and B.
e. All of the above.
The answer is D.
In the API Manager Settings for a catalog, select Roles to edit the permissions for the catalog

The product lifecycle © Copyright IBM Corporation 2020, 2021

Figure 12-59. Review answers

© Copyright IBM Corp. 2020, 2021 12-69


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Exercise: Managing and approving API Products

Figure 12-60. Exercise: Managing and approving API Products

This exercise shows you how the product lifecycle is managed in API Manager. You review
product and API availability and visibility settings and create a plan. You configure lifecycle
settings and approval settings for a catalog. You examine how to define a user for the provider
organization. You manage product and API versions. You publish artifacts to the Staging catalog,
and then review and approve the lifecycle stage for a published product.

© Copyright IBM Corp. 2020, 2021 12-70


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 12. The product lifecycle

Uempty

Exercise • Review product availability and visibility settings in API Manager


objectives • Create and configure plans
• Review the roles and members of the provider organization
• Create a provider organization member with the developer role
• Sign in to API Manager with the owner role
• Configure lifecycle and approval settings
• Publish a product and APIs to the Staging catalog
• Create a version of an API and product
• Approve a published product

© Copyright IBM Corporation 2020, 2021

Figure 12-61. Exercise objectives

© Copyright IBM Corp. 2020, 2021 12-71


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Unit 13.Subscribing and testing APIs in


the Developer Portal
Estimated time
01:00

Overview
This unit explores the application developer user experience. In the API Connect architecture, the
application developer creates an application that calls published APIs. To use APIs, an application
developer creates an account in the Developer Portal. This unit explains how the application
developer subscribes to a plan and tests API operations.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 13-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Unit objectives • Explain the role of application developers in calling published APIs
• Describe the Developer Portal self-registration process for
development catalogs
• Explain how to add an application in the Developer Portal
• Describe the role of client ID and client secret for application
identification
• Describe how to subscribe to an API plan
• Describe the subscription approval process
• Explain the test client features in the Developer Portal

© Copyright IBM Corporation 2020, 2021

Figure 13-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 13-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Topics • Role of the application developer


• Creating an application and subscription in the Developer Portal
• Testing an API in the Developer Portal

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-2. Topics

© Copyright IBM Corp. 2020, 2021 13-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty
13.1.Role of the application developer

© Copyright IBM Corp. 2020, 2021 13-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Role
e off the
e
applicationn
developer

Figure 13-3. Role of the application developer

© Copyright IBM Corp. 2020, 2021 13-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Role of application developers


• Application developers discover and use APIs by using the Developer Portal
• When API providers publish an API, they can specify one or more consumer organizations,
thus restricting visibility of the API
• Only application developers in the specified organizations can see the API on the Developer
Portal and obtain application keys to access it
• A consumer organization might represent an individual or a group of application developers
• Application developers register their applications and subscribe to plans on the Developer
Portal

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-4. Role of application developers

• Application developers use the Developer Portal to discover and use APIs. API developers
create and publish APIs. API developers belong to provider organizations.
• Application developers belong to consumer organizations.
• When API providers publish APIs, they can restrict visibility of the APIs to one or more
consumer organizations or make the APIs visible to public or authenticated users.
• When you created the Ordinal consumer organization in an earlier exercise, you took on the
role of the owner and invited an application developer to the organization.

© Copyright IBM Corp. 2020, 2021 13-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Application developer versus API developer


Application developer
• An Application developer creates an application to use a product and its associated APIs
• Then, the application must subscribe to a plan that is defined for the product
ƒ By subscribing to a plan, the application establishes the contract for use of the product and APIs
• An Application developer is a member of a consumer organization

API developer
• An API developer in the provider organization might add a client ID security requirement to
the API
• The application that is registered to use the API must then provide a client ID to successfully
call the API
• An API developer is a member of a provider organization

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-5. Application developer versus API developer

Questions

Why might the API developer enforce the client ID requirement for an application to access the
API?
Answers:
1. To restrict API access to authorized applications or users.
2. To reset the client ID to exclude errant application usage.
3. For analytics, to monitor and track API usage by a particular client.

You created an API Developer role in the last exercise and invited them to the Think organization.
In the next series of slides, self-service sign on is covered.

© Copyright IBM Corp. 2020, 2021 13-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Self-registration on the Developer Portal (1 of 5)


• Developers can do their own sign-up process when the Self-service onboarding is set to
“enabled” for the Developer Portal in the API Manager interface
ƒ Generally used only for sandbox development catalogs
• Developer Portal home page includes a Create account link
• Application
Developers can
create their own
user account
and consumer
organization on
the Developer
Portal

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-6. Self-registration on the Developer Portal (1 of 5)

• Developers can sign up to the Developer Portal without requiring an invitation from the API
provider. Enable the self-service onboarding in the API Manager interface settings for the
catalog. The Developer Portal then includes a link to create an account.
• The self sign-up process is generally only enabled for sandbox development catalogs so that
application developers can easily register, view, and subscribe to APIs.

© Copyright IBM Corp. 2020, 2021 13-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Self-registration on the Developer Portal (2 of 5)


• The sign-up page is displayed after the Create Account is selected on the Developer Portal

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-7. Self-registration on the Developer Portal (2 of 5)

The “Sign up” page is shown in two parts. The user creates an account with a username, email
address, given name, family name, and a consumer organization name.

© Copyright IBM Corp. 2020, 2021 13-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Self-registration on the Developer Portal (3 of 5)


• An activation link is sent to the email server

• User responds by opening the


email and clicking the email link to
activate the account in the
Developer Portal

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-8. Self-registration on the Developer Portal (3 of 5)

• An email notification is displayed. An email message is sent to the email address that was
specified during account creation.
• When the email is opened, a link is displayed in the body of the email message. Clicking the
link address activates the user account on the Developer Portal.

© Copyright IBM Corp. 2020, 2021 13-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Self-registration on the Developer Portal (4 of 5)


• The account is activated on the Developer Portal

• User signs on to the Portal with the


same credentials that were
specified during account creation

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-9. Self-registration on the Developer Portal (4 of 5)

The account is activated on the Developer Portal. The user can sign on to the Developer Portal
with the same credentials that were specified during account creation.

© Copyright IBM Corp. 2020, 2021 13-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Self-registration on the Developer Portal (5 of 5)


• User is signed on
and can now
manage the
account from the
My account option

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-10. Self-registration on the Developer Portal (5 of 5)

• The user is authenticated and signed on to the Developer Portal.


• The user can manage the account and organization from the list that is displayed below the
user’s icon.

© Copyright IBM Corp. 2020, 2021 13-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty
13.2.Creating an application and subscription in
the Developer Portal

© Copyright IBM Corp. 2020, 2021 13-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Creating
g an
n
application
n andd
subscription
n in
n the
e
Developerr Portal

Figure 13-11. Creating an application and subscription in the Developer Portal

© Copyright IBM Corp. 2020, 2021 13-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Creating an application and subscription


• Business Partners, application developers, and members of consumer organizations create
applications to use a product and its associated APIs.
• The application must subscribe to a plan that is defined for the Product
ƒ By subscribing to a plan, the application establishes the contract for use of the Product and APIs

• Business partners
and application
developers use the
Developer Portal to
access APIs and
products.

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-12. Creating an application and subscription

As discussed, an application developer creates an application to use a product and its associated
APIs.

© Copyright IBM Corp. 2020, 2021 13-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Create an application in Developer Portal (1 of 4)


• Select Apps from the menu
• Then, click Create new App

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-13. Create an application in Developer Portal (1 of 4)

The Create new App link is available on the Apps tab on the Developer Portal.

© Copyright IBM Corp. 2020, 2021 13-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Create an application in Developer Portal (2 of 4)


• Type the name in the Title field and an optional
description
• Click Save

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-14. Create an application in Developer Portal (2 of 4)

• Specify a title for the application.


• Optionally specify a description and an OAuth redirect URL.
• Then click Save to create the application.

© Copyright IBM Corp. 2020, 2021 13-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Create an application in Developer Portal (3 of 4)


• The application credentials are created
• Click the Show options to display the API key
and secret

• Client ID and Client Secret are credentials that


an application uses to identify itself
• Click OK to create the application

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-15. Create an application in Developer Portal (3 of 4)

• When an API operation is called, you can require that an application must provide either a
client ID, or a client ID and client secret.
• The identification requirements for calling an API are specified in the API security definitions
in API Manager.
• These requirements include supplying a client ID, client ID and client secret, or none.
• Click the Show option to show the API key and secret. Copy and save these values for APIs
that require an API key and secret.

© Copyright IBM Corp. 2020, 2021 13-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Create an application in Developer Portal (4 of 4)


• The application is displayed with the Subscriptions tab selected
• Click the options list
to edit or reset the
credentials

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-16. Create an application in Developer Portal (4 of 4)

© Copyright IBM Corp. 2020, 2021 13-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Subscribe an application to a product plan (1 of 6)


• You can browse the
available APIs at the
end of the registration
form and subscribe to a
plan.
• Click the available APIs
link.

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-17. Subscribe an application to a product plan (1 of 6)

• The available APIs link is at the end of the application subscriptions page.
• Clicking the available APIs link takes you to the list of Products and their associated APIs.

© Copyright IBM Corp. 2020, 2021 13-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Subscribe an application to a product plan (2 of 6)


• The list of products is displayed
• Click the link for the product

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-18. Subscribe an application to a product plan (2 of 6)

Click the link for the product to open the product and view the list of APIs and plans.

© Copyright IBM Corp. 2020, 2021 13-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Subscribe an application to a product plan (3 of 6)


• The product
APIs and plans
are displayed
• Select the plan
that you want to
use
• The default plan
is a rate-limited
plan, while the
gold plan is an
unlimited plan

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-19. Subscribe an application to a product plan (3 of 6)

• Here you see the APIs for the petstore product.


• In the example, you can select the default plan or gold plan. The gold plan is selected.
• The gold plan displays a lock icon that indicates that the plan requires approval.

© Copyright IBM Corp. 2020, 2021 13-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Subscribe an application to a product plan (4 of 6)


• Select the application that is to be subscribed to the plan

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-20. Subscribe an application to a product plan (4 of 6)

• Select the application that is being subscribed to the plan.


• Alternatively, you can create a new application.

© Copyright IBM Corp. 2020, 2021 13-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Subscribe an application to a product plan (5 of 6)


• Confirm the subscription properties
• Then, click Next to confirm and create the subscription.

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-21. Subscribe an application to a product plan (5 of 6)

• Review the subscription values.


• Then click Next to confirm and create the subscription.

© Copyright IBM Corp. 2020, 2021 13-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Subscribe an application to a product plan (6 of 6)


• The subscription is complete, and the application is subscribed to the plan
• Since the gold plan was selected, the subscription request is pending approval
• Click Done to
complete the
subscription
request

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-22. Subscribe an application to a product plan (6 of 6)

• The subscription request is created and is now pending approval.


• Since the gold plan is selected, the API provider must approve the subscription request in API
Manager.

© Copyright IBM Corp. 2020, 2021 13-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Approval requests (1 of 3)
• If you go to the application in the Developer
Portal, you see that the subscription is
pending approval.

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-23. Approval requests (1 of 3)

© Copyright IBM Corp. 2020, 2021 13-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Approval requests (2 of 3)
• From the Manage page for the catalog, click the vertical ellipses
• The subscription request can be approved or declined

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-24. Approval requests (2 of 3)

The API product owner can approve the subscription request in API Manager from the Tasks page
of the catalog.

© Copyright IBM Corp. 2020, 2021 13-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Approval requests (3 of 3)
• Verify that the application is subscribed to
the plan in the Developer Portal

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-25. Approval requests (3 of 3)

• The page shows that the application is subscribed to the gold plan for the think-product.
• The application can now call and test APIs.

© Copyright IBM Corp. 2020, 2021 13-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty
13.3.Testing an API in the Developer Portal

© Copyright IBM Corp. 2020, 2021 13-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Testing
g an
n APII in
n
the
e Developerr Portal

Figure 13-26. Testing an API in the Developer Portal

© Copyright IBM Corp. 2020, 2021 13-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Testing an API in the Developer Portal


• The API definition must include the statements:

x-ibm-configuration:
testable: true
enforced: true
cors:
enabled: true

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-27. Testing an API in the Developer Portal

• For an API to be tested on the Developer Portal, the definition file for the API to be tested
must include the statements:
x-ibm-configuration:
testable: true
enforced: true
cors:
enabled: true
• Notice that the security requirements are also specified in the YAML source file.
• In the example, a call to the API requires the application to authenticate with a client ID.

© Copyright IBM Corp. 2020, 2021 13-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Testing an API in the Developer Portal (1 of 6)


• Open a product from the API Products link
• Select the API to be tested

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-28. Testing an API in the Developer Portal (1 of 6)

• If the testable option is enabled for an API, then the API can be tested on the Developer
Portal.
• After the product is selected, select the API that you want to test from the list of APIs.

© Copyright IBM Corp. 2020, 2021 13-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Testing an API in the Developer Portal (2 of 6)


• Select the operation to be tested

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-29. Testing an API in the Developer Portal (2 of 6)

Select the API operation that you want to test in the Developer Portal.

© Copyright IBM Corp. 2020, 2021 13-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Testing an API in the Developer Portal (3 of 6)


• Click the Try it tab on the page

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-30. Testing an API in the Developer Portal (3 of 6)

The details for the POST /pet operation is displayed on the page.

© Copyright IBM Corp. 2020, 2021 13-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Testing an API in the Developer Portal (4 of 6)


• The Developer Portal automatically inserts the client ID from the application you created earlier

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-31. Testing an API in the Developer Portal (4 of 6)

The Developer Portal automatically inserts the client ID that gets generated when the application
was created.

© Copyright IBM Corp. 2020, 2021 13-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Testing an API in the Developer Portal (5 of 6)


• Click Generate. Enter the required parameters, then click Send.

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-32. Testing an API in the Developer Portal (5 of 6)

Click Generate to generate a request based on the pet schema defined in the API specification.
Complete the required parameters for the operation, then click Send.

© Copyright IBM Corp. 2020, 2021 13-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Testing an API in the Developer Portal (6 of 6)


• Review the request and response.

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-33. Testing an API in the Developer Portal (6 of 6)

Examples of the request and response messages are shown on the page.

© Copyright IBM Corp. 2020, 2021 13-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Unit summary • Explain the role of application developers in calling published APIs
• Describe the Developer Portal self-registration process for
development catalogs
• Explain how to add an application in the Developer Portal
• Describe the role of client ID and client secret for application
identification
• Describe how to subscribe to an API plan
• Describe the subscription approval process
• Explain the test client features in the Developer Portal

© Copyright IBM Corporation 2020, 2021

Figure 13-34. Unit summary

© Copyright IBM Corp. 2020, 2021 13-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Review questions
1. True or False: Self-registration can be disabled for the Developer Portal of a development
(sandbox) catalog

2. Which one of the following options is required to enforce subscription approvals on the
Developer Portal?
a. Lifecycle approvals must be enabled
b. Self-service onboarding must be enabled
c. Approvals for product lifecycle state changes must be enabled
d. Approvals must be enabled for the plan to which the application subscribes

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-35. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 13-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Review answers
1. True or False: Self-registration can be disabled for the Developer Portal of a development
(sandbox) catalog.
The answer is True.

2. Which one of the following options is required to enforce subscription approvals on the
Developer Portal?
a. Lifecycle approvals must be enabled
b. Self-service onboarding must be enabled
c. Approvals for product lifecycle state changes must be enabled
d. Approvals must be enabled for the plan to which the application subscribes.
The answer is D.

Subscribing and testing APIs in the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 13-36. Review answers

© Copyright IBM Corp. 2020, 2021 13-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Exercise: Subscribing and testing APIs in the Developer Portal

Figure 13-37. Exercise: Subscribing and testing APIs

In this exercise, you learn about the application developer experience in the Developer Portal. You
review the consumer organization that is created for you. You sign on to the Developer Portal as
the owner of the consumer organization. You review the published products and APIs. You
register an application that uses the product and APIs. You review the client ID and client secret
values, subscribe to an API plan, and test operations from an API product. Finally, you test all the
APIs from a web-based consumer application

© Copyright IBM Corp. 2020, 2021 13-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 13. Subscribing and testing APIs in the Developer Portal

Uempty

Exercise • Review the consumer organizations of the sandbox catalog in API


Manager
objectives
• Review the portal settings for the Staging catalog
• Sign on to the staging catalog Developer Portal as the owner of the
consumer organization
• Register an application in the Developer Portal
• Review the client ID and client secret values
• Test API operations in the Developer Portal

© Copyright IBM Corporation 2020, 2021

Figure 13-38. Exercise objectives

© Copyright IBM Corp. 2020, 2021 13-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Unit 14.API Analytics


Estimated time
01:00

Overview
This unit describes the API analytics features in IBM API Connect. API analytics is built on the
Kibana open source analytics and visualization platform. You review some default dashboards
and visualizations that are provided with the API Connect analytics service

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 14-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Unit objectives • Describe what is API Connect analytics


• Describe the role of the Kibana open source platform in the API
Connect API analytics feature
• Describe where analytics are configured and captured
• Identify which user interfaces in API Connect provide access to
analytical data
• Role defaults required to view analytics in the Developer Portal
• Describe the purpose of default dashboards
• Review the features of default visualizations
• Create a visualization
• Describe API events and event records
• Describe how to export analytics and API event data

© Copyright IBM Corporation 2020, 2021

Figure 14-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 14-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Topics • API Analytics overview


• Where to view API analytics
• Dashboards and visualizations
• Creating visualizations
• Exporting data from visualizations

API Analytics © Copyright IBM Corporation 2020, 2021

Figure 14-2. Topics

© Copyright IBM Corp. 2020, 2021 14-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
14.1.API analytics overview

© Copyright IBM Corp. 2020, 2021 14-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

APII analyticss
overview

Figure 14-3. API analytics overview

© Copyright IBM Corp. 2020, 2021 14-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

API analytics
• API Connect provides the capability to filter, sort, and aggregate your API event data
ƒ The data is then presented within correlated charts, tables, and maps
ƒ Help you manage service levels, set quotas, establish controls, and analyze trends
• The data for analytics is collated from API events that are logged when API operations are
called on the gateway
• The analytics server provides analytic functions that collect and store information about APIs
and applications

API Analytics © Copyright IBM Corporation 2020

Figure 14-4. API analytics

• API Connect provides the capability to filter, sort, and aggregate your API event data. This
data is then presented within correlated charts, tables, and maps to help you manage service
levels, set quotas, establish controls, and analyze trends.
• The data for analytics is collated from API events that are logged when API operations are
called on the gateway.
• The analytics service provides analytic functions that collect and store information about APIs
and applications.
• The analytics service, gateway service, and portal service are configured in Cloud Manager.
The analytics service is also associated with a gateway service in the Cloud Manager user
interface.
• You can disable all analytics collection by unassociating the analytics service from the
gateway.

© Copyright IBM Corp. 2020, 2021 14-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Open-source analytics and visualization platform


• API analytics is built on the Kibana open source analytics and visualization platform, which is
designed to work with the Elasticsearch real-time distributed search and Analytics Engine

User interface Kibana

Store, index, and analyze Elasticsearch

API Analytics © Copyright IBM Corporation 2020

Figure 14-5. Open-source analytics and visualization platform

• API analytics in API Connect is built on the Kibana open source analytics and visualization
platform, which is designed to work with the Elasticsearch real-time distributed search and
Analytics Engine.
• The Elasticsearch engine performs logging, indexing, and analysis of log and metric data.
• Data is retrieved from indexed data for all API events
• The Analytics Service is deployed separately from API Manager. The Analytics Service is built
on-top of Elastic Stack and performs the following tasks:
▪ Storing API event logs as they are processed from the Gateway Service
▪ Processing API event logs from the gateway
▪ Providing visualizations of the aggregated metric data from the API events so that API
providers can better understand their APIs’ health and consumption
▪ Surfacing the API calls’ raw log data to help developers debug
▪ Unloading API event records to target locations, for example, Splunk, Syslog, Kafka, and
HTTP

© Copyright IBM Corp. 2020, 2021 14-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Catalogs, Spaces, and Analytics


• The data for Analytics is collated from API events that are logged when API operations are
invoked.
• Analytics data for an API is scoped to the catalog or Space where that API resides and is only
included in search results (and thus, visualizations and dashboards) for the owning catalog or
Space. For example, you cannot create a single dashboard that includes data from multiple
catalogs.
• Access to the analytics data, and to the analytics functions in the API Manager user interface,
can be managed by using catalogs and Spaces, and the roles and permissions that are
assigned to the users (or members) of the provider organization.

API Analytics © Copyright IBM Corporation 2020, 2021

Figure 14-6. Catalogs, Spaces, and Analytics

• Catalogs act as deployment targets through which APIs (in their containing plans and
Products) are staged and published to consumer organizations.
• The IBM API Connect syndication feature provides a way for you to partition a catalog into
multiple deployment targets (or Spaces) through which separate groupings of APIs (in their
containing Plans and Products) can be staged and published. Each Space can be allocated to a
separate group of users who need to manage their Products independently, and the analytics
data in each Space is scoped to those Products only. For information about enabling Spaces in
a catalog, see IBM Documentation.

© Copyright IBM Corp. 2020, 2021 14-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
14.2.Where to view API analytics

© Copyright IBM Corp. 2020, 2021 14-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Wheree to
o view
w APII
analytics

Figure 14-7. Where to view API analytics

© Copyright IBM Corp. 2020, 2021 14-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Where analytics are accessed in API Connect


• Analytics data and the analytics visualization features are accessed in these user interfaces:
ƒ API Manager for provider organizations
ƒ Developer Portal for consumer organizations

• Access is controlled
through the roles and
permissions that are
assigned to the
members of the
provider or consumer
organizations

API Analytics © Copyright IBM Corporation 2020

Figure 14-8. Where analytics are accessed in API Connect

• Access to the analytics data, and to the analytics functions, can be managed by using catalogs
in the API Manager user interface.
• You can view predefined or customized analytics information for your API Connect catalogs
within dashboards.
• API Manager users in the provider organization can be assigned the following access to the
Analytics component for a catalog:
▪ A role that has the Analytics > View permission for a catalog: These users can view the
analytics data that is generated that is for the APIs in the catalog within dashboards,
export dashboard data in its raw format or as event records and apply filters to the data
shown within the dashboards.
▪ A role that has the Analytics > Manage permission for a catalog: These users have an
implicit View permission. Additionally, they can complete the following actions:
- Create, edit, and delete dashboards.
- Create, edit, delete, export, and import the charts, tables, and maps.

© Copyright IBM Corp. 2020, 2021 14-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Analytics in the Developer Portal (1 of 2)


• From the Apps menu
ƒ Dashboard
tab displays
graphs and
metrics for
the
application

Mouse-over provides
additional details

API Analytics © Copyright IBM Corporation 2020

Figure 14-9. Analytics in the Developer Portal (1 of 2)

You can view analytics for APIs in the Developer Portal at the application and organization levels.
The information is displayed in dashboard views that show the analytics metrics in the form of
visualizations, represented as charts.

Information

The analytics service uses the Client ID (apiKey) to map the application to the APIs that are called
on the gateway. No analytical data is available in the Developer Portal for applications that use
APIs where no security is configured.

© Copyright IBM Corp. 2020, 2021 14-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Analytics in the Developer Portal (2 of 2)


• From the My organization drop-
down menu of an organization owner
ƒ Analytics tab displays graphs and
metrics for the application

API Analytics © Copyright IBM Corporation 2020

Figure 14-10. Analytics in the Developer Portal (2 of 2)

From the Developer Portal, you can view interactive analytic information for all the APIs within an
organization.

© Copyright IBM Corp. 2020, 2021 14-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Analytics in API Manager


• Open the catalog
• Select Analytics from the navigation menu
ƒ Then, you can view predefined or customized analytics information for your IBM API Connect catalogs
within dashboards

API Analytics © Copyright IBM Corporation 2020

Figure 14-11. Analytics in API Manager

• You can view predefined or customized analytics information for your IBM API Connect
catalogs within dashboards.
• If spaces are enabled in your catalogs, you can also view predefined or customized analytics
information for your API Connect spaces within dashboards.

© Copyright IBM Corp. 2020, 2021 14-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
14.3.Dashboards and visualizations

© Copyright IBM Corp. 2020, 2021 14-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Dashboardss andd
visualizations

Figure 14-12. Dashboards and visualizations

© Copyright IBM Corp. 2020, 2021 14-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Analytics dashboard for catalogs


• Each catalog provides pre-configured dashboards
ƒ Dashboard is a grouping of views for you to use
ƒ Displays analytical information in the form of visualizations

API Analytics © Copyright IBM Corporation 2020

Figure 14-13. Analytics dashboard for catalogs

• API Connect analytics provides some preconfigured dashboards to view common analytics
data.
• A list of dashboards is displayed when you open the default dashboards page for the first time.
These dashboards provide examples of the data that you can view when using the analytics
dashboards. You can use these dashboards as they are or clone them to customize them to
your needs.
• Descriptions of the default dashboards:
▪ API Default Includes general information about your APIs.
▪ Catalog Default Includes general information about the most used Products in your
catalog. An example of this dashboard is presented on the next slide.
▪ Monitoring Latency Provides information about the amount of time that elapses after the
API request is submitted and the transfer of data begins.
▪ Monitoring Status Provides information about monitoring the status of your API. An
example of this dashboard is presented later in this presentation.
▪ Portal Default Provides information about the API requests to APIs in the Developer
Portal.
▪ Product Default Provides information about the Products.

© Copyright IBM Corp. 2020, 2021 14-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Example dashboard: Catalog default


• Information about the most used Products and APIs in your catalog

Mouse-over provides
additional details

API Analytics © Copyright IBM Corporation 2020

Figure 14-14. Example dashboard: Catalog default

• The catalog default dashboard includes these visualizations:


▪ Top 5 Products overall (daily usage)
▪ Top 5 APIs overall (daily usage).
• When you perform a mouse-over on the graph details are presented, as displayed in the
screen capture.
• Catalog Default Includes general information about the most used Products in your catalog.
This is the equivalent dashboard for catalog_default in API Connect Version 5.

© Copyright IBM Corp. 2020, 2021 14-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Example dashboard: Monitoring status


This dashboard includes the following
visualizations:
• Success Rate: Displays how many of your
API calls were successful, compared to
how many were submitted.
• Status Codes (simple): Provides
overview status codes for the API calls.
• API calls: Provides a list of the API calls.
• Errors: Displays the number of errors in a
bar graph.
• Successes: Lists the successful API calls

API Analytics © Copyright IBM Corporation 2020, 2021

Figure 14-15. Example dashboard: Monitoring status

• Dashboards are aggregations of visualizations.


• Visualizations are described next.

© Copyright IBM Corp. 2020, 2021 14-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Visualizations
• Preconfigured visualizations provide some common ways to view analytics data

API Analytics © Copyright IBM Corporation 2020

Figure 14-16. Visualizations

• Visualizations apply a series of search criteria to the indexed data and then graphically present
the results in a convenient format for analysis or review.
• A list of visualizations is displayed when you open the visualization application page for the
first time, or when you select Visualize in the application selector on the Analytics page.

© Copyright IBM Corp. 2020, 2021 14-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Example visualization: API calls per day


• Displays the list of API calls made per day

API Analytics © Copyright IBM Corporation 2020

Figure 14-17. Example visualization: API calls per day

API calls per day is one of the default visualizations that is provided with API Connect analytics.

© Copyright IBM Corp. 2020, 2021 14-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Visualization filters
• Filter by time period

API Analytics © Copyright IBM Corporation 2020

Figure 14-18. Visualization filters

To apply a time filter and auto-refresh rate, complete the following steps:
1. From the dashboard, click the Time Picker icon.
2. From the Time Picker, use one of these options to set a time filter:
▪ Quick Select this option to choose a predefined value such as Today, Yesterday, This
week, or Last n minutes.
▪ Relative Select this option to specify a start time that is relative to now; for example, 20
seconds, minutes, hours, days, weeks, or months ago, optionally rounded to the specified
unit of time. The date and time that corresponds to your relative selection is displayed
before the fields. Click Go.
▪ Absolute Select this option to specify a precise time range. Either use the calendars to
select a From and To date, or enter the values directly into the fields by using the date and
time format that is specified underneath the fields. Click Go.
3. Additionally, if you want to specify a frequency at which the data should automatically be
refreshed in your visualizations, click Auto-refresh and then select a predefined refresh
interval.
4. If you set an auto-refresh interval as described in the previous step, click the auto-refresh
value, which is displayed next to the Time Picker icon, to confirm your settings and close the
time selection panels. If you did not set an auto-refresh interval, close the Time Picker panel
by clicking within the box where the Time Picker icon is located. The search query is
resubmitted as you make your selections and the visualizations in the dashboard are
automatically refreshed to show the matching data. The specified quick, relative, or absolute
filter setting is shown with the Time Picker icon. If set, the auto-refresh interval is shown with

© Copyright IBM Corp. 2020, 2021 14-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
the Time Picker icon, together with a Pause icon that can be used to pause auto-refresh if
required.

© Copyright IBM Corp. 2020, 2021 14-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Example visualization: Top 5 APIs overall (daily usage)


• Horizontal chart of top 5 API calls made filtered by time period

API Analytics © Copyright IBM Corporation 2020

Figure 14-19. Example visualization: Top 5 APIs overall (daily usage)

The visualization of the top 5 APIs overall by daily usage displays a graph of the 5 APIs that get the
most calls daily.

© Copyright IBM Corp. 2020, 2021 14-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Example visualization: Status codes (detailed)


• Pie chart of status codes for API calls made filtered by time period
• Hover over different areas of the chart to display detailed values

API Analytics © Copyright IBM Corporation 2020

Figure 14-20. Example visualization: Status codes (detailed)

• Status codes (detailed) lists the status codes for the API calls.
• You can hover over the different areas of the pie chart to display the metrics for the different
status codes.
• The legend can be toggled to be displayed or hidden.
• By clicking on a status code, you can set the color that represents it in the pie chart.
• When the selector switch in the lower left corner on the pie chart is clicked, the table with the
different status codes and their count is displayed.

Hint

The selector switch can be difficult to find. You can use the Ctrl+ and Ctrl-key combinations to
increase or decrease the text size to make it more visible.

© Copyright IBM Corp. 2020, 2021 14-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Example visualization: Status codes (detailed)


• Table with the different status codes
• Toggle at the lower left returns you to the pie chart

• Select the drop-down


to get more details on
the Request, Response,
and statistics related to
the Elasticsearch.

API Analytics © Copyright IBM Corporation 2020

Figure 14-21. Example visualization: Status codes (detailed)

When the selector switch on the pie chart is clicked, the table with the different status codes and
their count is displayed. Clicking the selector switch from the table returns you to the pie chart.

© Copyright IBM Corp. 2020, 2021 14-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
14.4.Creating visualizations

© Copyright IBM Corp. 2020, 2021 14-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Creatingg
visualizations

Figure 14-22. Creating visualizations

To create visualizations, you must either be the owner of the API provider organization or be
assigned a role that has the Analytics > Manage permission for the selected catalog or Space.

© Copyright IBM Corp. 2020, 2021 14-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Create visualizations (1 of 7)
• You can create visualizations from the default visualizations
ƒ Click Create new visualization from the Visualize page

API Analytics © Copyright IBM Corporation 2020

Figure 14-23. Create visualizations (1 of 7)

Create your own analytical graphs from the API Manager Analytics Visualize tab by clicking the
Create new Visualization icon.

© Copyright IBM Corp. 2020, 2021 14-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Create visualizations (2 of 7)
• Select from one of the available visualization types

API Analytics © Copyright IBM Corporation 2020

Figure 14-24. Create visualizations (2 of 7)

Select from one of the available visualization types such as Data Table.

Information

Creating your own visualization from a visualization type such as Area chart or Line chart requires
some knowledge of the underlying data indexes and the type of metrics and bucket types that you
want to display on the X- and Y- axis.

© Copyright IBM Corp. 2020, 2021 14-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Create visualizations (3 of 7)
• Select the index for the search
ƒ The default API Connect search index is used in the example

API Analytics © Copyright IBM Corporation 2020

Figure 14-25. Create visualizations (3 of 7)

Choose the index that is used by the search. In the example, the default API Connect index is
used.

© Copyright IBM Corp. 2020, 2021 14-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Create visualizations (4 of 7)
• Configure Data and Options

API Analytics © Copyright IBM Corporation 2020

Figure 14-26. Create visualizations (4 of 7)

• Configure any changes that you want to make to the Data and Options for the visualization.
• Then, click Save.

© Copyright IBM Corp. 2020, 2021 14-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Create visualizations (5 of 7)
• Give the visualization a title
• Then, save the configured visualization

API Analytics © Copyright IBM Corporation 2020

Figure 14-27. Create visualizations (5 of 7)

Give the visualization a title and save the new visualization.

© Copyright IBM Corp. 2020, 2021 14-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Create visualizations (6 of 7)
• The new visualization is displayed in the visualizations list
• Select the newly
created visualization
in the Visualization
Filter

API Analytics © Copyright IBM Corporation 2020

Figure 14-28. Create visualizations (6 of 7)

• Select the newly created visualization from the visualizations list.


• Notice the tag that displays the scope of the visualization.

© Copyright IBM Corp. 2020, 2021 14-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Create visualizations (7 of 7)
• The new visualization is displayed on the page

API Analytics © Copyright IBM Corporation 2020

Figure 14-29. Create visualizations (7 of 7)

The visualization is displayed on the page.

© Copyright IBM Corp. 2020, 2021 14-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
14.5.API events and records

© Copyright IBM Corp. 2020, 2021 14-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

APII eventss and


d
records

Figure 14-30. API events and records

© Copyright IBM Corp. 2020, 2021 14-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

API events and records (1 of 2)


• An API event is logged each time an API operation is called
• An event record is generated for each API event in the gateway server
ƒ Contains information about the API call
• When an analytics service is associated with a gateway, events are captured
• The captured event data can be viewed in the API Manager or offloaded to third-party systems

API Analytics © Copyright IBM Corporation 2020

Figure 14-31. API events and records (1 of 2)

• An API event is logged each time an API operation is invoked, and an event record is
generated for each API event in the gateway server.
• The API event record contains information about the API call and the content of the record
depends on the logging policy that is set for the operation.
• The API event records are stored by the Analytics component of API Connect.

© Copyright IBM Corp. 2020, 2021 14-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

API events and records (2 of 2)


• You can use the activity-log policy to configure your logging preferences for the API event
details that are stored in the Analytics component.
• By default, invocation details are logged if an API call is successful, and invocation, header,
and payload (message body) details are logged if an API call results in an error code.
• To override these default settings and change the level
of detail that is included in the API event record, you can
add the activity-log policy to your API assembly and then
configure the policy's properties.

API Analytics © Copyright IBM Corporation 2020, 2021

Figure 14-32. API events and records (2 of 2)

• You can use the activity-log policy to configure your logging preferences for the API event
details that are stored in the Analytics component. By default, invocation details are logged if
an API call is successful, and invocation, header, and payload (message body) details are
logged if an API call results in an error code. To override these default settings and change the
level of detail that is included in the API event record, you can add the activity-log policy to
your API assembly and then configure the policy's properties. For example:
▪ To include details about the request body or response body in the API event record for a
successful API call, you can add an activity-log policy to the associated API operation and
set the content type to payload.
Restriction: The payload logging feature is disabled for IBM Cloud instances that are
hosted in the Frankfurt region. The requirements for storing Sensitive Personal
Information (SPI) are more restrictive in that region, so the payload information cannot be
saved.
▪ To include details about the HTTP request headers or HTTP response headers in the API
event record for a successful API call, you can add an activity-log policy to the associated
API operation and set the content type to either header or payload.
▪ To include client_geoip and gateway_geoip fields in the data, ask your Kubernetes
administrator to configure the Kubernetes ingresses/cluster to include the
X-Forwarded-For header in the data that is collected by the DataPower Gateway and
passed to APIC Analytics.
• When setting the mode for the logging, specify one of the following values:
▪ Gather-only: gather all analytics data and write it to the log context variable, which
populates the API event record on completion of the API execution.

© Copyright IBM Corp. 2020, 2021 14-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
▪ Send-only: perform the following actions:
- Read the data from the log context variable.
- Truncate all message payloads and convert to a textual representation.
- Send the data to the analytics server.
▪ Gather-and-send; perform a gather-only operation, immediately followed by a send-only
operation.
If you use the Send-only or Gather-and-send option, data is buffered and sent to the
analytics server in batches according to the time interval configured for the Analytics Endpoint
on the DataPower API Gateway.

© Copyright IBM Corp. 2020, 2021 14-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
14.6.Exporting data from visualizations

© Copyright IBM Corp. 2020, 2021 14-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Exportingg data
a from
m
visualizations

Figure 14-33. Exporting data from visualizations

© Copyright IBM Corp. 2020, 2021 14-42


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Export data from visualizations (1 of 3)


• Export visualization event data
ƒ Select the visualization
ƒ Then, click Export

API Analytics © Copyright IBM Corporation 2020

Figure 14-34. Export data from visualizations (1 of 3)

You can export visualizations so they can be imported by other IBM API Connect users, or into
other catalogs on your system.

© Copyright IBM Corp. 2020, 2021 14-43


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Export data from visualizations (2 of 3)


• Choose to save the file, which is named export.json by default, or open it with an
application that is configured for your browser

API Analytics © Copyright IBM Corporation 2020

Figure 14-35. Export data from visualizations (2 of 3)

Choose to save the file, which is named export.json by default, or open it with an application that
is configured for your browser.

© Copyright IBM Corp. 2020, 2021 14-44


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Export data from visualizations (3 of 3)


• The exported JSON
file is displayed in
the editor

API Analytics © Copyright IBM Corporation 2020

Figure 14-36. Export data from visualizations (3 of 3)

The example shows the JSON file for API calls opened in the editor.

© Copyright IBM Corp. 2020, 2021 14-45


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Offloading analytics data


You can download analytics data for API events to a third-party system for storage and analysis.
API Connect supports the offload of API analytics data to the following third-party systems:
• HTTP
• Elasticsearch
• Apache Kafka
• Syslog
You typically configure the output plugins for data downloading while deploying the Analytics
subsystem.

API Analytics © Copyright IBM Corporation 2020, 2021

Figure 14-37. Offloading analytics data

• The event data that is generated and collected in your API Connect on-premises deployment
can optionally be forwarded to external third-party systems for storage and analysis.
• API Connect supports the offload of API analytics data to the following third-party systems:
HTTP, Elasticsearch, Apache Kafka, and Syslog. You can configure a custom certificate for
connecting to the third-party target, enable a message queue to ensure that no data is lost
during outages, and define filters to refine data that will be stored.
• You typically configure data offloading while deploying the Analytics subsystem.

© Copyright IBM Corp. 2020, 2021 14-46


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Unit summary • Describe what is API Connect analytics


• Describe the role of the Kibana open source platform in the API
Connect API analytics feature
• Describe where analytics are configured and captured
• Identify which user interfaces in API Connect provide access to
analytical data
• Role defaults required to view analytics in the Developer Portal
• Describe the purpose of default dashboards
• Review the features of default visualizations
• Create a visualization
• Describe API events and event records
• Describe how to export analytics and API event data

© Copyright IBM Corporation 2020, 2021

Figure 14-38. Unit summary

© Copyright IBM Corp. 2020, 2021 14-47


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Review questions
1. True or False: The Portal service captures API events.

2. True or False: All visualizations that you create are added to a list of saved visualizations and
can be used in any dashboard.

API Analytics © Copyright IBM Corporation 2020, 2021

Figure 14-39. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 14-48


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Review answers
1. True or False: The Portal service captures API events.
The answer is False.
The Gateway service captures API events.

2. True or False: All visualizations that you create are added to a list of saved visualizations and
can be used in any dashboard.
The answer is True.

API Analytics © Copyright IBM Corporation 2020, 2021

Figure 14-40. Review answers

© Copyright IBM Corp. 2020, 2021 14-49


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty
Exercise: Calling an API on the gateway and monitoring API
usage

Figure 14-41. Exercise: Calling an API on the gateway and monitoring API usage

In this exercise, you test the operations for the APIs in the petstore product. To do this, you use
the test feature in the Developer Portal. You run a script to generate API calls and review the API
analytics capabilities for both the consumer and provider organizations.

© Copyright IBM Corp. 2020, 2021 14-50


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 14. API Analytics

Uempty

Exercise • Run the test feature in the Developer Portal


objectives • Identify the API endpoints in the gateway
• Run a script to generate multiple calls to the API gateway
• View the analytics dashboard for the catalog
• Change the time period filter for a visualization
• View API event data
• Export API event data

© Copyright IBM Corporation 2020, 2021

Figure 14-42. Exercise objectives

© Copyright IBM Corp. 2020, 2021 14-51


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Unit 15.Customizing the Developer


Portal
Estimated time
01:00

Overview
As the administrator, you can change the appearance and layout of the Developer Portal. This unit
describes the customization options that are available to you. You learn how to customize the
Developer Portal through the administration menu and examine the options for using themes and
sub-themes on the Developer Portal.

How you will check your progress


• Review questions
• Lab exercise

© Copyright IBM Corp. 2020, 2021 15-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Unit objectives • Briefly explain the purpose of the Developer Portal


• Explain the role of the Drupal open source project in the Developer
Portal
• Explain the concept of modules and themes
• List the roles that are defined in the Developer Portal
• Describe the Drupal terminology that is used when administering
the portal
• Describe the various ways to create a theme for the Developer
Portal
• Describe the use of subthemes for customizing the standard API
Connect Developer Portal theme

© Copyright IBM Corporation 2020, 2021

Figure 15-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 15-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Topics • Developer portal overview


• Developer portal members and roles
• Introduction to Drupal
• Creating a custom theme

Customizing the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 15-2. Topics

© Copyright IBM Corp. 2020, 2021 15-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty
15.1.Developer portal overview

© Copyright IBM Corp. 2020, 2021 15-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Developerr portall
overview

Figure 15-3. Developer portal overview

© Copyright IBM Corp. 2020, 2021 15-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Developer Portal terminology


• Regions
ƒ Specific areas of a Developer Portal site in which content can be placed
• Blocks
ƒ Boxes of content that are displayed in regions on the Developer Portal page
ƒ Blocks can be made available to your Developer Portal site by enabling specific modules
ƒ After a block is created, its appearance, size, and position can be modified
• Fields
ƒ Data types that can be added to an element
ƒ For example, Title, Body, Tags, Image
• Nodes
ƒ Each piece of content in a Developer Portal site is a node
ƒ For example, an article, blog entry, forum topic, or page
• Panels
ƒ A drag-and-drop Content Manager that you can use to visually design a layout
Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-4. Developer Portal terminology

It is recommended that you understand the various Drupal concepts and terminology that is
referenced throughout the Developer Portal.

© Copyright IBM Corp. 2020, 2021 15-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Components of API Connect

Gateway API Manager Developer Portal Analytics

API Connect uses IBM API manager is an Share your APIs with API analytics is built
DataPower Gateway intuitive user interface application on the Kibana V5.5.1
to provide the that lets you manage developers through a open source analytics
gateway service. IBM APIs for internal use, company-branded and visualization
API Connect provides or to externally portal. Developers can platform, which is
two gateway types, monetize and manage discover and designed to work with
DataPower API services as REST or subscribe to APIs as the Elasticsearch real-
Gateway and SOAP APIs. well as register and time distributed
DataPower Gateway deploy associated search and Analytics
(v5 compatible). applications. Engine.

Customizing the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 15-5. Components of API Connect

• This page shows the components and capabilities of the IBM API Connect solution.
• The Developer Portal enables API providers to build a customized developer portal for their
application developers.

© Copyright IBM Corp. 2020, 2021 15-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Features of the Developer Portal


• Self-service account creation
(if enabled)
ƒ User can create an account on the
Developer Portal

• Manage consumer organizations


(owners)
ƒ Add users and view analytics
ƒ Create consumer organizations

• Authenticated users
ƒ Create applications
ƒ Manage subscriptions

• Portal administrators
ƒ Import custom themes
ƒ Customize layout and menus
ƒ Set permissions
Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-6. Features of the Developer Portal

• Owners of a consumer organization can manage their communities and view analytics from
the Developer Portal.
• Authenticated Portal users who are granted permission, can create applications and, manage
subscriptions.
• Portal administrators can customize the Developer Portal.

© Copyright IBM Corp. 2020, 2021 15-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Developer Portal
• The Developer Portal provides application developers and consumer organization owners with
a set of tools to find, subscribe, and test APIs in the API Connect cloud

• Self-service,
customizable developer
portal for API users,
application registration,
and subscription
• API discovery and
socialization

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-7. Developer Portal

• The API Connect Developer Portal provides a complete content management, and
customizable developer portal for your APIs.
• The Developer portal provides application developers and consumer organization owners with
a set of tools to find, subscribe, and test APIs that are built in the API Connect cloud.

© Copyright IBM Corp. 2020, 2021 15-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Developer Portal: Public interface


• Any Products that are published with a visibility option of "Public" are displayed.
• Products that are
published with
visibility options
other than "Public"
are not visible on
the portal for
unauthenticated
users.

You can see products


that are published with
“Visibility to public” in
API Manager

Customizing the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 15-8. Developer Portal: Public interface

• Any Products that are published with a visibility option of "Public" are displayed if the user
click the API Products tab of the Developer Portal. The user does not need to sign on to the
Developer Portal to view these Products and APIs.
• Products that are published with visibility options other than "Public" are not visible on the
portal for unauthenticated users.
• You can have visibility set to “Public” and Subscribability set to “Authenticated”. In this case,
the Products are visible on the public interface of the Developer Portal, but only authenticated
users can subscribe to use the Product and APIs.

© Copyright IBM Corp. 2020, 2021 15-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Developer Portal: Administration menu


• Menu is displayed when the admin user signs on to the Developer Portal
ƒ Responsive multi-level menu for administering the Portal

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-9. Developer Portal: Administration menu

• The administration menu is displayed when the admin user logs in to the Developer Portal.
• The menu is displayed either as a drop-down enabled responsive menu or the menu is
displayed horizontally along the top of the Developer Portal on an expanded page.
• Responsive web pages are mobile-friendly, and they change according to the page size.

© Copyright IBM Corp. 2020, 2021 15-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty
15.2.Developer portal members and roles

© Copyright IBM Corp. 2020, 2021 15-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Developerr portall
memberss and d roles

Figure 15-10. Developer portal members and roles

© Copyright IBM Corp. 2020, 2021 15-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

List all members displayed in the Developer Portal

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-11. List all members displayed in the Developer Portal

• You can get a list of members that are defined on the Developer Portal by selecting the People
option from the administration Manage menu.
• By default, members are defined with a role of authenticated user.
• You can define additional roles for a user on the Developer Portal by selecting the member,
then selecting a role from the Action options submenu.

Information

From the standpoint of the default roles for the consumer organization, members are classified as
administrators, owners, developers, or viewers in the settings for the catalog. The roles defined by
the portal administrator are Drupal roles for managing the content that is provided in the
Developer Portal.

© Copyright IBM Corp. 2020, 2021 15-14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Portal roles
• By using roles, you can fine-tune the security and administration of Drupal
ƒ A role defines a group of users that have certain privileges as defined on the permissions page
• Anonymous user: Role that is used for users that do not have a user account or that are not
authenticated
• Authenticated user: This role is automatically granted to all logged in users
• Content author: Role that is used to edit or add content
• Forum moderator:
Role that controls access to the portal
forums
• Administrator:
Manages all other roles
• Superuser:
Access to all content

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-12. Portal roles

• You can use roles to fine-tune the security and administration of Drupal. A role defines a group
of users that have certain privileges as defined on the permissions page. Examples of roles
include: anonymous user, authenticated user, moderator, administrator, and other roles. The
administrator can define the names and order of the roles on your site. It is recommended to
order your roles from least permissive (anonymous user) to most permissive (superuser).
• The superuser role is assigned by default to the admin user when a Developer Portal site is
enabled in the API Manager.
• By default, Drupal comes with two user roles:
▪ Anonymous user: This role is used for users that do not have a user account or that are not
authenticated.
▪ Authenticated user: This role is automatically granted to all logged in users.

© Copyright IBM Corp. 2020, 2021 15-15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Developer Portal: Authenticated user


• Can see products that
are published with
“Authenticated user” in
API Manager
• Can also see products
that are published with
“Public” in API Manager

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-13. Developer Portal: Authenticated user

• An authenticated user can see products that are published with “Authenticated user” in API
Manager.
• In the example, the user is signed on to the Developer Portal and two products are displayed
with the API Products tab selected.

© Copyright IBM Corp. 2020, 2021 15-16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty
15.3.Introduction to Drupal

© Copyright IBM Corp. 2020, 2021 15-17


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Introduction
n to
o
Drupal

Figure 15-14. Introduction to Drupal

© Copyright IBM Corp. 2020, 2021 15-18


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Powered by Drupal
• Drupal is a free, open source web content management tool for content, community, and
commerce
ƒ LAMP (Linux, Apache, MySQL, and PHP) software
• Customizable platform
• Supports responsive websites to deliver optimal visitor experiences from any device
• Flexible content architecture
ƒ Admin interface
ƒ Display only the content appropriate for each display with Views
ƒ Customizable menus
• Content authoring
ƒ Authentication and permissions for editing workflows and content
• The Developer Portal is based on the open source Drupal 8 content management software
ƒ Customizable
Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-15. Powered by Drupal

• Drupal is an open source web content management platform.


• The Drupal platform runs on LAMP, a software stack that consists of the Linux operating
system, Apache web server, MySQL database, and the PHP scripting language.
• The Developer Portal is based on the open source Drupal 8 content management software,
and consequently is almost completely customizable.

© Copyright IBM Corp. 2020, 2021 15-19


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Drupal modules
• A module (usually PHP and CSS) is a software component that makes up or extends Drupal
features and function
• “Core”
ƒ Files and modules that are included with a Drupal version or download
• “Contributed”
ƒ Modules or themes that are not part of the Core Drupal product
ƒ Available for separate download from the modules or themes of Drupal.org download site
• You can extend your Developer Portal site by installing custom modules that you created, and
also installing contributed modules from the Drupal 8 community
ƒ You must have administrator access to complete this task

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-16. Drupal modules

You can extend your Developer Portal site by installing custom modules that you created and
installing contributed modules from the Drupal 8 community. You must have administrator access
to complete this task.

© Copyright IBM Corp. 2020, 2021 15-20


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Disable modules
• You can disable an entire module in the Developer Portal to improve performance, or remove
functionality
ƒ You must have administrator access to complete this task
• With the Manage option selected on the administration menu, select Extend. Then, select
Disable module
• The list of
modules is
displayed
ƒ Select the
module to be
disabled
ƒ Click Disable

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-17. Disable modules

• You can disable an entire module in the Developer Portal if you want to improve performance
or remove functionality. You must have administrator access to complete this task.
• With the Manage option selected on the administration menu, click Extend. Then, select
Disable module.
• From the list of installed modules, select the module to be disabled. Then, click Disable.

© Copyright IBM Corp. 2020, 2021 15-21


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Status report (1 of 2)
• Reports menu option of the admin menu
• Displays the Drupal version of the Developer Portal
ƒ Important information when importing or creating a custom theme
ƒ Theme should match the Drupal version

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-18. Status report (1 of 2)

The status report gives an overview of the Developer Portal parameters and any problems that are
detected with the installation. It might be useful to paste this information into support requests
that are filed with IBM API Connect or drupal.org support forums.

© Copyright IBM Corp. 2020, 2021 15-22


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Status report (2 of 2)
• There might be Drupal
updates for your
installation.
• Drupal updates cannot
be manually installed
and can only be
addressed through fix
packs or a new
installation.

Customizing the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 15-19. Status report (2 of 2)

© Copyright IBM Corp. 2020, 2021 15-23


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty
15.4.Creating a custom theme

© Copyright IBM Corp. 2020, 2021 15-24


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Creating
g a custom
m
theme

Figure 15-20. Creating a custom theme

© Copyright IBM Corp. 2020, 2021 15-25


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Drupal themes
• A theme is a collection of templates, configuration files, and asset files (JavaScript, CSS,
images, fonts) which together determine the appearance of a site
• Contains elements such as headers, block layouts, and icons

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-21. Drupal themes

• A theme is a collection of templates, configuration files, and asset files (JavaScript, CSS,
images, fonts) which together determine the appearance of a site.
• Adminimal is a popular administration theme for Drupal.

© Copyright IBM Corp. 2020, 2021 15-26


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Subthemes
• Subthemes are just like any other theme, with one difference:
ƒ The subtheme inherits resources from the parent theme
ƒ You can then override specific resources to configure your required customizations
• The Developer Portal comes with a default API Connect theme
ƒ Directly editing the API Connect theme is not permitted or supported, as edited versions of these files
are overwritten when product fixes or upgrades are installed
• Create a custom subtheme of the standard API Connect theme that the Developer Portal uses
by default
ƒ Your custom subtheme CSS file needs to contain only the changes or overrides that you want to make
from the default theme

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-22. Subthemes

• Drupal 8 subthemes are just like any other theme, with one difference: they inherit resources
from the parent theme.
• The Developer Portal comes with a default API Connect theme.
• Directly editing the API Connect theme is not permitted or supported, as edited versions of
these files are overwritten when product fixes or upgrades are installed.
• The way to create a custom theme is to create a custom subtheme of the standard API
Connect theme that the Developer Portal uses by default.
▪ A subtheme inherits the parent theme's resources, and this means that your custom
subtheme CSS file needs to contain only the changes or overrides that you want to make
from the default theme.
▪ The CSS file can contain as little or as many updates as you like.

© Copyright IBM Corp. 2020, 2021 15-27


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

View the enabled themes (1 of 2)


• From the Administration menu, select Appearance > Settings
• The Settings tab displays Global settings and settings for any other enabled themes
ƒ Global settings apply to all themes
• Five themes are enabled in the example
ƒ Bartik: A mobile first theme
ƒ Seven: An administration theme
ƒ Bootstrap: Built to use the Bootstrap framework for web pages
ƒ connect_theme: Default theme for the Developer Portal
ƒ custom_: Customized theme based on the IBM API Connect Theme
• One of the enabled themes is set as the default theme that is used by the Developer Portal

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-23. View the enabled themes (1 of 2)

• From the administration menu, select Appearance, then select Settings.


• The tabs in the settings include the global settings and tabs for currently enabled themes.
• Global settings control the default display settings for your entire site, across all themes.
Unless they have been overridden by a specific theme, these settings are used.

© Copyright IBM Corp. 2020, 2021 15-28


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

View the enabled themes (2 of 2)


• From the Administration menu, select Appearance > Settings
ƒ Click the List tab to see screen captures of the enabled themes
ƒ The Administration menu can have its own theme
• In the example, the Seven theme is used as the administration theme
ƒ Selects the fonts, check boxes, and style for the administration of the Developer Portal

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-24. View the enabled themes (2 of 2)

• Click the List tab from the settings menu to see thumbnail icons of the enabled themes.
• You can select an administration theme in the dialog box by scrolling down when the List tab
of the settings is selected.
• You can choose to use the default scheme to use the same theme as the rest of the site, or you
can use a different theme for the appearance of the content when working with the
administration of the Developer Portal.

© Copyright IBM Corp. 2020, 2021 15-29


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Theme creation
Enable a theme in one of these ways:
• Identify and use a theme that is provided by the Drupal community at
drupal.org/project/project_theme

• Extend the code of an existing theme by creating a subtheme


ƒ Creating a subtheme is the only supported option for changing the theme of the IBM-supplied API
Connect Developer Portal
Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-25. Theme creation

• You can use themes to control the appearance of your Developer Portal site.
• You can install a new theme from the administration Manage menu by selecting the option
Appearance. Then, select Install new theme.
• When you go to the drupal.org website, you can discover themes by using the search filter.
For example, you can search for administration themes on the Drupal site. The Adminimal
theme is one of the administration themes.
• Themes that you import should match the Drupal version.

Note

You can import a different administration theme and replace the Seven administration theme.
Directly editing or replacing the API Connect theme entirely is not permitted or supported, as
edited versions of these files are overwritten when product fixes or upgrades are installed.

© Copyright IBM Corp. 2020, 2021 15-30


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Generate a subtheme
• Generate a subtheme of the
latest Developer Portal theme
from the administration
Manage menu item.
• Select Appearance. Then,
select Generate subtheme
ƒ Give the subtheme a name
ƒ Select the subtheme type: CSS
or SCSS
ƒ Choose one of the IBM-
supplied templates for the
theme

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-26. Generate a subtheme

• Generate a subtheme of the latest Developer Portal theme from the administration Manage
menu item and give it a name. From the administration Manage menu, select Appearance.
Then, select Generate subtheme.
• Provide a name for the subtheme. Select the subtheme style type. The choices are CSS or
SCSS. Select one of the IBM-supplied color templates for the subtheme. Then, click Generate.

© Copyright IBM Corp. 2020, 2021 15-31


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Customize the subtheme


• A compressed file with the subtheme is generated and can be downloaded from the Developer
Portal

Download and expand the compressed subtheme file


• Overwrite any style specifications in the subtheme with the customizations that you require
ƒ A subtheme inherits all the settings of its parent scheme, unless the settings are overridden
ƒ Most changes are made to the overrides.css file in the CSS folder
ƒ Refer to the Drupal documentation for customizing styles
• When customizations are completed, create an archive file for uploading to the Developer
Portal

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-27. Customize the subtheme

• Download the generated subtheme from the Developer Portal and then expand the archive.
• A subtheme inherits all the settings of its parent scheme, unless the settings are overridden.
• Overwrite any style specifications in the subtheme with the customizations that you require.
• Style changes can be made to the overrides.css file in the CSS folder in the expanded archive.
• Refer to the Drupal documentation for creating a subtheme at:
https://www.drupal.org/docs/theming-drupal/creating-sub-themes
• When customizations are completed, create an archive file that is ready for uploading to the
Developer Portal.

© Copyright IBM Corp. 2020, 2021 15-32


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Install the subtheme


• Install the customized
subtheme on the
Developer Portal
theme from the
administration Manage
menu item.
• Select Appearance.
Then, select Install
new theme
ƒ Then, upload the theme
archive to install

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-28. Install the subtheme

• You can install a theme from the Appearance > Install new theme option of the
administration menu.
• In the example, the theme is uploaded from an archive file.

© Copyright IBM Corp. 2020, 2021 15-33


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Enable the theme


• When the new theme is installed, you can enable the theme in the Developer Portal

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-29. Enable the theme

• The page shows that the custom theme is successfully installed.


• The next step is to enable the newly added theme.
• You do this by clicking the Enable newly added themes link in the dialog.

© Copyright IBM Corp. 2020, 2021 15-34


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Set the customized theme as the default


• When the new theme is enabled, you can set the theme as the default theme in the Developer
Portal
ƒ The custom theme is now the theme that is used

Customizing the Developer Portal © Copyright IBM Corporation 2020

Figure 15-30. Set the customized theme as the default

• The newly added them is enabled. You can now set the theme as the default theme in the
Developer Portal.
• When the theme is set as the default, the custom theme becomes the theme that is used by
the Developer Portal.

© Copyright IBM Corp. 2020, 2021 15-35


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Change the site logo


• To change the site logo, complete
the following steps:
ƒ Click Manage
ƒ Click Appearance.
ƒ Click Settings for the default
theme.
ƒ Click Logo image in the Override
Global Settings section.
ƒ Deselect the Use the logo
supplied by the theme check box.
ƒ Browse and upload a logo image
under the Upload logo image
subheading.
ƒ Click Save configuration.

Customizing the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 15-31. Change the site logo

• How the site logo is used depends on the settings for your theme.
• If the changes don't appear immediately in your browser, clear your browser's cache and
reload the page.

© Copyright IBM Corp. 2020, 2021 15-36


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Unit summary • Briefly explain the purpose of the Developer Portal


• Explain the role of the Drupal open source project in the Developer
Portal
• Explain the concept of modules and themes
• List the roles that are defined in the Developer Portal
• Describe the Drupal terminology that is used when administering
the portal
• Describe the various ways to create a theme for the Developer
Portal
• Describe the use of subthemes for customizing the standard API
Connect Developer Portal theme

© Copyright IBM Corporation 2020, 2021

Figure 15-32. Unit summary

© Copyright IBM Corp. 2020, 2021 15-37


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Review questions
1. True or False: Public APIs are displayed on the public interface and on the interface for
authenticated users of the Developer Portal.

2. True or False: Themes that you import should match the Drupal version

Customizing the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 15-33. Review questions

Write your answers here:


1.
2.

© Copyright IBM Corp. 2020, 2021 15-38


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Review answers
1. True or False: Public APIs are displayed on the public interface and on the interface for
authenticated users of the Developer Portal.
The answer is True.

2. True or False: Themes that you import should match the Drupal version.
The answer is True.

Customizing the Developer Portal © Copyright IBM Corporation 2020, 2021

Figure 15-34. Review answers

© Copyright IBM Corp. 2020, 2021 15-39


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Exercise: Customizing the Developer Portal

Figure 15-35. Exercise: Customizing the Developer Portal

This exercise shows you the customization options in the Developer Portal. You sign in to the
Developer Portal with a Portal administrator account, add and configure a Drupal subtheme, and
review some of the standard features of the Developer Portal.

© Copyright IBM Corp. 2020, 2021 15-40


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 15. Customizing the Developer Portal

Uempty

Exercise • Sign in to the Developer Portal as a Portal administrator


objectives • Generate a Developer Portal subtheme
• Review and customize the subtheme
• Install the subtheme on the Developer Portal
• Review the forum features in the Developer Portal

© Copyright IBM Corporation 2020, 2021

Figure 15-36. Exercise objectives

© Copyright IBM Corp. 2020, 2021 15-41


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Unit 16.Course Summary


Estimated time
00:15

Overview
This unit provides a summary of the course, explains how the course objectives were met and
where to obtain further information.

© Copyright IBM Corp. 2020, 2021 16-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Unit objectives • Explain how the course met its learning objectives
• Identify IBM credentials that are related to this course
• Locate resources for further study and skill development

© Copyright IBM Corporation 2020, 2021

Figure 16-1. Unit objectives

© Copyright IBM Corp. 2020, 2021 16-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Course • Configure services in Cloud Manager for an on-premises installation


of API Connect
objectives
• Create a catalog and Developer Portal
• Create consumer and provider organizations
• Create, test, and publish SOAP, REST, and GraphQL APIs
• Create message processing policies that transform API requests
and responses
• Authorize client API requests with security definitions
• Enforce an OAuth flow with an OAuth 2.0 API security provider

© Copyright IBM Corporation 2020, 2021

Figure 16-2. Course objectives

© Copyright IBM Corp. 2020, 2021 16-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Course • Perform advanced testing of APIs by using the Test tab and the
Local Test Environment
objectives
• Define products and plans in API Manager
• Stage, publish, version, migrate, deprecate, and retire products and
APIs
• Manage member roles and permissions in the Developer Portal
• Create an application and subscribe to a plan
• Review API analytics in the Developer Portal
• Review analytics dashboards and visualizations in API Manager
• Customize the Developer Portal

© Copyright IBM Corporation 2020, 2021

Figure 16-3. Course objectives

© Copyright IBM Corp. 2020, 2021 16-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

IBM credentials: Badges and certifications


• Certify your skills with IBM digital credentials
ƒ https://www.ibm.com/training/credentials

Get certified Take an exam Search badges News


Search IBM certification Search exams available for Find IBM badges for skill Catch up on the latest IBM
offerings across a broad the IBM Professional development activities and credential news.
range of technology areas. Certification program. other achievements.

https://ibm.biz/BdqW6Z https://ibm.biz/BdqW6Y https://ibm.biz/BdqW62 https://ibm.biz/BdqW6z

Course summary © Copyright IBM Corporation 2020, 2021

Figure 16-4. IBM credentials: Badges and certifications

© Copyright IBM Corp. 2020, 2021 16-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Learn more about this product


• API Connect documentation
ƒ IBM Documentation for IBM API Connect
ƒ https://www.ibm.com/docs/en/api-connect

• API Connect overview


ƒ IBM Documentation article that provides an
overview of IBM API Connect
ƒ https://www.ibm.com/docs/en/api-
connect/10.0.1.x?topic=api-connect-overview

• API Connect cloud resources


ƒ View benefits, features, and capabilities of API
Connect, download resources, and try it for
free on IBM Cloud
ƒ https://www.ibm.com/cloud/api-connect
Course summary © Copyright IBM Corporation 2020, 2021

Figure 16-5. Learn more about this product

© Copyright IBM Corp. 2020, 2021 16-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Additional resources (1 of 5)
• IBM Integration Community
ƒ Learn about API Connect, App Connect, IBM
MQ, DataPower, Aspera, Event Streams, and
Cloud Pak for Integration
ƒ https://community.ibm.com/community/user/i
ntegration/home

• IBM Automation Community


ƒ Learn about Blockchain, Blueworks Live, BPM,
Workflow, Case, Content Management,
Decision Management, Robotic Process
Automation, Platform, and Cloud Pak for
Automation
ƒ https://community.ibm.com/community/user/
automation/home

© Copyright IBM Corporation 2020, 2021

Figure 16-6. Additional resources (1 of 5)

© Copyright IBM Corp. 2020, 2021 16-7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Additional resources (2 of 5)
• IBM Cloud Education course information
ƒ View and download course materials and
course corrections.
ƒ http://ibm.biz/CourseInfo

• IBM Developer
ƒ IBM's official developer program offers access
to software trials and downloads, how-to
information, and expert practitioners.
ƒ https://developer.ibm.com/

© Copyright IBM Corporation 2020, 2021

Figure 16-7. Additional resources (2 of 5)

© Copyright IBM Corp. 2020, 2021 16-8


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Additional resources (3 of 5)
• IBM Training
ƒ Search the IBM Training website for courses
and education information.
ƒ https://www.ibm.com/training

• Learning Journeys
ƒ Learning Journeys describe a recommended
collection of learning content to acquire skills
for a specific technology or role.
ƒ https://www.ibm.com/training/journeys/#tab-
ibm-cloud

© Copyright IBM Corporation 2020, 2021

Figure 16-8. Additional resources (3 of 5)

© Copyright IBM Corp. 2020, 2021 16-9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Additional resources (4 of 5)
• IBM Redbooks
ƒ IBM Redbooks are developed and published by
the IBM International Technical Support
Organization (ITSO). Redbooks typically provide
positioning and value guidance, installation and
implementation experiences, typical solution
scenarios, and step-by-step "how-to" guidelines.
ƒ http://www.redbooks.ibm.com/

• IBM Documentation
ƒ IBM Documentation (also known as IBM Docs) is
the primary home for IBM product
documentation.
ƒ https://www.ibm.com/docs/en

© Copyright IBM Corporation 2020, 2021

Figure 16-9. Additional resources (4 of 5)

© Copyright IBM Corp. 2020, 2021 16-10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Additional resources (5 of 5)
• IBM Marketplace
ƒ Learn about IBM offerings for Cloud, Cognitive,
Data and Analytics, Mobile, Security, IT
Infrastructure, and Enterprise and Business
Solutions.
ƒ https://www.ibm.com/products

• IBM Training blog, Twitter, and Facebook


ƒ Official IBM Training accounts provide
information about IBM course offerings,
industry information, conference events, and
other education-related topics.
ƒ https://www.ibm.com/blogs/ibm-training
ƒ https://twitter.com/ibm
ƒ https://www.facebook.com/groups/IBMTrainin
gandSkills
© Copyright IBM Corporation 2020, 2021

Figure 16-10. Additional resources (5 of 5)

© Copyright IBM Corp. 2020, 2021 16-11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Unit summary • Explain how the course met its learning objectives
• Identify IBM credentials that are related to this course
• Locate resources for further study and skill development

© Copyright IBM Corporation 2020, 2021

Figure 16-11. Unit summary

© Copyright IBM Corp. 2020, 2021 16-12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0
Unit 16. Course Summary

Uempty

Course completion
You have completed this course:
Create, Secure, and Publish APIs with IBM
API Connect V10

Do you have any questions?

Course summary © Copyright IBM Corporation 2020, 2021

Figure 16-12. Course completion

© Copyright IBM Corp. 2020, 2021 16-13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Individually Licensed to Kapil Jain
V12.0

backpg

© Copyright International Business Machines Corporation 2020, 2021.

Individually Licensed to Kapil Jain

You might also like