landfeedAPI · MCP · 2.0.0Agent Markdown

PUT /v1/watches/{watch_id}/webhook

Zarejestruj lub zastąp webhook HTTPS; operacja jednorazowo zwraca nowy sekret do podpisywania i anuluje poprzednią kolejkę.

Operation ID: watch_webhook_configure.

Description

not specified in the source contract

Cost

x-request-cost: 0 requests per call.

Inputs

Declared path/query inputs: watch_id.

q | id | point | lat+lng at operation level: not specified in the source contract. See declared parameters and request body.

Parameters

NameInRequiredSchemaDescription
watch_idpathtrue{"format": "uuid", "type": "string"}not specified in the source contract

Request body

{
  "content": {
    "application/json": {
      "example": {
        "enabled": true,
        "url": "https://example.org/landfeed-hook"
      },
      "schema": {
        "$ref": "#/components/schemas/WatchWebhookWrite"
      }
    }
  },
  "required": true
}

Authentication

[
  {
    "ApiKey": []
  },
  {
    "OAuthConnector": []
  }
]
{
  "ApiKey": {
    "description": "Klucz API konta korzystający z tych samych kredytów co wywołania przez połączenie OAuth.",
    "in": "header",
    "name": "X-Api-Key",
    "type": "apiKey"
  },
  "OAuthConnector": {
    "bearerFormat": "OAuth 2.1 access token",
    "description": "Autoryzacja połączenia OAuth ze wspólnymi kredytami konta. Wykrywanie konfiguracji i zgodę obsługuje usługa uwierzytelniania.",
    "scheme": "bearer",
    "type": "http"
  }
}

Responses

StatusDescriptionBilling rule
200Wynik ograniczony do konta. Sekrety utworzone lub zmienione w tej operacji są ujawniane wyłącznie w jej odpowiedzi.free_watch
400Błędne dane wejściowe lub event_type_has_no_producer; bezpłatne.free_watch
401Wymagany poprawny klucz API konta; bezpłatne.free_watch
403Statyczne dane uwierzytelniające lub nieaktywne konto; bezpłatne.free_watch
404Brak obserwacji należącej do tego konta; bezpłatne.free_watch
409Osiągnięto limit obserwowanych elementów; bezpłatne.free_watch
413Treść przekracza 256 KiB lub łączny limit pracy walidatora; bezpłatne.free_watch
429Limit 30 operacji zarządzania na konto na minutę; bezpłatne.free_watch
503Magazyn obserwacji lub rozpoznawanie adresu odbiorcy są niedostępne; bezpłatne.free_watch

HTTP 200: headers and body schemas

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/WatchResponse"
      }
    }
  },
  "description": "Wynik ograniczony do konta. Sekrety utworzone lub zmienione w tej operacji są ujawniane wyłącznie w jej odpowiedzi."
}

HTTP 400: headers and body schemas

{
  "description": "Błędne dane wejściowe lub event_type_has_no_producer; bezpłatne."
}

HTTP 401: headers and body schemas

{
  "description": "Wymagany poprawny klucz API konta; bezpłatne."
}

HTTP 403: headers and body schemas

{
  "description": "Statyczne dane uwierzytelniające lub nieaktywne konto; bezpłatne."
}

HTTP 404: headers and body schemas

{
  "description": "Brak obserwacji należącej do tego konta; bezpłatne."
}

HTTP 409: headers and body schemas

{
  "description": "Osiągnięto limit obserwowanych elementów; bezpłatne."
}

HTTP 413: headers and body schemas

{
  "description": "Treść przekracza 256 KiB lub łączny limit pracy walidatora; bezpłatne."
}

HTTP 429: headers and body schemas

{
  "description": "Limit 30 operacji zarządzania na konto na minutę; bezpłatne."
}

HTTP 503: headers and body schemas

{
  "description": "Magazyn obserwacji lub rozpoznawanie adresu odbiorcy są niedostępne; bezpłatne."
}

Layer answers and value schemas

When a response includes layer answers, their common frame is:

{
  "additionalProperties": false,
  "allOf": [
    {
      "else": {
        "properties": {
          "value": {
            "type": "object"
          }
        }
      },
      "if": {
        "properties": {
          "coverage": {
            "enum": [
              "not_covered",
              "not_computed"
            ]
          }
        }
      },
      "then": {
        "properties": {
          "value": {
            "type": "null"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "coverage": {
            "enum": [
              "covered",
              "covered_no_data"
            ]
          },
          "layer": {
            "const": "mpzp"
          }
        }
      },
      "then": {
        "properties": {
          "value": {
            "$ref": "#/$defs/MpzpValue"
          }
        }
      }
    }
  ],
  "description": "Wspólny format każdej odpowiedzi tematycznej. Pola właściwe dla danej kategorii znajdują się w value (schematy *Value w openapi.yaml).",
  "properties": {
    "as_of": {
      "format": "date",
      "type": [
        "string",
        "null"
      ]
    },
    "basis": {
      "description": "Przepis lub reguła będąca podstawą wyliczonej odpowiedzi, np. „u.p.z.p. art. 59 ust. 3”.",
      "type": [
        "string",
        "null"
      ]
    },
    "confidence": {
      "maximum": 1,
      "minimum": 0,
      "type": "number"
    },
    "coverage": {
      "$ref": "#/$defs/Coverage"
    },
    "hash": {
      "description": "Skrót sha256 w zapisie szesnastkowym z coverage + ':' + canonical(value) (nagłówek parcel_record.sql). Wartość null dla danych ustalanych podczas żądania.",
      "type": [
        "string",
        "null"
      ]
    },
    "layer": {
      "$ref": "#/$defs/LayerKey"
    },
    "layer_version": {
      "description": "Identyfikator obliczenia dla wcześniej obliczonych danych; live dla danych ustalanych podczas żądania.",
      "type": "string"
    },
    "licence": {
      "$ref": "#/$defs/Licence"
    },
    "method": {
      "$ref": "#/$defs/Method"
    },
    "note": {
      "description": "Jedno zdanie prostym językiem do przytoczenia przez agenta w każdym stanie: co oznacza wartość lub dlaczego jej brakuje. Bez określenia „bezpieczna” i bez „brak planu”, jeżeli nie wskazano rodzaju planu i źródła.",
      "minLength": 1,
      "type": "string"
    },
    "scope": {
      "$ref": "#/$defs/Scope"
    },
    "source": {
      "$ref": "#/$defs/SourceRef"
    },
    "threshold": {
      "maximum": 1,
      "minimum": 0,
      "type": "number"
    },
    "value": {
      "description": "Wartość null wtedy i tylko wtedy, gdy coverage wynosi not_covered lub not_computed.",
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "layer",
    "coverage",
    "value",
    "note",
    "source",
    "as_of",
    "layer_version"
  ],
  "type": "object"
}

Schema names correspond to the layer keys below. A schema dispatch constraint in LayerAnswer is not specified in v1.

Layer keyLayerAnswer.value schema
addressAddressValue
adminnot specified in the source contract
buildingsBuildingsValue
floodFloodValue
landslideLandslideValue
mpzpMpzpValue
parcelnot specified in the source contract
permitsPermitsValue
planningPlanningValue
pogPogValue
pricesPricesValue
protectedProtectedValue
road_accessRoadAccessValue
soilSoilValue
wzWzValue

Referenced response definitions from openapi.yaml:

See Schemas for all operation-specific definitions.

Envelope references are defined in Envelope.

Coverage states

Cztery stany zakresu danych dla jednej kategorii w danym miejscu. covered: źródło obejmuje to miejsce i zawiera rekord; value zawiera ten rekord. covered_no_data: źródło obejmuje to miejsce, lecz nie zawiera rekordu; value ma określoną dla danej kategorii pustą wartość (false, 0, [], none), nigdy null; jest to potwierdzony brak rekordu, za który naliczana jest opłata. not_covered: źródło nie obejmuje miejsca albo państwo nie publikuje tych danych w postaci do odczytu maszynowego; value=null, agent nie może wyciągać wniosków, a opłata jest zwracana, gdy zapytanie dotyczy tych danych. not_computed: posiadamy źródło, lecz nie obliczyliśmy jeszcze wyniku dla tego miejsca, np. trwa ładowanie zbioru; value=null, opłata jest zwracana. Każdy stan zawiera uwagę napisaną prostym językiem.

States: covered | covered_no_data | not_covered | not_computed.

LayerAnswer required fields: layer, coverage, value, note, source, as_of, layer_version.

Billing rule

Koszt żądania. charged: liczba naliczonych wywołań po zwrotach. refunded: liczba wywołań naliczonych, a następnie zwróconych. rule: zastosowana reguła. Płatne są odpowiedzi, potwierdzone braki rekordów (covered_no_data) i niejednoznaczne listy kandydatów. Bezpłatne są błędne dane wejściowe (400), brak uwierzytelnienia (401), odpowiedzi bez zmiany danych (304) i operacje bezpłatne. Zwrot obejmuje pozostałe 4xx, każde 5xx, status not_covered oraz odpowiedź dotyczącą jednej kategorii ze stanem not_covered lub not_computed. W operacjach zbiorczych liczby dotyczą poszczególnych elementów.

Rule values: charged | free_operation | free_invalid_input | free_unauthorized | free_not_modified | refunded_client_error | refunded_server_error | refunded_not_covered | refunded_not_computed | batch_mixed.

Recorded example

No valid key supplied. Request UUID and response clock normalized. No database, socket, paid call or live coverage claim.

Recorded HTTP status: 401. The curl example reproduces this admission response with an unset API key. For supported authenticated operations, supply an account key and required permissions; data and billing then depend on that account. The Stripe receiver additionally requires a provider signature.

curl --silent --show-error --request PUT "https://mcp.agentdzialek.pl/v1/watches/00000000-0000-4000-8000-000000000001/webhook" \
  -H "X-Api-Key: ${LANDFEED_API_KEY}" \
  -H 'Content-Type: application/json' \
  --data '{"url": "https://example.org/landfeed-hook", "enabled": true}'
{
  "billing": {
    "charged": 0,
    "cost": 0,
    "refunded": 0,
    "rule": "free_watch"
  },
  "error": "unauthorized",
  "result": null,
  "status": "error"
}

Matching MCP tool

not specified in the source contract