An API is simply a program, out there on the web, accessible via a url, that allows you to open doors filled with goodies, which is quite often free for the taking. Zephry's api can be found at https://api.zephry.co.za. It has several doors, and all the goodies are free. Here is a list of the doors, how to open them, and a short description of their goodies.

The API

The Zephry API is a program written in Google's Go language (Golang) as a REST service with URI endpoints that you can access from virtually anywhere, even the address bar of a standard browser. It runs on a Linux server, and is exposed to the public internet via NginX, an open-source web server.

While the endpoints are public (i.e. no authentication is required to access them), all data transmitted and received is protected by Transport Layer Security (TLS, used to be known as SSL). This is why the protocol prefix for the API is "https", and why a small lock appears on the address bar.

JSON Data

All data transmitted by the service is in Javascript Object Notation (JSON) format, and easily readable text arrangement. Why not CSV, to make it even easier? Because the data does not always consist of homogeneous rows and columns, and often contains nested and dissimilar fields and structures. A row/column arrangement just doesn't work. And most importantly, web sites love JSON, because it's a format that browser technologies can easily read, write and manipulate.

Here's an example of a family described by JSON:

                            
    {
        "type": "dysfunctional",
        "name": "Simpson",
        "location": {"country": "United States", "state": "Unknown", "city": "Springfield"},
        "humans":  [
            {"name" : "Marge", "nomination" : "mother", "identifies-as": "female"},
            {"name" : "Homer", "nomination" : "father", "identifies-as": "male"},
            {"name" : "Bart", "nomination" : "son", "identifies-as": "male"},
            {"name" : "Maggie", "nomination" : "daughter", "identifies-as": "female"},
            {"name" : "Lisa", "nomination" : "daughter", "identifies-as": "female"} 
        ],
        "pets": [
            {"name": "Snowball II", "type": "canine"},
            {"name": "Santa's Little Helper", "type": "canine"}
        ]
    }
                        

The Endpoints

API endpoints are the address of a resource, a function that does a specific job. In this case, it extracts information from the requesting url, and sends data to the requestor. Enter a scourge and country key in the input fields below. But... for now, there is only one scourge :), and that is COVID-19 (key=1). Click on an endpoint in the list for a response to be rendered in raw JSON format below this list.

The Response