autopicDocs

API reference

Service

Service health and the deployed version. These endpoints require no authentication.

Service health

GET/healthPublic

Returns service and PostgreSQL connectivity status.

Requires no authentication.

Response 200

  • statusstringrequired

    Values: ok

  • databasestringrequired

    Values: ok

Errors

  • 400Invalid request
  • 503Service unavailable
Request
curl https://api.autopic.io/health
Response 200
{
  "status": "ok",
  "database": "ok"
}

Deployed version

GET/versionPublic

Reports the commit the running binary was built from. Public and unauthenticated: checking what is deployed should not need the admin key.

Requires no authentication.

Response 200

  • commitstring
  • shortCommitstring
  • buildTimestring
  • dirtyboolean

    Built from a working tree with uncommitted changes.

  • sourcestring

    Where the commit came from.

    Values: ldflags, environment, buildinfo, unavailable

Request
curl https://api.autopic.io/version
Response 200
{
  "commit": "98af74ad3e1f0c2b4a5d6e7f8a9b0c1d2e3f4a5b",
  "shortCommit": "98af74a",
  "buildTime": "string",
  "dirty": true,
  "source": "ldflags"
}