After last month’s blog about the release of Jiwa’s REST API, we thought that this month we would describe a little more about what a REST API is and what you can do with a REST API.
A REST API is a tool that is designed by developers to enable them to read and write data in and out of databases using the HTTP Protocol.
A REST API is designed to be able to be used by practically any development language. Data can be written and read from one database to another, and the process is able to be improved upon over time, giving longevity to the process and applications that are developed.
Some of the typical uses for a REST API are:
- Integrate a web store to Jiwa
- Field sales via a mobile device (iOS/Android/UWA)
- Integrate Jiwa and Point of Sale systems
- Provide intranet services to staff via a web browser
- Provide specialised browser based interfaces for tailored, streamlined operational workflows.
Some Real-World Examples – Jiwa
JIWA provides a REST API which you can use to get data from a database. You can provide a search query and it will return the data that you request. An example of this is a HTTP request to a Jiwa demonstration database is to get the outstanding transactions from a customer’s account.
Using user credentials
User credentials requires an authentication step, so to do this you will need to first Authenticate and then make the request for transactions .
Using an API Key
The REST API Documentation:
What computers or other tools can use a REST API?
The Jiwa REST API lets you interact with Jiwa 7.1.xx from anything that can send an HTTP request. What is meant by the term “RESTful API”? An API can be considered “RESTful” if it has the following features (these are the main ones)
- Client Server – The client section handles what is on your computer screen, the server handles the reading and writing of data into the database.
- Stateless – No data about the client is stored in the database. From Wikipedia – At any time, a client can either be in transition between application states or “at rest”. A client in a rest state can interact with its user, but creates no load and consumes no per-client storage on the set of servers or on the network.
The “RESTful” Client Server Architecture
HTTP (the method used to communicate by a REST API) has a rich vocabulary for developers to use. The vocabulary consists of verbs – “doing words”. Using “verbs” developers get the computer to perform functions over the network or internet.
Do I need an API key to access a REST API?
Often, but not always. Jiwa’s REST API allows you to use either user credentials (username and password) or an API Key. API Keys are associated with Jiwa users, or Jiwa customers – a customer API Key allows you to give your customers an API Key to place orders, query prices and stock levels and see their own account balances and transactions.