Liveness, contract version and commit
GET
/health
const url = 'https://api.sloose.com/health';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.sloose.com/healthUnauthenticated. contract is the hash-locked contract version this deployment was built against — the one number worth comparing when a client and the API disagree about a shape. commit is the commit it was built from, which is how to tell whether a change is live.
Responses
Section titled “Responses”The deployment is up. maintenance is true while the restore switch is on and every other route answers 503 MAINTENANCE, bar the operator’s own person deletion, which only the ADMIN_TOKEN reaches.
Media typeapplication/json
object
ok
required
boolean
service
required
string
environment
required
string
contract
required
string
commit
required
The commit this deployment was built from, as the deploy passed it: the full sha. Null where the build was told none (development).
string | null
maintenance
required
boolean
Example
{ "ok": true, "service": "sloose-api", "environment": "development"}