{
  "openapi": "3.1.1",
  "jsonSchemaDialect": "http://json-schema.org/draft-07/schema#",
  "info": {
    "title": "NE RABOTAET V RF public API v2",
    "version": "2.4.0",
    "description": "Full public catalogue reports include catalogue_delivery on each point that ran the operator-assigned extended method. It contains root, script, TCP file and HTTP/3 stages and their summary. Missing means the method was not run or is not public. No plan URLs, reference digest, execution grant or response bodies are published. Publication and consent follow API 2.2.0. Set extended=true on a basic or URL check to sample one response or linked resource. Read the result through the owner session with view=full. For scheduled catalogue checks the extended stages are public on listed entries."
  },
  "servers": [
    {
      "url": "https://nerabotaetv.ru",
      "description": "Public service base URL after pilot activation."
    }
  ],
  "paths": {
    "/api/v2/capabilities": {
      "get": {
        "operationId": "getCapabilities",
        "summary": "Discover current account quotas and location presets",
        "description": "Authenticated; no target requests. Quota values are runtime configuration, not schema defaults.",
        "responses": {
          "200": {
            "description": "Discover current account quotas and location presets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Capabilities"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ]
      }
    },
    "/api/v2/profiles": {
      "get": {
        "operationId": "listProfiles",
        "summary": "List immutable measurement profiles",
        "description": "",
        "responses": {
          "200": {
            "description": "List immutable measurement profiles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/ProfileList"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ]
      }
    },
    "/api/v2/probes": {
      "get": {
        "operationId": "listProbes",
        "summary": "List registered source networks and supported profiles",
        "description": "",
        "responses": {
          "200": {
            "description": "List registered source networks and supported profiles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/ProbeList"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "country_code",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2,
              "pattern": "^[A-Z]{2}$"
            },
            "required": false,
            "description": ""
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            },
            "required": false,
            "description": ""
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "required": false,
            "description": ""
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ]
      }
    },
    "/api/v2/measurements/latest": {
      "get": {
        "operationId": "getLatestAvailability",
        "summary": "Read last public report for the exact scope",
        "description": "R-10: public scheduled catalog only. Never consult private request history. 404 absent; 200 may be stale; 410 full details expired. Full public catalogue reports include catalogue_delivery on each point that ran the operator-assigned extended method. It contains root, script, TCP file and HTTP/3 stages and their summary. Missing means the method was not run or is not public. No plan URLs, reference digest, execution grant or response bodies are published.",
        "responses": {
          "200": {
            "description": "Read last public report for the exact scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Report"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "target",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "minLength": 1
            },
            "required": true,
            "description": "R-01 normalization; read-only."
          },
          {
            "name": "profile",
            "in": "query",
            "schema": {
              "enum": [
                "web-basic-v1",
                "web-basic-ru-v1"
              ]
            },
            "required": true,
            "description": ""
          },
          {
            "name": "probe_ids",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[a-zA-Z0-9_-]+$"
              },
              "minItems": 1,
              "maxItems": 10,
              "uniqueItems": true
            },
            "required": true,
            "description": "Exact probe set, comma-separated. No silent partial selection.",
            "style": "form",
            "explode": false
          },
          {
            "name": "max_age_seconds",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 900,
              "default": 300
            },
            "required": false,
            "description": "Changes eligibility only; never creates a measurement."
          },
          {
            "name": "view",
            "in": "query",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "default": "summary"
            },
            "required": false,
            "description": "Full facts retained 24h; summary excludes observations."
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "required": false,
            "description": "ru or en; defaults to ru."
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ]
      }
    },
    "/api/v2/measurements/{report_id}": {
      "get": {
        "operationId": "getMeasurementReport",
        "summary": "Read public or owned private report",
        "description": "R-04/R-10/R-45. Foreign private and unknown IDs both 404; full after raw expiry 410. Full public catalogue reports include catalogue_delivery on each point that ran the operator-assigned extended method. It contains root, script, TCP file and HTTP/3 stages and their summary. Missing means the method was not run or is not public. No plan URLs, reference digest, execution grant or response bodies are published.",
        "responses": {
          "200": {
            "description": "Read public or owned private report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Report"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$"
            },
            "required": true,
            "description": ""
          },
          {
            "name": "max_age_seconds",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 900,
              "default": 300
            },
            "required": false,
            "description": "Changes eligibility only; never creates a measurement."
          },
          {
            "name": "view",
            "in": "query",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "default": "summary"
            },
            "required": false,
            "description": "Full facts retained 24h; summary excludes observations."
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "required": false,
            "description": "ru or en; defaults to ru."
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ]
      }
    },
    "/api/v2/check-plans": {
      "post": {
        "operationId": "planAvailabilityCheck",
        "summary": "Resolve intent and maximum quota units without starting work",
        "description": "R-13. No target connections or reservations. Account-bound plan valid 120s; no monetary price in this pilot.",
        "responses": {
          "200": {
            "description": "Resolve intent and maximum quota units without starting work",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Plan"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "ClientKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "contract.schema.json#/definitions/CheckIntent"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ]
      }
    },
    "/api/v2/checks": {
      "post": {
        "operationId": "createAvailabilityCheck",
        "summary": "Create or reuse an account-private check",
        "description": "R-11/R-12/R-41. Requires checks:create. Max units is mandatory. Default freshness reuse <=300s. Max_age=0 can join in-flight work. Budget rejection is atomic.",
        "responses": {
          "202": {
            "description": "Queued/running; poll Location with Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Check"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before polling/retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "Location": {
                "description": "URL of the created check.",
                "schema": {
                  "type": "string",
                  "maxLength": 2048,
                  "format": "uri-reference"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "200": {
            "description": "Completed cache reuse or replay of a terminal check.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Check"
                }
              }
            },
            "headers": {
              "Location": {
                "description": "URL of the created check.",
                "schema": {
                  "type": "string",
                  "maxLength": 2048,
                  "format": "uri-reference"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "ClientKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "contract.schema.json#/definitions/CheckRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 16
            },
            "required": true,
            "description": "R-12 or R-31. Opaque retry key; do not put credentials here."
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "required": false,
            "description": "ru or en; defaults to ru."
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ]
      }
    },
    "/api/v2/checks/{check_id}": {
      "get": {
        "operationId": "getAvailabilityCheck",
        "summary": "Read owned check and partial or terminal report",
        "description": "R-14: completed/expired/failed are terminal; target failure is a result, not an API error. Server finalizes without polling. Foreign ID 404.",
        "responses": {
          "200": {
            "description": "Read owned check and partial or terminal report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Check"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Minimum delay in seconds before polling/retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "check_id",
            "in": "path",
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$"
            },
            "required": true,
            "description": ""
          },
          {
            "name": "max_age_seconds",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 900,
              "default": 300
            },
            "required": false,
            "description": "Changes eligibility only; never creates a measurement."
          },
          {
            "name": "view",
            "in": "query",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "default": "summary"
            },
            "required": false,
            "description": "Full facts retained 24h; summary excludes observations."
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "required": false,
            "description": "ru or en; defaults to ru."
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ]
      }
    },
    "/api/v2/catalogue": {
      "get": {
        "operationId": "listCatalogue",
        "summary": "Operator-maintained root catalogue, including sites without v2 observations",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 253,
              "pattern": "^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$"
            }
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Current projection; observation times and freshness are independent of publication time.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/CataloguePage"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "description": "R-04b/R-27a. Uses the canonical report projector with max_age=300 seconds. Observation age is evaluated from original completion timestamps, independently of the nominal collection interval, response delivery and cache reads. A scheduled refresh does not extend freshness. Historical status and current freshness must be read together; GET never starts a measurement."
      }
    },
    "/api/v2/catalogue/{domain}": {
      "get": {
        "operationId": "catalogueHistory",
        "summary": "Completed public operator observations, newest first",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 253,
              "pattern": "^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$"
            }
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Current projection; observation times and freshness are independent of publication time.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/CatalogueHistory"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "description": "R-04b/R-27a. Uses the canonical report projector with max_age=300 seconds. Observation age is evaluated from original completion timestamps, independently of the nominal collection interval, response delivery and cache reads. A scheduled refresh does not extend freshness. Historical status and current freshness must be read together; GET never starts a measurement."
      }
    },
    "/api/v2/publications": {
      "get": {
        "operationId": "listPublications",
        "summary": "Root summaries explicitly published by their owners",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$"
            }
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Masked publication_version=2. status is historical at observed_at. No full domain/URL, even when authenticated; owners read their original private measurement separately.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/PublicationPage"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/checks/{check_id}/publication": {
      "post": {
        "operationId": "publishCheck",
        "summary": "Explicitly publish a completed HTTPS-root check summary",
        "security": [
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "check_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$"
            }
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Masked publication_version=2. status is historical at observed_at. No full domain/URL, even when authenticated; owners read their original private measurement separately.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Publication"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "description": "Explicit owner consent. With disclosure=domain, shares the hostname, trust profile, time, coverage and summary only. No paths, query, raw facts or redirects are published. A replay never expands existing masked consent.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "contract.schema.json#/definitions/PublicationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v2/publications/{publication_id}": {
      "get": {
        "operationId": "getPublication",
        "summary": "Owner-consented historical summary with recorded trust; no private facts or redirects",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "publication_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$"
            }
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Masked publication_version=2. status is historical at observed_at. No full domain/URL, even when authenticated; owners read their original private measurement separately.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/Publication"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/abuse-reports": {
      "post": {
        "operationId": "reportAbuse",
        "summary": "Report a publication or catalogue entry to a private moderation queue",
        "description": "subject_id is publication_id or listed catalogue domain. No files, free text or external fetches. child_safety=true only for suspected_illegal. Deduplicated per reporter/subject. UTC-day limits: 3/reporter, 10/network across keys and sessions, 1000 globally; 429 Retry-After. Ordinary reports do not remove content. Child-safety reports temporarily hide user publications for human review, not a permanent domain ban. Catalogue decisions require an operator. Receipt confirms intake only.",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "contract.schema.json#/definitions/AbuseRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/AbuseReceipt"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/publications/{publication_id}/withdraw": {
      "post": {
        "operationId": "withdrawPublication",
        "summary": "Owner withdraws a publication",
        "description": "Requires checks:create and ownership. Idempotent empty JSON object. Subsequent public reads hide the publication; private report lifetime unchanged. Does not undo external copies.",
        "security": [
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "publication_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$"
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "contract.schema.json#/definitions/PublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/PublicationWithdrawal"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/activity": {
      "get": {
        "operationId": "getVisitorActivity",
        "summary": "Recent visitor activity; private entries expose only an opaque activity ID and creation time",
        "security": [],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 6
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent visitor activity; private entries expose only an opaque activity ID and creation time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/ActivityPage"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/catalogue/{domain}/browser-observations": {
      "get": {
        "operationId": "getBrowserObservationSummary",
        "summary": "Unverified browser signals in the last 24 hours; never included in probe availability",
        "security": [],
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Unverified browser signals in the last 24 hours; never included in probe availability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/BrowserObservationSummary"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/catalogue/timeline": {
      "get": {
        "operationId": "catalogueDay",
        "summary": "Complete 24-hour compact history for up to ten catalogue domains",
        "description": "Fixed 24h interval ending at the last completed UTC minute; cache at most 60s. No page cursor or arbitrary date range. Each report retains its expected point count and all compact observations. Missing/invalid data is not a site outage. Reads only listed public web-basic-v1 operator reports, never private or visitor-published checks. Unknown or unlisted domain makes the entire request 404. Defensive cap 512 reports per domain and 3MiB: exceeding it returns 503, never a truncated successful day. This historical cache never extends max_age of current summaries.",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "domains",
            "in": "query",
            "required": true,
            "description": "One to ten distinct lowercase ASCII catalogue domains separated by commas. Order does not matter.",
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 2539
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Complete compact historical observations, chronological within each domain.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/CatalogueDay"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/catalogue/relevance": {
      "get": {
        "operationId": "getCatalogueRelevance",
        "summary": "Снимок порядка каталога по актуальности",
        "description": "Ранжирование только штатных публичных проверок каталога по сопоставимой истории за 24 часа. Без snapshot рассчитывается общий снимок не чаще раза в минуту. Передайте snapshot_id как snapshot для неизменного порядка до expires_at (30 минут). 404 означает истечение/утрату снимка; явно начните новый просмотр. Изъятые из каталога домены исключаются даже из сохранённых снимков. ranked_at не является временем наблюдения: valid_until ограничивает срок актуальности основания. Отсутствие сравнимой истории не означает недоступность сайта. Алфавитный /catalogue не меняется.",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "snapshot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^rel_[a-f0-9]{32}$"
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Компактный полный порядок каталога; сортировка применяется до поиска, фильтра и пагинации.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/CatalogueRelevance"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/catalogue/series": {
      "get": {
        "operationId": "getCatalogueSeries",
        "summary": "Prepared weekly or monthly catalogue history",
        "description": "Prepared public catalogue history. 7 or 30 Moscow calendar dates including today; current date/hour is partial. Window ends at the most recent closed five-minute boundary. Missing time is never interpolated. ready=false means initial backfill or an index older than ten minutes. Does not launch probes.",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Canonical listed catalogue domain."
          },
          {
            "name": "period",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d"
              ]
            },
            "description": "7d: hourly, 30d: daily. Moscow calendar dates including the current partial date."
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Complete compact historical observations, chronological within each domain.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/CatalogueSeries"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/catalogue/current": {
      "get": {
        "operationId": "getCatalogueCurrent",
        "summary": "Fresh summaries for selected catalogue roots",
        "security": [
          {},
          {
            "ClientKey": []
          }
        ],
        "parameters": [
          {
            "name": "domains",
            "in": "query",
            "required": true,
            "description": "One to ten distinct lowercase ASCII catalogue domains separated by commas. Order does not matter.",
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 2539
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2.4.0"
              ]
            },
            "example": "2.4.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Complete batch of current summaries; original measurement timestamps and freshness are preserved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "contract.schema.json#/definitions/CataloguePage"
                }
              }
            },
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Problem",
            "headers": {
              "API-Version": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "2.4.0"
                  ]
                }
              }
            }
          }
        },
        "description": "Public read-only batch for 1–10 distinct operator-listed domains. Uses the same canonical Report summary and strict max_age=300 seconds as catalogue. Returns CataloguePage with next_cursor=null, sorted by domain. Missing/unlisted member returns 404 for the whole batch. Does not start measurements or read private checks. No response cache; honour Retry-After on 429/503."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ClientKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Per-account key; scopes measurements:read and checks:create. Not an origin or probe credential."
      }
    },
    "responses": {
      "Problem": {
        "description": "R-16 Problem Details. Status equals HTTP response status.",
        "headers": {
          "Retry-After": {
            "description": "Minimum delay in seconds before polling/retrying.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "contract.schema.json#/definitions/Problem"
            }
          }
        }
      }
    }
  }
}
