REST and HTTP(S)
The internet works via HTTP(S). HTTP is a stateless protocol that has a standard set of methods. Your web browser (Google, Firefox, Internet Explorer, Opera, etc.) communicates with web servers by speaking in HTTP verbs like GET, POST, PUT, and DELETE and the web servers are configured to respond to these requests in certain ways. If you’re browsing a web site, your web browser will have sent a HTTP GET request to the server, and you will have received back from the server the HTML you see in the browser. If you submit a form on the internet, that data is usually transmitted via an HTTP POST request.
I know what you’re thinking: “But Jay, I came here to learn about REST. I know what HTTP is.” But I bring up the context of HTTP because at its heart their similarity to HTTP is the appeal of “REST APIs” or “RESTful interfaces”. What makes developers like REST so much is that they already understand the basics of HTTP. Requests are made with a specific verb, and responses are received back by the calling client.
What’s REST? Representational State Transfer
REST, (REpresentational State Transfer) is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other. REST-compliant systems, often called RESTful systems, are characterized by how they are stateless and separate the concerns of client and the server.
What are REST Resources? Routes?
There are two core parts of a REST API: one is resources (which you could call Entities, or Objects) and you act on those resources via standard HTTP requests with standard HTTP verbs. To understand resources, you must understand that REST APIs are organized around URIs — uniform resource identifiers — and that generally those are centered around these objects.
REST Verbs (HTTP Request Methods): GET, POST, PUT, PATCH, DELETE
While there are technically 9 HTTP request methods (what I’m calling verbs) I’ve only ever seen five implemented to perform actions with a REST API. This is basically because REST methods map pretty well to “CRUD.” CRUD is a common acronym which stands for Create, Read, Update, Delete — the four obvious operations that one wants to do with a piece of data. Four operations don’t need 9 request types. But there is one extra.
In any case, the five HTTP methods used with most REST APIs are:
GET
which is used for reading data.GET
requests — inside and outside of REST contexts — are considered “read only.”POST
which is generally used for creating new data. SometimesPOST
is used for updating too, but generally “best practice” says to use…PUT
orPATCH
for updating data. Why two? Because sometimes you want to replace it completely — when youPUT
— and sometimes you just want to replace or change a value of two — when youPATCH
. Update operations are kind of the least standardized in practice, because support forPUT
andPATCH
isn’t as universal asGET
,POST
, andDELETE
.DELETE
is for deleting data. Hardly seems worth a sentence of explanation.
Example RESTful API URI’s:
HTTP GET https://api.example.com/contact1/{id} (get contact with id) HTTP POST https://api.example.com/contact1/ (create a contact) HTTP GET https://api.example.com/contact1/primaryemail/{id} (get email with id) HTTP DELETE https://api.example.com/contact/{id} (delete contact)
So what is a RESTful API used for?
REST is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other via the web.
What this basically means is that you or any web developer can now create web applications for interacting with your GoldMine SQL Database and/or any other web applications that also have a RESTful API.
There are so many possibilities as it relates to your GoldMine database, that there are just too many to list/name.
Here are just a few examples:
- Send GoldMine Contact info to Constant Contact, Hubspot, Mailchimp, Google Contacts, etc.
- Create GoldMine Contacts, Schedule Calls, Create Cases, Create Details, Create Forecasted Sales, etc. from online forms, ecommerce systems, accounting systems, help desk ticket systems, etc.
- Create web based interfaces to your GoldMine database, ie for web click-to-dial phone numbers, to view/edit/delete your GoldMine data in a browser from outside your office.
- Create new functionality for your GoldMine database from a web browser, ie: upload a list of hard bounced emails, and remove/update each email address that is found in the GoldMine database.
- Search the GoldMine database for hard bounced email notification emails and identify the hard bounced email, and then remove/update that email address in the GoldMine database. Maybe also create a History Record, or Schedule a Next Action associated with that contact as well.
- Upload a CSV file containing contact names, and email addresses and delete those contacts (as well as associated emails, calendar, history, cases, details, notes, etc) from GoldMine based on matching contact name and email address. (You could also just create a group of matching contacts, or update a field for matching contacts, etc.)
- The possibilities are numerous!!!!
WHAT’s REQUIRED?
- GoldMine RESTful API
- WAMP (FREE) OR IIS (included with Windows)
- SSL Certificate (Self Signed or Purchased via CA)
- Domain name or Subdomain name
- Static IP (optional, but recommended)
- GoldMine 9.2 or higher (works with a single GoldMine database only)
Please Note: The GoldMine RESTful API is developed by First Direct Corp. and is not a feature of GoldMine itself. If you have questions about this RESTful API please contact First Direct Corp. at (800) 935-4386 or via our Contact Us form.