The API architecture is made up of four different layers: the Interaction Layer, Integrational Layer, Application Layer, and Information Management Layer (databases).
If an API isn’t documented, the chance of it being consumed by other developers is incredibly low. For a very long time, companies like Microsoft, Salesforce, and Apple were dominant players in technology. They were dominant players because they had a compelling product and great documentation.
An API First Approach implies that the API is a first class citizen. The API is developed with the goal of API consumption in mind. The API is our point of differentiation.
An API program is a plan that a company has developed to market, support and monetize a public API. There are thousands – maybe even tens of thousands of companies with public and open APIs.
REST and SOAP are different ways of transmitting data between two different systems via an API. REST is a set of architectural principles. SOAP is a protocol maintained by the World Wide Web Consortium.
A unified API is an abstraction that allows us to combine APIs for multiple providers – giving us one place to access all of their endpoints.
When building and maintaining APIs there are a lot of different terminology that you need to be aware of. This isn’t a complete list, but it’s enough to make you dangerous.
When connecting to the Salesforce SOAP API, there’s two different WSDL options: the Enterprise WSDL and the Partner WSDL.
Apex classes and methods can be exposed to external applications as REST based endpoints.
This means that there’s a very easy way to have an external application make a direct call into Salesforce to do a specific action.
Handling no results in a collection endpoint and at a singular resource can be a bit of a tricky situation.
With REST there’s no standard, but there are some standards associated with REST such as oAuth and OpenAPI.
Optimization can mean a lot of things like simplifying a process, reducing data and even speeding up response time.
An API often has three different ways we can optimize it.
HTTP defines a set of different request methods. There are request methods like GET, POST, PUT, DELETE, and others.
Because it’s allowed doesn’t mean it’s right though.
When large lists of records are exposed through an API, we need a mechanism to control how many records are returned. In the article, we explore the three main methods of paging.
AWS API gateway is a phenomenal service from AWS because it has all of the features somebody could ever want in an API gateway.
Sorting is determining the order of items when a list of items is returned from a particular endpoint. The best practice is to really keep things simple and consistent.
Application Programming Interfaces and dates are just as difficult.
Timezone issues crop up because dates and datetimes are just strings in JSON, there’s nothing to necessarily say that this is a date in this format.
SOAP and XML based Web Services aren’t dead yet. I don’t think they will be for quite a while because they are very common in large enterprises (government, banks, telecommunications, etc).
The parameters and the way the parameters are transmitted can be different in each implementation.
API parameters can be split into four different groups
Often what happens is a company decides to build a new mobile app which shouldn’t directly communicate with the database. So the company builds an API for the mobile apps to communicate with the database that also does some calculations (business logic) and validations (business rules).
Over time, the business realizes that they could also potentially sell access to the API or allow their customers to directly connect with it and finally have partners launch apps in different verticals.