The anypoint platform for API's

18
ANYPOINT PLATFORM FOR APIS USER GUIDE By Achyuta Laxmi

Transcript of The anypoint platform for API's

Page 1: The anypoint platform for API's

ANYPOINT PLATFORM FOR

APIS USER GUIDEBy

Achyuta Laxmi

Page 2: The anypoint platform for API's

Overview

Introduction Anypoint Platform for APIs User Guide

Creating Your API in the Anypoint Platform Designing Your API Building Your API Setting Your API URL Proxying Your API Deploying Your API or Proxy Accessing Your API Behind a Firewall Managing Your API Creating an API Notebook Browsing and Accessing APIs Viewing API Analytics Analytics Event API References

Page 3: The anypoint platform for API's

Introduction

The Anypoint Platform for APIs can be used to design, build, manage, and publish your APIs. You can maximize API usage by creating an experience that developers appreciate.

Page 4: The anypoint platform for API's

Anypoint Platform for APIs User Guide

Contents: Creating Your API in the Anypoint Platform Designing Your API Building Your API Setting Your API URL Proxying Your API Deploying Your API or Proxy Accessing Your API Behind a Firewall Managing Your API Creating an API Notebook Browsing and Accessing APIs Viewing API Analytics Analytics Event API Engaging Users of Your API Images and Attachments in API Portal

Page 5: The anypoint platform for API's

Creating Your API in the Anypoint Platform

Before you can design, manage, or publish your APIs in the Anypoint Platform, you have to create them in the platform. You can do this from the API Administration page, which you should have access to if you are a member of the API Creator or Organization Administrator role.

To create a new API in the platform, click Add New API from the API Administration page.

Page 6: The anypoint platform for API's

Designing Your API

API Designer is the Anypoint Platform for APIs custom environment specifically dedicated to designing and writing an API definition in RAML. The API definition that you create here can be consumed by APIkit (as well as other RAML interpreting frameworks such as Osprey, JAXRS-Codegen, etc) to build out your API.The Designer is automatically paired with the API Console, allowing you to watch your API take shape as you write it.

Page 7: The anypoint platform for API's

Building Your API

RESTful API Modeling Language (RAML)works to define RESTful APIs. Leveraging YAML and JSON, RAML is exceptionally lightweight, encouraging the organic emergence of elegant API patterns. Use RAML – and its intuitive tooling – to design and write your API interface, then import the interface file into Studio to build out your API with APIkit. 

Page 8: The anypoint platform for API's

Setting Your API URL

On your API Version Details page, click Configure Endpoint to set the API type and an optional inbound endpoint for your deployed API. The endpoint that you provide here should be the actual inbound URL of your API. Do not use a placeholder URL.The platform asks you to identify your API Type as either HTTP, WSDL, or RAML Spec.

Page 9: The anypoint platform for API's

Proxying Your API

Before you can create a proxy, you must first create an API version in the Anypoint Platform.To obtain an auto-generated proxy for your API version, you need to have API Version Owner permissions for the API, or be an Organization Administrator. To deploy a proxy application, you need a valid URL where your API is currently running. You also need one of the following:On-premisesAutomatic On-premises deployAutomatic CloudHub deployManual CloudHub deploy

Page 10: The anypoint platform for API's

Deploying Your API or Proxy

This page assumes that you have done one of the following things:1. Built a new API using APIkit  or2. Created an auto-generated proxy application for the

endpoint on which your API is hosted (if you want to deploy on premises or manually to CloudHub, you must downloaded it as a .zip file) or

3. Built a custom proxy application for the endpoint on which your API is hosted

Page 11: The anypoint platform for API's

Accessing Your API Behind a Firewall

When you use the Anypoint Platform’s API Console, API Designer, or API Notebook features, calls to APIs are routed through a server-side proxy by default. For more information about this proxy and why it’s used, read the Proxies, and CORS section below. If your API is located behind a firewall that prevents inbound requests, the API is unreachable from the proxy and you won’t be able to use the proxy to call the API. However, if you are using your browser from behind the firewall, you may be able to call your API directly.

Page 12: The anypoint platform for API's

Managing Your API• Applying Runtime Policies

Client ID Based Policies External OAuth 2.0 Token Validation Policy

HTTP Basic Authentication PolicyPingFederate OAuth Token Enforcement PolicyLDAP Security ManagerOpenAM OAuth Token Enforcement PolicyCreating a Policy WalkthroughApplying Custom PoliciesAdding Terms and ConditionsOAuth 2.0 Provider and OAuth 2.0 Token Enforcement Policies

• fining SLA Tiers• Managing API Versions

Page 13: The anypoint platform for API's

Creating an API Notebook

There are two ways to create an API Notebook:If you are an API Version Owner, edit your API Portal and use the left navigation menu to add a new API Notebook for your API version. Creating your API Notebook within the context of your API Portal automatically includes a line of code that creates the necessary API client for your RAML-based API.Visit the API Notebook site and create a new Notebook. If you want to save your work, log in with your GitHub account; your saved notebooks store as GitHub gists.

Page 14: The anypoint platform for API's

Browsing and Accessing APIs

Your organization’s Developer Portal can be found here:http://apiplatform.anypoint.mulesoft.com/apiplatform/{yourorgdomain}/#/portalsNote that you can only see API Portals listed on the Developer Portal that are Public or to which you have been granted Portal Viewer access. You can browse the portals alphabetically, or search for APIs according to name, version, or tags.

Page 15: The anypoint platform for API's

Viewing API AnalyticsAccess the Analytics dashboard for your Anypoint Platform for APIs organization to get insight into how your APIs are being used and how they are performing.

Page 16: The anypoint platform for API's

Analytics Event API

The Anypoint Platform for APIs gathers powerful analytics data for each API that is managed using the platform. This data is displayed visually in your API’s dashboard, but many scenarios require access to the raw data so that it can be analyzed or transformed. To meet this need, the Analytics Reporting API makes it easy to create a report that queries the desired data and exposes it via an API endpoint. You can also create reports that span more than one API, or create different reports for the same API.

Page 17: The anypoint platform for API's

References

https://docs.mulesoft.com/anypoint-platform-for-apis/

https://docs.mulesoft.com/anypoint-platform-for-apis/anypoint-platform-for-apis-user-guide

Page 18: The anypoint platform for API's

Thank you