Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 2.36 KB

synchronous-interactions.md

File metadata and controls

19 lines (15 loc) · 2.36 KB

Synchronous interactions

The web allows us the ability to request HTML pages via URLs and receive a response that contains what we are looking for. It was a low-cost approach that has been applied to the ability to synchronously GET, POST, PUT, or DELETE digital resources and capabilities via the internet.

Request

Every synchronous API interaction has a base set of properties that help keep resources secure. They also allow consumers to control the transport of their requests and tailor the requests to their needs, while sending data and media along as part of the body of each request.

  • Authentication - Require everyone making a request to provide authentication, ensuring that everyone using an API is supposed to be using it and keeping your environment secure.
  • Parameters - Allow each request to be customized by providing a set of parameters along with each request, transforming the response the API consumer is looking for.
  • Headers - Define and shape the transport of the request by setting the headers of the request used by the network and the server to handle the request and response.
  • Body - The machine-readable XML or JSON request body is sent as part of the request, providing the information submitted with each request. Synchronous API requests provide a simple and low-cost way to request data, content, media, and other digital resources, helping standardize and scale the way API consumers access and pull digital resources via an interface that makes sense worldwide.

Response

Each synchronous request has a response, returning the data, content, and media requested by the API consumer and possessing an HTTP status code to communicate success or failure.

  • Status Code - Standard HTTP status codes articulate the success or failure of a request in a way that any machine can be programmed to understand during handling.
  • Headers - The headers of the request define how the transport and shaping of the request was handled, allowing for the receiving system to understand how it arrived.
  • Body - The response data or message returned as part of the API request returns JSON or XML code that can be used in any application or integration using the API. Responses return what each consumer was requesting, providing the raw data, content, or media that can then be rendered in applications and system-to-system integrations.