The API reference is in English.

Immutable source snapshot

POST /v1/git/push-protection/{repository_id}/check

Check git push. Permissions, parameters, responses and examples.

0.1.0 · source bccff29 · Current reference · Download OpenAPI specification

This address preserves one reviewed source snapshot. Use the current entry point for the selected documentation version.

Check git push

Check git push through POST /v1/git/push-protection/{repository_id}/check. 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 project:resolve. Route-specific ownership and generation checks also apply.

Browser mutations require the exact control Origin and session-bound CSRF header. IDE callers use only their admitted route scope and exact generation.

Inspect the authority source · Authentication guide

Parameters and headers

NameLocationContract
repository_idpath
Required

string

Schema
{
  "title": "Repository Id",
  "type": "string"
}
X-CSRF-Tokenheader
Conditional / optional

Required for browser mutations with the exact control Origin. Not an IDE capability.

Schema
{
  "type": "string"
}

Request body

JSON body · required · PushPlan

FieldTypePresence
advertised_basesarrayRequired
commitsarrayRequired
destination_digeststring | nullRequired
digeststringRequired
object_formatstringRequired
refsarrayRequired
repository_idstringRequired
schemastringRequired
treesarrayRequired
Complete declared request schema
{
  "additionalProperties": false,
  "properties": {
    "advertised_bases": {
      "items": {
        "type": "string"
      },
      "maxItems": 1024,
      "title": "Advertised Bases",
      "type": "array"
    },
    "commits": {
      "items": {
        "$ref": "#/components/schemas/CommitTree"
      },
      "maxItems": 256,
      "title": "Commits",
      "type": "array"
    },
    "destination_digest": {
      "anyOf": [
        {
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Destination Digest"
    },
    "digest": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Digest",
      "type": "string"
    },
    "object_format": {
      "enum": [
        "sha1",
        "sha256"
      ],
      "title": "Object Format",
      "type": "string"
    },
    "refs": {
      "items": {
        "$ref": "#/components/schemas/PushRef"
      },
      "maxItems": 64,
      "title": "Refs",
      "type": "array"
    },
    "repository_id": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Repository Id",
      "type": "string"
    },
    "schema": {
      "const": "lomo-git-push-plan/v1",
      "title": "Schema",
      "type": "string"
    },
    "trees": {
      "items": {
        "type": "string"
      },
      "maxItems": 256,
      "title": "Trees",
      "type": "array"
    }
  },
  "required": [
    "schema",
    "repository_id",
    "object_format",
    "destination_digest",
    "advertised_bases",
    "refs",
    "commits",
    "trees",
    "digest"
  ],
  "title": "PushPlan",
  "type": "object"
}

Responses

StatusMeaning and declared shape
200

Successful Response

application/json · object
{
  "additionalProperties": true,
  "title": "Response Check Git Push V1 Git Push Protection  Repository Id  Check Post",
  "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"
}
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"
}
503

Check readiness and the recorded job state. A healthy control plane does not prove scanner readiness. See source-linked error catalog.

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.

4 source error observations
StatusSource detailRecovery
422 ↗{"code":"push_repository_changed","message":"The outgoing plan belongs to a different repository."}Correct the field or semantic validation error. Input values are omitted from control validation errors.
503 ↗{"code":"push_evidence_corrupt","message":"Immutable Git evidence names another source."}Check readiness and the recorded job state. A healthy control plane does not prove scanner readiness.
503 ↗{"code":"push_evidence_corrupt","message":"Immutable Git evidence lost its exact source project."}Check readiness and the recorded job state. A healthy control plane does not prove scanner readiness.
503 ↗{"code":"push_evidence_corrupt","message":"Immutable Git evidence needs owner review."}Check readiness and the recorded job state. A healthy control plane does not prove scanner readiness.

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.

Request JSON
{
  "advertised_bases": [],
  "commits": [],
  "destination_digest": "0000000000000000000000000000000000000000000000000000000000000000",
  "digest": "0000000000000000000000000000000000000000000000000000000000000000",
  "object_format": "sha1",
  "refs": [],
  "repository_id": "0000000000000000000000000000000000000000000000000000000000000000",
  "schema": "lomo-git-push-plan/v1",
  "trees": []
}
Response 200 JSON
{}
Download this service's complete OpenAPI

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