Developing with SAP Extension Suite

Using APIs

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Use APIs to exchange information in a standardized way

What are APIs?

Usage Scenario

Your company is planning to develop an application that will use standard functionality, such as creating and updating entities, that are provided by another company as Application Programming Interfaces (APIs). So, what are APIs and how can you use them?

Benefits of API

An API is a way to communicate with other software programs.

APIs specify how software programs are able to exchange information with each other, even if they are designed and run by different organizations. APIs facilitate interaction by selectively exposing functionality that allow different apps, websites, and devices to communicate effectively with each other. More importantly, APIs allow businesses to reach beyond regular business channels and share data, content, and services directly with both business to business (B2B) and business to consumer (B2C)) clients, making UI development easy.

Let us consider an example.

Your company creates an application for customers to create and display maps. You create an API to enable customers to display your company's maps in their application,

The customer creates an application, such as a customer relationship management (CRM) application. Within this CRM application, the customer calls your API to add a map next to their customer’s profile.

Your application receives the call and does something, such as access your proprietary map database. What your application does can be as complicated as it needs to be, but the customer doesn't need to know exactly what you are doing behind the scenes.

When your application is ready, it sends a response. For example, a map for an address, entered by the customer.

To summarize, you create an API and customers call your API.

When your application is ready, it sends a response — either a confirmation that you did something, or some information, requested by the customer.

You do something and you send back a response that gives your customers the information they need for their own application.

Rules to Develop and Deploy APIs

Since the developer of the API and the consumers usually do not know each other, it is useful to follow some rules:

  • API documentation is a pillar of the developer experience. Good API documentation ensures that the developers fully understand the API, can use it, and don't get stuck.
  • Customers and partners find it easier to adopt APIs with names that are meaningful, clear, and self-explanatory.
  • Developer or service guides complement API references by describing how to use an API and related services, any SDKs, or the development platform in general.
  • Rules dealing with the deprecation of APIs and the decommissioning of their deliverables.

APIs in the SAP API Business Hub

Watch this video to learn about the SAP API Business Hub.

  • API Package: An API Package is a collection of related APIs or services, belonging to one product or product area, packaged and delivered together.
  • API/service: An API or service is a collection of related resources and operations available for each resource.
  • Resource: A resource is a remote data entity, identified by a URI, on which operations are performed.
  • Operation: An operation is a data operation, such as GET, POST, PUT, UPDATE, or DELETE, performed on a resource.

Summary

When software programs want to exchange information in a standardized way, such as creating or modifying business partners (entities), these standard functions can be defined as APIs. This also allows that APIs may be developed and operated by different organizations. It is then important to follow some rules when developing and deploying APIs.

Further Reading

See: What is an API?.

Save progress to your learning plan by logging in or creating an account