The API reference is in English.

Current source preview reference

GET /v1/projects/{project_id}/scans/latest

Get latest project scan. Permissions, parameters, responses and examples.

0.1.0 · source bccff29 · Immutable snapshot · Download OpenAPI specification

Get latest project scan

Get latest project scan through GET /v1/projects/{project_id}/scans/latest. The parameters and declared response shapes below come from this exact source snapshot.

Source preview; no stable third-party integration promise. This page makes no request to a local installation.

Authority

Browser operator session or exact IDE capability with scan:read. Route-specific ownership and generation checks also apply.

Inspect the authority source · Authentication guide

Parameters and headers

NameLocationContract
project_idpath
Required

integer

Schema
{
  "title": "Project Id",
  "type": "integer"
}

Request body

No typed JSON body is declared by this handler. That does not rule out source-level request parsing; inspect the pinned implementation, especially for internal connector protocols.

Responses

StatusMeaning and declared shape
200

Successful Response

application/json · ScanOut
{
  "properties": {
    "base_ref": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Base Ref"
    },
    "completed_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At"
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "duration_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Duration Ms"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "findings_revision": {
      "default": 1,
      "title": "Findings Revision",
      "type": "integer"
    },
    "gate_decision": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Gate Decision"
    },
    "gate_reasons": {
      "items": {
        "type": "string"
      },
      "title": "Gate Reasons",
      "type": "array"
    },
    "head_ref": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Head Ref"
    },
    "id": {
      "title": "Id",
      "type": "integer"
    },
    "job_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Job Id"
    },
    "job_revision": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Job Revision"
    },
    "mode": {
      "title": "Mode",
      "type": "string"
    },
    "project_id": {
      "title": "Project Id",
      "type": "integer"
    },
    "revision": {
      "default": 1,
      "title": "Revision",
      "type": "integer"
    },
    "scanner_summary": {
      "additionalProperties": true,
      "title": "Scanner Summary",
      "type": "object"
    },
    "source_snapshot": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/ScanSourceSnapshotOut"
        },
        {
          "type": "null"
        }
      ]
    },
    "started_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "status": {
      "title": "Status",
      "type": "string"
    }
  },
  "required": [
    "id",
    "project_id",
    "mode",
    "base_ref",
    "head_ref",
    "status",
    "gate_decision",
    "gate_reasons",
    "scanner_summary",
    "error",
    "created_at",
    "started_at",
    "completed_at",
    "duration_ms"
  ],
  "title": "ScanOut",
  "type": "object"
}
400

Exact host, malformed request or URL credential refusal

application/json · object
{
  "properties": {
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "detail"
  ],
  "type": "object"
}
401

Missing or invalid membership

application/json · object
{
  "properties": {
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "detail"
  ],
  "type": "object"
}
403

Exact origin, CSRF or route authority refusal

application/json · object
{
  "properties": {
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "detail"
  ],
  "type": "object"
}
404

Refresh the collection and verify the resource identity before retrying. See source-linked error catalog.

422

Validation Error

application/json · HTTPValidationError
{
  "properties": {
    "detail": {
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      },
      "title": "Detail",
      "type": "array"
    }
  },
  "title": "HTTPValidationError",
  "type": "object"
}
429

Authentication rate or connection limit

application/json · object
{
  "properties": {
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "detail"
  ],
  "type": "object"
}

An empty or broad schema preserves the source contract. It is not a promise of an empty response.

Source-linked errors

Literal HTTP errors in this handler and same-file helper call graph, plus control middleware. Dynamic and cross-module failures may add other errors; source links are authoritative.

2 source error observations
StatusSource detailRecovery
404 ↗project not foundRefresh the collection and verify the resource identity before retrying.
404 ↗project has no scansRefresh the collection and verify the resource identity before retrying.

Read the recovery guide

Synthetic examples

These examples validate declared JSON shapes and formats. They contain no real installation data and do not prove runtime admission, cross-field validation, authority or successful work.

Response 200 JSON
{
  "base_ref": "synthetic",
  "completed_at": "2026-01-01T00:00:00Z",
  "created_at": "2026-01-01T00:00:00Z",
  "duration_ms": 1,
  "error": "synthetic",
  "gate_decision": "synthetic",
  "gate_reasons": [],
  "head_ref": "synthetic",
  "id": 1,
  "mode": "synthetic",
  "project_id": 1,
  "scanner_summary": {},
  "started_at": "2026-01-01T00:00:00Z",
  "status": "synthetic"
}
Download this service's complete OpenAPI

All referenced models remain in its components section. Browse control model definitions.