Skip to content

McKael/checkupapi

Repository files navigation

CheckupAPI

API server for Sourcegraph checkup data

godoc license build Go Report Card

checkupapi is a Go REST API to access data generated by checkup.

Purpose

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.

Installation

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

Usage

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

Sample web status page

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.

References

About

API server for Sourcegraph checkup data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published