The format for this API is as follows: for a resource, a directory is created within the api directory, and for a collection, the format is a combination of a directory and the index.json file. This combination allows queries without needing to include .json in the URL when making a GET request. This type of API only allows queries using the GET method; it does not support any other method, as it is a static API.
Example endpoint, File:
api/v1/users/index.jsonResult:
GET https://gatoartstudio.github.io/api-static/api/v1/users
[
{
"id": "0",
"name": "Pedro"
},
{
"id": "1",
"name": "Juan"
}
]index.html # Required file for Github Pages.
api/
├── status/
│ └── index.json # GET | Health check.
│
└── v1/
└── users/
└── index.json # GET (list) | User list.