Git.Top Trust API

The Trust API from Git.Top — 1 operation(s) for trust.

GitHub OpenAPI

Operations 1

GET /api/trust Fetch the production-readiness Trust Gate for high-confidence agent… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/git-top:git-top-trust-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

git-top-trust-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Git.Top Agent Trust API
  version: 0.1.0
  description: Agent-native GitHub project knowledge API for search, project lookup, alternatives, comparison, graph reasoning, quality, and schema discovery. High-confidence clients should inspect metadata.source, metadata.reason, trust fields, classification evidence, quality_signal_confidence, verification signals, and migration validation steps, and use require_d1=true when seed fallback should fail closed.
servers:
- url: https://git.top
  description: Production
- url: http://localhost:8787
  description: Local Worker
tags:
- name: Trust
paths:
  /api/trust:
    get:
      summary: Fetch the production-readiness Trust Gate for high-confidence agent…
      parameters:
      - name: detail
        in: query
        required: false
        description: 'Response detail level: summary (default) omits quality issue rows; full includes them and larger sync previews'
        schema:
          type: string
      responses:
        '200':
          description: Trust Gate decision with checks, agent policy, health, sync, quality summary, and metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustGateResponse'
              example:
                name: Git.Top Trust Gate
                decision: allow
                production_ready: true
                freshness_slo:
                  hot_projects:
                    target_hours: 48
                    total: 80
                    within_target: 77
                    freshness_rate: 0.963
                    target_rate: 0.95
                    meets_target: true
                  whole_corpus:
                    target_basis: tier_policy
                    total: 500
                    within_target: 493
                    freshness_rate: 0.986
                    target_rate: 0.95
                    meets_target: true
                checks:
                - id: d1-source
                  label: D1-backed source
                  status: pass
                  observed: available / d1
                  requirement: db=available and metadata.source=d1
                - id: hot-corpus-freshness
                  label: Hot corpus freshness
                  status: pass
                  observed: 77/80 within 48h (96%)
                  requirement: hot_project_freshness_rate>=0.95
                - id: sync-capacity
                  label: Scheduled sync capacity
                  status: pass
                  observed: 100/336 required daily
                  requirement: sync_capacity_target_feasible=true
                required_for_high_confidence:
                - metadata.source=d1
                - db=available
                - sync_freshness=fresh
                - hot_project_freshness_rate>=0.95
                - sync_capacity_target_feasible=true
                agent_policy:
                  cite:
                  - metadata.source
                  - sync_freshness
                  - hot_project_freshness_rate
                  - whole_corpus_freshness_rate
                  - sync_capacity_target_feasible
                  - data_trust_score
                  disclose_when:
                  - seed fallback is active
                  - sync is stale or degraded
                  - hot-tier corpus freshness is outside target
                health:
                  ok: true
                  db: available
                  project_count: 500
                  raw_project_count: 500
                  knowledge_ready_project_count: 500
                  sync_health: healthy
                  sync_freshness: fresh
                  last_successful_sync_at: '2026-07-04T00:00:00.000Z'
                  hours_since_successful_sync: 1
                  operational_storage:
                    status: healthy
                    github_cache_entries: 1200
                    github_cache_body_bytes: 32000000
                    github_cache_max_entries: 2500
                    github_cache_retention_entries: 1500
                    github_cache_body_budget_bytes: 163840000
                    utilization: 0.48
                    star_snapshot_count: 500
                    sync_run_count: 120
                    governance_run_count: 40
                  metadata:
                    source: d1
                    reason: d1_query
                    project_count: 500
                    generated_at: '2026-07-04T00:00:00.000Z'
                    snapshot_id: d1:500:2026-07-04T00:00:00.000Z
                    latest_synced_at: '2026-07-04T00:00:00.000Z'
                    schema_version: git-top.knowledge.v1
                sync:
                  health: healthy
                  freshness: fresh
                  priority:
                    counts:
                      hot: 80
                      warm: 300
                      cold: 120
                    refresh_due_counts:
                      hot: 4
                      warm: 6
                      cold: 0
                    stale_counts:
                      hot: 3
                      warm: 4
                      cold: 0
                    stale_rates:
                      hot: 0.038
                      warm: 0.013
                      cold: 0
                    freshness_slo:
                      hot_projects:
                        target_hours: 48
                        total: 80
                        within_target: 77
                        freshness_rate: 0.963
                        target_rate: 0.95
                        meets_target: true
                      whole_corpus:
                        target_basis: tier_policy
                        total: 500
                        within_target: 493
                        freshness_rate: 0.986
                        target_rate: 0.95
                        meets_target: true
                    capacity:
                      scheduled_daily_capacity: 336
                      required_daily_syncs: 100
                      utilization: 0.298
                      headroom: 236
                      target_feasible: true
                quality:
                  score: 96
                  release_score: 96
                  data_trust_score: 82
                  score_summary:
                    release_score_meaning: Release gate score.
                    data_trust_score_meaning: Corpus trust score.
                    risk_level_meaning: Risk level summarizes corpus confidence.
                  risk_level: low
                  risk_summary:
                    level: low
                    reasons: []
                    low_confidence_classification_rate: 0.04
                    collection_review_rate: 0.02
                    stale_project_rate: 0.01
                    stale_collection_rate: 0
                  coverage:
                    covered_categories: 14
                    total_categories: 14
                    missing_categories: []
                  metadata:
                    source: d1
                    reason: d1_query
                    project_count: 500
                    generated_at: '2026-07-04T00:00:00.000Z'
                    snapshot_id: d1:500:2026-07-04T00:00:00.000Z
                    latest_synced_at: '2026-07-04T00:00:00.000Z'
                    schema_version: git-top.knowledge.v1
                metadata:
                  source: d1
                  reason: d1_query
                  project_count: 500
                  generated_at: '2026-07-04T00:00:00.000Z'
                  snapshot_id: d1:500:2026-07-04T00:00:00.000Z
                  latest_synced_at: '2026-07-04T00:00:00.000Z'
                  schema_version: git-top.knowledge.v1
      tags:
      - Trust
      operationId: getApiTrust
      x-operation-id-source: derived
components:
  schemas:
    TrustGateResponse:
      type: object
      description: Production-readiness gate for high-confidence agent recommendations.
      required:
      - detail
      - decision
      - production_ready
      - freshness_slo
      - checks
      - required_for_high_confidence
      - agent_policy
      - health
      - sync
      - quality
      - metadata
      properties:
        name:
          type: string
        positioning:
          type: string
        detail:
          type: string
          enum:
          - summary
          - full
        decision:
          type: string
          enum:
          - allow
          - caution
          - block
        summary:
          type: string
        production_ready:
          type: boolean
        freshness_slo:
          oneOf:
          - $ref: '#/components/schemas/SyncFreshnessSlo'
          - type: 'null'
          description: Separately reports hot-project freshness and whole-corpus freshness against each tier's selected window.
        checks:
          type: array
          items:
            $ref: '#/components/schemas/TrustGateCheck'
        required_for_high_confidence:
          type: array
          items:
            type: string
        agent_policy:
          $ref: '#/components/schemas/TrustGateAgentPolicy'
        health:
          $ref: '#/components/schemas/HealthResponse'
        sync:
          type: object
          additionalProperties: true
        quality:
          $ref: '#/components/schemas/QualityReportResponse'
        metadata:
          $ref: '#/components/schemas/Metadata'
      additionalProperties: true
    SyncFreshnessSloSegment:
      type: object
      required:
      - total
      - within_target
      - freshness_rate
      - target_rate
      - meets_target
      properties:
        total:
          type: integer
          minimum: 0
        within_target:
          type: integer
          minimum: 0
        freshness_rate:
          type: number
          minimum: 0
          maximum: 1
        target_rate:
          type: number
          minimum: 0
          maximum: 1
        meets_target:
          type: boolean
    HealthResponse:
      type: object
      description: Health and source-preflight response. Agents should inspect db, metadata.source, sync_freshness, and project counts before trusting recommendations.
      required:
      - ok
      - db
      - project_count
      - raw_project_count
      - knowledge_ready_project_count
      - sync_health
      - sync_freshness
      - metadata
      properties:
        ok:
          type: boolean
        db:
          type: string
          enum:
          - available
          - missing
          - error
        project_count:
          type: integer
        raw_project_count:
          type: integer
        knowledge_ready_project_count:
          type: integer
        sync_health:
          type: string
        sync_freshness:
          type: string
        last_successful_sync_at:
          type:
          - string
          - 'null'
          format: date-time
        hours_since_successful_sync:
          type:
          - number
          - 'null'
        operational_storage:
          type: object
          properties:
            status:
              type: string
              enum:
              - healthy
              - warning
              - critical
              - unknown
            github_cache_entries:
              type: integer
            github_cache_body_bytes:
              type: integer
            github_cache_max_entries:
              type: integer
            github_cache_retention_entries:
              type: integer
            github_cache_body_budget_bytes:
              type: integer
            utilization:
              type: number
            star_snapshot_count:
              type: integer
            sync_run_count:
              type: integer
            governance_run_count:
              type: integer
            project_change_count:
              type: integer
            feedback_proposal_count:
              type: integer
        metadata:
          $ref: '#/components/schemas/Metadata'
      additionalProperties: true
    TrustGateAgentPolicy:
      type: object
      properties:
        high_confidence_use:
          type: string
        caution_use:
          type: string
        block_use:
          type: string
        cite:
          type: array
          items:
            type: string
        disclose_when:
          type: array
          items:
            type: string
      additionalProperties: true
    SyncFreshnessSlo:
      type: object
      required:
      - hot_projects
      - whole_corpus
      properties:
        hot_projects:
          allOf:
          - $ref: '#/components/schemas/SyncFreshnessSloSegment'
          - type: object
            required:
            - target_hours
            properties:
              target_hours:
                type: integer
                minimum: 1
        whole_corpus:
          allOf:
          - $ref: '#/components/schemas/SyncFreshnessSloSegment'
          - type: object
            required:
            - target_basis
            properties:
              target_basis:
                type: string
                enum:
                - tier_policy
      additionalProperties: false
    QualityReportResponse:
      type: object
      description: Corpus quality and trust report. release_score is the release gate; data_trust_score and risk_level describe corpus trust.
      required:
      - score
      - release_score
      - data_trust_score
      - risk_level
      - risk_summary
      - coverage
      - metadata
      properties:
        score:
          type: number
        release_score:
          type: number
        data_trust_score:
          type: number
        score_summary:
          type: object
          properties:
            release_score_meaning:
              type: string
            data_trust_score_meaning:
              type: string
            risk_level_meaning:
              type: string
          additionalProperties: true
        risk_level:
          type: string
          enum:
          - low
          - medium
          - high
        risk_summary:
          type: object
          properties:
            level:
              type: string
              enum:
              - low
              - medium
              - high
            reasons:
              type: array
              items:
                type: string
            low_confidence_classification_rate:
              type: number
            collection_review_rate:
              type: number
            stale_project_rate:
              type: number
            stale_collection_rate:
              type: number
          additionalProperties: true
        improvement_plan:
          type: array
          items:
            type: object
            additionalProperties: true
        project_count:
          type: integer
        issue_count:
          type: integer
        error_count:
          type: integer
        warning_count:
          type: integer
        category_distribution:
          type: object
          additionalProperties:
            type: integer
        coverage:
          type: object
          additionalProperties: true
        issues:
          type: array
          items:
            type: object
            additionalProperties: true
        metadata:
          $ref: '#/components/schemas/Metadata'
      additionalProperties: true
    TrustGateCheck:
      type: object
      required:
      - id
      - label
      - status
      - observed
      - requirement
      properties:
        id:
          type: string
        label:
          type: string
        status:
          type: string
          enum:
          - pass
          - warn
          - fail
        observed:
          type: string
        requirement:
          type: string
    Metadata:
      type: object
      description: Common provenance envelope for agent-facing responses. Agents should require source=d1 for high-confidence production claims and disclose seed fallback.
      properties:
        source:
          type: string
          enum:
          - d1
          - seed
        reason:
          type: string
        project_count:
          type: integer
        generated_at:
          type: string
          format: date-time
        snapshot_id:
          type: string
          description: Stable identity for the corpus snapshot used by this response.
        latest_synced_at:
          type:
          - string
          - 'null'
          format: date-time
        schema_version:
          type: string
          enum:
          - git-top.knowledge.v1
        loaded_project_limit:
          type: integer
          description: Maximum D1 knowledge or search-candidate rows loaded into the bounded ranking set when present.
        truncated:
          type: boolean
          description: Whether the D1-backed ranking or candidate set reached its limit and may omit additional matching rows.
        candidate_retrieval:
          type: string
          enum:
          - d1_first
          description: Search-only marker indicating that deterministic filters and broad query matching ran in D1 before TypeScript ranking.
        candidate_count:
          type: integer
          description: Number of D1 search candidates passed to the authoritative TypeScript filter and ranking stage.
        candidate_limit:
          type: integer
          description: Maximum number of D1 search candidates passed to the ranking stage.
        warnings:
          type: array
          items:
            type: string
          description: Fallback, count, freshness, or trust caveats that agents should account for before citing results.
  securitySchemes:
    syncSecret:
      type: http
      scheme: bearer
      description: Admin endpoints require the SYNC_SECRET bearer token.
    feedbackSecret:
      type: http
      scheme: bearer
      description: Optional FEEDBACK_SECRET. Without it, proposals are validated and fingerprinted but not persisted.