Misc

Authen exposes some miscellaneous APIs for verifying the health (ping) and retrieving information (info) about the system.

Ping

Returns ok if Authen is working properly. This is an endpoint that a health-check would want to monitor. Callers can either use the status code (200) or the basic response.

GET /v1/ping
nametypedesc
okbool

Should always be true.

curl "http://127.0.0.1:5200/v1/ping"
{"ok":true}

The general error section details Authen's error responses as well as detailing all errors, including global errors, such as validation and internal server errors.

Info

Returns information about the system. The information included in the response is not sensitive and should be included in any bug reports.

GET /v1/info
nametypedesc
gostring

The version of Go used to build the system.

commitstring

The commit hash.

storage.typestring

The storage engine being used.

storage.migrationint

The version of the migrations being used.

curl "http://127.0.0.1:5200/v1/info"
{
	"go": "go1.19",
	"commit": "ba4242b5bddacb39e4c1d9cdaa34f4a5fccbdbea",
	"storage": {
		"migration": 1,
		"type": "postgres"
	}
}

The general error section details Authen's error responses as well as detailing all errors, including global errors, such as validation and internal server errors.