API

API stands for Application Programming Interface. An API is a software mediator that allows two applications to sync with each other. In other words, an API is the message-bearer that sends your requisition to the provider that you’re requesting it from and then delivers the response back.

An API gives services that are self-sufficient of their respective implementations, Allows the implementations and definitions to differ without compromising each other. API makes it simple to develop a program by providing the building blocks.

Consume API

 

API consumption is about consumers. It’s about connecting services, synchronizing data among services, and mixing services to make the new end-customer experiences. The purpose of an API is to enable new sorts of consumption for your application services.

Internal applications : Internal microservices that believe functionality exposed by your API’s.

Digital Experience Platforms: Platforms that allow non-technical and semi-technical business users to create experiences for various customers. Grew out of web page management space.

Custom Frontends: Custom web UIs, native mobile, embedded devices, social media, etc.

These three categories of clients have different requirements which will change how you model, build and consume APIs.

An existing API that you’re replacing, trace the source of all the inbound API calls. Your existing API may have clients you never knew about. Then, imagine what sorts of clients you’ll see more of. If you’re selling consumer grocery , many of your future clients will probably be the web of Things devices, like smart refrigerators. If you’re selling apparel, many of your future clients will probably be magic mirrors and similar devices.

 

Characteristics and Capabilities:
Language: What sort of language are often wont to consume the APIs? Does it need to be plain REST, or are you able to use SDKs supported Java, .NET, or other languages?

Latency: 
Where physically is that the client relative to the origin of your API? Are you running a custom web UI out of an equivalent physical data center where you’ve got a millisecond of latency, or are you consuming the API from a mobile that’s 200 milliseconds from the origin?

Bandwidth: 
Similar to latency, what are bandwidth constraints? Your end-consumers will get upset if their smartwatch consumes many megabytes whenever your app is opened.

Processing power: 
Some clients may have very less processing power, which impacts how you call the API. An internet-connected coffee pot that reorders coffee pods is going to be ready to consume APIs very differently than a microservice running on a replacement data center’s server.

Security: 
Does your client support the libraries required for common authentication and authorization libraries? Native clients, especially, may severely restrict your ability to incorporate third-party libraries.

Ability to cache: 
Is the client capable of any client-side caching? To what degree? An internet-connected coffee pot won’t be ready to cache anything, whereas a full data center server can probably cache many many responses.

API Documentation

  • Model APIs with Accuracy :
    API design is prone to errors, and it’s extremely difficult and time-consuming to spot and rectify mistakes when modeling APIs. APIs with the OpenAPI Specification (OAS),  validates your design in real-time, checks for OAS compliancy, and provides visual feedback on the go.

  • Establishes common design guidelines.

  • Developers are constantly required to double check if their APIs and endpoints work as intended during the development process itself. Swagger Inspector provides capabilities to easily inspect API request-responses, and make sure they work as expected.

Response Format


To make it easier to know how a question is being processed we use a selected JSON response format. Here is an example:

{
  "field": "mySuperMon",
  "stats": {
    "data": {},
    "errorCode": {},
    "count": 1,
    "responseCode": 0,
    "status": "string"
  }
}
 
Responses:

 

Status CodeReason
201Created
204No Agent Configured in your system
401You are not authorized to view the resource
403Accessing the resource you were trying to reach is forbidden
404The resource you were trying to reach is not found
406Not acceptable
409The request could not complete due to conflict.