REST API for GoldMine

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 bring up the context of HTTP because at its heart the similarity to REST 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 to the API with a specific HTTP verb (GET, POST, PUT, DELETE) and responses/data are received back from the API via the calling client.

What is REST?

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 via the web. 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 and 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” operations. CRUD is a common acronym which stands for Create, Read, Update, Delete — the four operations that one wants to do with data in a database. Obviously four operations do not need 9 request types. But there is one extra.

This is how web applications that use RESTful API’s communicate with databases, and in this case the GoldMine SQL Database. Data is submitted via the web (HTTP) to your self-hosted GoldMine RESTful API and that data is converted into SQL operations to interact with the data in your GoldMine database. ie to CREATE, READ, UPDATE or DELETE data in the GoldMine database.

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. Sometimes POST is used for updating too, but generally “best practice” says to use…
  • PUT or PATCH for updating data. Why two? Because sometimes you want to replace it completely — when you PUT — and sometimes you just want to replace or change a value of two — when you PATCHUpdate operations are kind of the least standardized in practice, because support for PUT and PATCH isn’t as universal as GETPOST, and DELETE.
  • DELETE is for deleting data. Hardly seems worth a sentence of explanation.

What is REST?

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/email/{id} (get email with id)
HTTP DELETE https://api.example.com/contact/{id} (delete contact with id)

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 means is that we can now create custom web applications/interfaces for your GoldMine database or create custom integrations between other web applications and your GoldMIne database. 

There are so many possibilities as it relates to your GoldMine database, that there are just too many to list/name.

VIDEO DEMONSTRATIONS AND PRSENTATION EXAMPLES:

WHAT’s REQUIRED?

  • GoldMine RESTful API
  • IIS Web Server
  • SSL Certificate
  • Domain name or SubDomain Name
  • Static Public 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.