Skip to content
API ReferenceEndpoints

Images

Images represent unique container artifacts (registry/name) discovered by HarborGuard, independent of any specific tag or scan. Use this endpoint to browse your image inventory and drill into per-image vulnerabilities.

Base path: /api/images

MethodPathMin role
GET/api/imagesviewer (any)
GET
/images
/images?grade=A%2CB&sort=riskScore%3Adesc

The Authorization access token

Authorization

X-API-Key<token>

Organization API key (hg_ak_*). Created from Settings → API Keys.

In: header

Authorization
Required
Bearer <token>

Authorization: Bearer hg_ak_... for organization API keys, or Authorization: Bearer hg_pat_... for Personal Access Tokens that impersonate a specific user.

In: header

next-auth.session-token<token>

NextAuth session cookie. Web only — set automatically at sign-in. Not usable for server-to-server.

In: cookie

Query Parameters

pageinteger

Page number (1-indexed)

Default: 1Minimum: 1

limitinteger

Page size (1–200)

Default: 50Minimum: 1Maximum: 200

registrystring

riskScoreinteger

Minimum risk score

gradestring

Comma-separated list of grades.

searchstring

sortstring

Sortable: name, createdAt, riskScore.

curl -X GET "https://harborguard.co/api/images?page=1&limit=50&registry=string&riskScore=0&grade=A%2CB&search=string&sort=riskScore%3Adesc" \
  -H "X-API-Key: <token>"

OK

{
  "data": [
    {
      "id": "img-1",
      "name": "ghcr.io/acme/api",
      "registryId": "reg-abc",
      "tagCount": 12,
      "latestTag": "1.4.7",
      "latestDigest": "sha256:abcdef",
      "riskScore": 31,
      "grade": "B",
      "vulnerabilities": {
        "critical": 0,
        "high": 4,
        "medium": 19,
        "low": 27
      },
      "lastScannedAt": "2026-04-26T14:22:11.000Z",
      "createdAt": "2025-12-04T00:00:00.000Z"
    }
  ],
  "meta": {
    "page": 1,
    "pageSize": 50,
    "total": 312,
    "totalPages": 7,
    "hasNext": true,
    "hasPrev": false
  },
  "links": {
    "self": "/api/images?page=1&limit=50",
    "next": "/api/images?page=2&limit=50"
  }
}