Lesson Progress
0% Complete

Before you begin building your Connector, you also need to think about the scope that you need for it. What do you want your Connector to be able to do? These will be your Methods. 

Your Connector’s Methods define the type of requests that your Connector will make to the API.

A request is essentially a message that you are sending to the API. This message “requests” that an event happens on an application.

Events that can be requested are specific to each API. However, many requests fit into one of four types, that are commonly referred to as “CRUD”.

CRUD (Create, Read, Update, Delete)

These 4 types of CRUD operations represent what our request is asking the API to do.

  • Create” requests will store, or create, data with the API. This data could be anything, such as an invoice. “Create” requests contain the information that is required to create a specific object. For example, to create an invoice, you might need to send a “Customer Name” and “Price”.
  • Read” requests respond to whoever made the request, with data so we can “read” the data. A “Get Invoice” request would respond with the information about an Invoice.
  • Update” requests update an existing object with new information that you send.
  • Delete” requests delete a specific object. Be extra careful when testing “delete” methods as you will not be able to recover what has been deleted.

The CRUD structure maps nicely onto HTTP Method types. A HTTP method type is the type of request being sent.

  • To perform a “Create” request, you will often use a “POST” HTTP Method.
  • To perform a “Read” request, you will almost always use a “GET” HTTP Method.
  • To perform an “Update” request, you will often use a “PATCH” or “PUT” HTTP Method.
    • PUT method –  for updating a resource
    • PATCH method – for updating a part of a resource (while PUT replaces the whole resource with a new one)
  • To perform a “Delete” request, you will almost always use a “DELETE” HTTP Method.

These are the most commonly used HTTP method types.

This summary is not accurate across all APIs, but the idea is to introduce you to these keywords early.