API server for Sourcegraph checkup data
checkupapi
is a Go REST API to access data generated by checkup.
The goal of checkupapi is to provide a common and efficient interface to read checkup's data without knowledge about checkup storage. Currently, the supported checkup storages are those that implement the StorageReader interface (FS, SQL and Github -- the Github backend has not been tested).
With checkupapi, getting an event timeline or statistics is very fast and does not require a heavy CPU load on the client side.
Please check the API specifications for more details.
You can install the API server with the go command line tool:
% go get github.com/McKael/checkupapi
and ugrade it with
% go get -u github.com/McKael/checkupapi
checkupapi can use the same configuration file as checkup.
The default port is 8801, you can change it with the --http
command line flag.
E.g.:
% checkupapi -c /etc/checkup/checkup.json --http :8080
You can then query the API (see the API endpoints):
% curl localhost:8080/api/v1/check
OK 2017-08-26 10:25:06 +0200 CEST
A status page, derived from checkup's one, has been included.
Instead of fetching results from checkup storage it does query the API to get event timeline and statistics. The API URL must be set in js/config-api.js
.